summary refs log tree commit diff
path: root/pkgs/applications/networking/asn
diff options
context:
space:
mode:
authordevhell <devhell@mailfresser.de>2022-08-20 17:03:48 +0100
committerdevhell <devhell@mailfresser.de>2022-08-21 19:49:35 +0100
commit87f8b1d685feb0ee8ea3015ec8db741fcf1d2505 (patch)
tree366d7b60d451822795aed4076ad64813168f759d /pkgs/applications/networking/asn
parentc6a0bf65084ec03c993995c6f6063086a89a37e8 (diff)
asn: init at 0.72.1
Diffstat (limited to 'pkgs/applications/networking/asn')
-rw-r--r--pkgs/applications/networking/asn/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/applications/networking/asn/default.nix b/pkgs/applications/networking/asn/default.nix
new file mode 100644
index 0000000000000..0dca925805241
--- /dev/null
+++ b/pkgs/applications/networking/asn/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, curl
+, whois
+, bind
+, mtr
+, jq
+, ipcalc
+, grepcidr
+, nmap
+, aha
+}:
+
+stdenv.mkDerivation rec {
+  pname = "asn";
+  version = "0.72.1";
+
+  src = fetchFromGitHub {
+    owner = "nitefood";
+    repo = "asn";
+    rev = "v${version}";
+    sha256 = "sha256-2JGc1PhvmuZFT6c6UcxHKttHqWF+NsekqnYtdGKgU2U=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -Dv asn "$out/bin/asn"
+
+    wrapProgram $out/bin/asn \
+      --prefix PATH : "${lib.makeBinPath [ curl whois bind mtr jq ipcalc grepcidr nmap aha ]}"
+  '';
+
+  meta = {
+    description = "OSINT command line tool for investigating network data";
+    longDescription = ''
+      ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization /
+      IP reputation / IP geolocation / IP fingerprinting / Network recon /
+      lookup API server / Web traceroute server
+    '';
+    homepage = "https://github.com/nitefood/asn";
+    license = with lib.licenses; [ mit ];
+    maintainers = with lib.maintainers; [ devhell ];
+  };
+}