The appropriate way of installing
cowpatty in your system is to grab a carefully packaged deb from a distribution that is compatible with Ubuntu.
My recommendation would be to grab
cowpatty from Kali Linux's repository and keep it updated with your system. You will not only have the version that others indicated, but also future versions updated automatically.
The appropriate entry for
/etc/apt/sources.list would be, according to the documentation:
deb http://http.kali.org/kali kali-rolling main non-free contrib
This answer of mine tries to keeping in spirit with the "don't install packages from source if you don't have to" and to "stay only with packages from curated repositories". This applies in general and also especially for the case of security-minded people asking/learning about security.
Also, installing things from source and compiling yourself without them being in a Debian package makes
dpkg (and higher level tools, like
aptitude) not aware of removing libraries that the tools depend on, like
libpcap and OpenSSL (via
There is a high probability of programs breaking when one of their underlying libraries is removed from the system (like OpenSSL pre-1.1 to OpenSSL 1.1 or any other library transition at all).
I understand that a Debian package may not have existed at the time the question was asked, but:
- Asking in Debian or Ubuntu for a package like this is a very good way to have it included not only in your Ubuntu release but with high probability, in future ones, so that you can keep using the program.
- Packaging programs is a very nice way to learn about the programs and your system in general and there are nice folks (including yours truly) that are always willing to help people enrich our distributions.
- Expanding on the point above, when a package gets included in the distribution, its compiled/prepared version becomes available to every user of the distribution and it obviates the need of "I have the program and can send it to you privately". This is a contribution in the true spirit of "Free Software and giving back to the community" (even though I understand that, sometimes, you may simply want to use something quickly).
- Once the package gets approved in Debian or Ubuntu, it can become available "forever" for future reference, since a snapshot of both its source version as well as its binary version are present at snapshot.debian.org