2017-11-05 17:15:53 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, libpcap }:
|
2017-02-04 17:10:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "masscan";
|
2018-09-03 14:34:30 +01:00
|
|
|
version = "1.0.5";
|
2017-02-04 17:10:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "robertdavidgraham";
|
|
|
|
repo = "masscan";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2018-09-03 14:34:30 +01:00
|
|
|
sha256 = "0q0c7bsf0pbl8napry1qyg0gl4pd8wn872h4mz9b56dx4rx90vqg";
|
2017-02-04 17:10:37 +00:00
|
|
|
};
|
|
|
|
|
2018-03-21 20:42:06 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-02-04 17:10:37 +00:00
|
|
|
|
2018-03-21 20:42:06 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" "GITVER=${version}" "CC=cc" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
2017-02-04 17:10:37 +00:00
|
|
|
|
|
|
|
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
|
2018-09-03 14:34:30 +01:00
|
|
|
cp -t $out/share/doc/masscan doc/algorithm.js doc/howto-afl.md doc/bot.html
|
2017-02-04 17:10:37 +00:00
|
|
|
cp doc/masscan.8 $out/share/man/man8/masscan.8
|
|
|
|
cp LICENSE $out/share/licenses/masscan/LICENSE
|
2017-11-05 17:15:53 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/masscan --prefix LD_LIBRARY_PATH : "${libpcap}/lib"
|
2017-02-04 17:10:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Fast scan of the Internet";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/robertdavidgraham/masscan";
|
2017-02-04 17:10:37 +00:00
|
|
|
license = licenses.agpl3;
|
2017-11-05 17:15:53 +00:00
|
|
|
platforms = platforms.unix;
|
2017-02-04 17:10:37 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
|
|
};
|
|
|
|
}
|