diff --git a/pkgs/tools/networking/amass/default.nix b/pkgs/tools/networking/amass/default.nix new file mode 100644 index 00000000000..adb43c4aa08 --- /dev/null +++ b/pkgs/tools/networking/amass/default.nix @@ -0,0 +1,42 @@ +{ buildGoPackage +, fetchFromGitHub +, lib +}: + +buildGoPackage rec { + name = "amass-${version}"; + version = "2.8.3"; + + goPackagePath = "github.com/OWASP/Amass"; + + src = fetchFromGitHub { + owner = "OWASP"; + repo = "Amass"; + rev = version; + sha256 = "1pidi7bpg5z04l6ryfd7rqxshayvkqmgav0f6f1fxz4jwrmx9nnc"; + }; + + # NOTE: this must be removed once amass > 2.8.3 is released. This version has + # a broken import caused by the project migrating to a new home. + preBuild = '' + sed -e 's:github.com/caffix/amass/amass/core:github.com/OWASP/Amass/amass/core:g' -i "go/src/${goPackagePath}/cmd/amass.netdomains/main.go" + ''; + + goDeps = ./deps.nix; + + meta = with lib; { + description = "In-Depth DNS Enumeration and Network Mapping"; + longDescription = '' + The OWASP Amass tool suite obtains subdomain names by scraping data + sources, recursive brute forcing, crawling web archives, + permuting/altering names and reverse DNS sweeping. Additionally, Amass + uses the IP addresses obtained during resolution to discover associated + netblocks and ASNs. All the information is then used to build maps of the + target networks. + ''; + homepage = https://www.owasp.org/index.php/OWASP_Amass_Project; + license = licenses.asl20; + maintainers = with maintainers; [ kalbasit ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/tools/networking/amass/deps.nix b/pkgs/tools/networking/amass/deps.nix new file mode 100644 index 00000000000..711d64fd313 --- /dev/null +++ b/pkgs/tools/networking/amass/deps.nix @@ -0,0 +1,101 @@ +[ + { + goPackagePath = "github.com/PuerkitoBio/fetchbot"; + fetch = { + type = "git"; + url = "https://github.com/PuerkitoBio/fetchbot"; + rev = "1f502d610659b899a007858812b601e715f531eb"; + sha256 = "0yzv0xh3cwq87jv9whs5rmhaj8b2nqdm76vwppzn8mm34fg41n8s"; + }; + } + { + goPackagePath = "github.com/PuerkitoBio/goquery"; + fetch = { + type = "git"; + url = "https://github.com/PuerkitoBio/goquery"; + rev = "2d2796f41742ece03e8086188fa4db16a3a0b458"; + sha256 = "1fqf4rs66wy02nxz6w4mvs2qawf2j8srz17i294v64y8gvxisp56"; + }; + } + { + goPackagePath = "github.com/andybalholm/cascadia"; + fetch = { + type = "git"; + url = "https://github.com/andybalholm/cascadia"; + rev = "680b6a57bda4f657485ad44bdea42342ead737bc"; + sha256 = "0v95plagirbjlc4p00y9brhpvv4nm8q0gr63gcfs3shyh1a8xwbm"; + }; + } + { + goPackagePath = "github.com/asaskevich/EventBus"; + fetch = { + type = "git"; + url = "https://github.com/asaskevich/EventBus"; + rev = "d46933a94f05c6657d7b923fcf5ac563ee37ec79"; + sha256 = "130mjlsc6jf17zdx8ymhxis70a13l2zbjmjzgvjdr6pb0jzxsqha"; + }; + } + { + goPackagePath = "github.com/fatih/color"; + fetch = { + type = "git"; + url = "https://github.com/fatih/color"; + rev = "3f9d52f7176a6927daacff70a3e8d1dc2025c53e"; + sha256 = "165ww24x6ba47ji4j14mp3f006ksnmi53ws9280pgd2zcw91nbn8"; + }; + } + { + goPackagePath = "github.com/irfansharif/cfilter"; + fetch = { + type = "git"; + url = "https://github.com/irfansharif/cfilter"; + rev = "d07d951ff29d52840ca5e798a17e80db4de8c820"; + sha256 = "11gicb8jbpnsc7wylv7qs9dgc91qc3rld6ahsylb491knxr78yb2"; + }; + } + { + goPackagePath = "github.com/johnnadratowski/golang-neo4j-bolt-driver"; + fetch = { + type = "git"; + url = "https://github.com/johnnadratowski/golang-neo4j-bolt-driver"; + rev = "6b24c0085aaeaf3b2844acd18066864e24b57387"; + sha256 = "0dmfgy0ci0k0s4hxp9v5j4j0mab5x1nsc83icgq9ldb2446mn0fk"; + }; + } + { + goPackagePath = "github.com/miekg/dns"; + fetch = { + type = "git"; + url = "https://github.com/miekg/dns"; + rev = "1c9c9bf4c93ee029810272d3e5b8a126aee5bf1f"; + sha256 = "002z8l5crsipdn2zkavjkjzxrj6c4132yqgbg1zk7w7gkv40q7wr"; + }; + } + { + goPackagePath = "github.com/temoto/robotstxt-go"; + fetch = { + type = "git"; + url = "https://github.com/temoto/robotstxt-go"; + rev = "97ee4a9ee6ea01ed0bbf0325dd789f74cac6cb94"; + sha256 = "1nfnwz5lm9dgicsjh99gs4gh4gbrxdl16srz505f04mab51kd51r"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "adae6a3d119ae4890b46832a2e88a95adc62b8e7"; + sha256 = "1fx860zsgzqk28j7lmp96qsfrgb0kzbfjvr294hywswcbwdwkb01"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "93218def8b18e66adbdab3eca8ec334700329f1f"; + sha256 = "0v0zdnsi0vw03dcfir7b228g02ag7jr7mgbgv6lnjwbbccxv07pz"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a3fb6d7dcb5..9ebed011927 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -475,6 +475,8 @@ with pkgs; acme-client = callPackage ../tools/networking/acme-client { inherit (darwin) apple_sdk; }; + amass = callPackage ../tools/networking/amass { }; + afew = callPackage ../applications/networking/mailreaders/afew { pythonPackages = python3Packages; }; afio = callPackage ../tools/archivers/afio { };