2014-04-12 03:32:30 +01:00
|
|
|
{ stdenv, fetchurl, libpcap, bash }:
|
2014-03-31 17:22:50 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "p0f-${version}";
|
2016-05-12 23:13:22 +01:00
|
|
|
version = "3.09b";
|
2014-03-31 17:22:50 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://lcamtuf.coredump.cx/p0f3/releases/${name}.tgz";
|
2016-05-12 23:13:22 +01:00
|
|
|
sha256 = "0zqfq3gdnha29ckvlqmyp36c0jhj7f69bhqqx31yb6vkirinhfsl";
|
2014-03-31 17:22:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
substituteInPlace config.h --replace "p0f.fp" "$out/etc/p0f.fp"
|
2014-04-12 03:32:30 +01:00
|
|
|
substituteInPlace build.sh --replace "/bin/bash" "${bash}/bin/bash"
|
2014-03-31 17:22:50 +01:00
|
|
|
./build.sh
|
|
|
|
cd tools && make && cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/sbin $out/etc
|
|
|
|
|
|
|
|
cp ./p0f $out/sbin
|
|
|
|
cp ./p0f.fp $out/etc
|
|
|
|
|
|
|
|
cp ./tools/p0f-client $out/sbin
|
|
|
|
cp ./tools/p0f-sendsyn $out/sbin
|
|
|
|
cp ./tools/p0f-sendsyn6 $out/sbin
|
|
|
|
'';
|
|
|
|
|
2018-05-29 16:08:39 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2014-03-31 17:22:50 +01:00
|
|
|
meta = {
|
|
|
|
description = "Passive network reconnaissance and fingerprinting tool";
|
|
|
|
homepage = "http://lcamtuf.coredump.cx/p0f3/";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|