2022-09-22 12:36:57 +00:00
|
|
|
{ lib, rustPlatform, fetchCrate, nmap, stdenv, Security, perl, python3 }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustscan";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.1.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
substituteInPlace src/scripts/mod.rs \
|
|
|
|
--replace 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
|
|
|
|
patchShebangs fixtures/.rustscan_scripts/*
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ perl python3 ];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
# these tests require network access
|
2020-09-25 04:45:31 +00:00
|
|
|
checkFlags = [
|
2020-10-19 23:25:03 +00:00
|
|
|
"--skip=parse_correct_host_addresses"
|
|
|
|
"--skip=parse_hosts_file_and_incorrect_hosts"
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Faster Nmap Scanning with Rust";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rustscan";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/RustScan/RustScan";
|
|
|
|
license = licenses.gpl3Only;
|
2022-09-22 12:36:57 +00:00
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|