2014-04-12 04:32:30 +02:00
|
|
|
{ stdenv, fetchurl, libpcap, bash }:
|
2014-03-31 18:22:50 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "p0f-${version}";
|
2014-10-10 00:00:25 +02:00
|
|
|
version = "3.07b";
|
2014-03-31 18:22:50 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://lcamtuf.coredump.cx/p0f3/releases/${name}.tgz";
|
2014-10-10 00:00:25 +02:00
|
|
|
sha256 = "18hbkwvh8maswhka0cyq0rwznz8yacnf4h1jmvb8krz0695rmz2w";
|
2014-03-31 18:22:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
substituteInPlace config.h --replace "p0f.fp" "$out/etc/p0f.fp"
|
2014-04-12 04:32:30 +02:00
|
|
|
substituteInPlace build.sh --replace "/bin/bash" "${bash}/bin/bash"
|
2014-03-31 18:22:50 +02: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|