2017-11-05 18:15:53 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, libpcap }:
|
2017-02-04 18:10:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "masscan-${version}";
|
2017-11-05 18:15:53 +01:00
|
|
|
version = "1.0.4";
|
2017-02-04 18:10:37 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "robertdavidgraham";
|
|
|
|
repo = "masscan";
|
2017-11-05 18:15:53 +01:00
|
|
|
rev = "39061a5e9ef158dde1e6618f6fbf379739934a73";
|
|
|
|
sha256 = "0mjvwh4i0ncsa3ywavw2s55v5bfv7pyga028c8m8xfash9764wwf";
|
2017-02-04 18:10:37 +01:00
|
|
|
};
|
|
|
|
|
2017-11-05 18:15:53 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
2017-02-04 18:10:37 +01:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" "CC=cc" "-j" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/man/man8
|
|
|
|
mkdir -p $out/share/{doc,licenses}/masscan
|
|
|
|
mkdir -p $out/etc/masscan
|
|
|
|
|
|
|
|
cp data/exclude.conf $out/etc/masscan
|
|
|
|
cp -t $out/share/doc/masscan doc/algorithm.js doc/howto-afl.md doc/bot.hml
|
|
|
|
cp doc/masscan.8 $out/share/man/man8/masscan.8
|
|
|
|
cp LICENSE $out/share/licenses/masscan/LICENSE
|
2017-11-05 18:15:53 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/masscan --prefix LD_LIBRARY_PATH : "${libpcap}/lib"
|
2017-02-04 18:10:37 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Fast scan of the Internet";
|
|
|
|
homepage = https://github.com/robertdavidgraham/masscan;
|
|
|
|
license = licenses.agpl3;
|
2017-11-05 18:15:53 +01:00
|
|
|
platforms = platforms.unix;
|
2017-02-04 18:10:37 +01:00
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
|
|
};
|
|
|
|
}
|