diff --git a/pkgs/tools/security/bettercap/default.nix b/pkgs/tools/security/bettercap/default.nix index d0cda57e2d06..0560f91b22b7 100644 --- a/pkgs/tools/security/bettercap/default.nix +++ b/pkgs/tools/security/bettercap/default.nix @@ -1,29 +1,35 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, libpcap, libnfnetlink, libnetfilter_queue, libusb1 }: +{ lib +, buildGoModule +, fetchFromGitHub +, pkg-config +, libpcap +, libnfnetlink +, libnetfilter_queue +, libusb1 +}: -buildGoPackage rec { +buildGoModule rec { pname = "bettercap"; - version = "2.26.1"; - - goPackagePath = "github.com/bettercap/bettercap"; + version = "2.27"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "10qsknyzfpzfpm4gp98jwvw6qmkmx23nw88sbnpl2rlr725l560c"; + sha256 = "18hwz9m16pxlb7wp78iqmdi0kimrx3h05fs0zhzm8qhzancq8alf"; }; - nativeBuildInputs = [ pkgconfig ]; + modSha256 = "1qhmrjb3fvw6maxrl7hb3bizrw6szhwx6s2g59p5pj3dz4x8jajn"; + + nativeBuildInputs = [ pkg-config ]; buildInputs = [ libpcap libnfnetlink libnetfilter_queue libusb1 ]; - goDeps = ./deps.nix; - - meta = with stdenv.lib; { + meta = with lib; { description = "A man in the middle tool"; longDescription = '' BetterCAP is a powerful, flexible and portable tool created to perform various types of MITM attacks against a network, manipulate HTTP, HTTPS and TCP traffic in realtime, sniff for credentials and much more. - '' ; - homepage = https://www.bettercap.org/; + ''; + homepage = "https://www.bettercap.org/"; license = with licenses; gpl3; maintainers = with maintainers; [ y0no ]; platforms = platforms.all; diff --git a/pkgs/tools/security/bettercap/deps.nix b/pkgs/tools/security/bettercap/deps.nix deleted file mode 100644 index 12aeb1918c6e..000000000000 --- a/pkgs/tools/security/bettercap/deps.nix +++ /dev/null @@ -1,534 +0,0 @@ -# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) -[ - { - goPackagePath = "github.com/BurntSushi/toml"; - fetch = { - type = "git"; - url = "https://github.com/BurntSushi/toml"; - rev = "v0.3.1"; - sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; - }; - } - { - goPackagePath = "github.com/adrianmo/go-nmea"; - fetch = { - type = "git"; - url = "https://github.com/adrianmo/go-nmea"; - rev = "v1.1.0"; - sha256 = "167iwpwdwfbyghqfrzdfvfpvsmj92x7qqy6sx6yngdw21wd0m44f"; - }; - } - { - goPackagePath = "github.com/antchfx/jsonquery"; - fetch = { - type = "git"; - url = "https://github.com/antchfx/jsonquery"; - rev = "v1.0.0"; - sha256 = "04xk7ib059xzl1y87ah41q7vzl3xp99mq8nyccx8hlsng1nc0haw"; - }; - } - { - goPackagePath = "github.com/antchfx/xpath"; - fetch = { - type = "git"; - url = "https://github.com/antchfx/xpath"; - rev = "v1.1.0"; - sha256 = "0bgin15841q009yxbyqfqk5b2yk2f4a1mswjkgiqxgarmql0mpsy"; - }; - } - { - goPackagePath = "github.com/bettercap/gatt"; - fetch = { - type = "git"; - url = "https://github.com/bettercap/gatt"; - rev = "569d3d9372bb"; - sha256 = "0ncg6wd4wkr12l4bs7vyyrd08imyd5y1vdyp7f9shjq9nzv3rzcz"; - }; - } - { - goPackagePath = "github.com/bettercap/nrf24"; - fetch = { - type = "git"; - url = "https://github.com/bettercap/nrf24"; - rev = "aa37e6d0e0eb"; - sha256 = "1y6ffcj94hk7slajqw3lqpdxzx6iqpj2i2zpsvggg6kfaa1iklnj"; - }; - } - { - goPackagePath = "github.com/bettercap/readline"; - fetch = { - type = "git"; - url = "https://github.com/bettercap/readline"; - rev = "9cec905dd291"; - sha256 = "1lsnyckg2l78hz4la8dhwvjsyff706khw10nxds5afzl4mrih3vn"; - }; - } - { - goPackagePath = "github.com/bettercap/recording"; - fetch = { - type = "git"; - url = "https://github.com/bettercap/recording"; - rev = "3ce1dcf032e3"; - sha256 = "1arh12iz15anyrqr4q496lpd0gx5nf2cwyr5rv17rawqqz8ydg23"; - }; - } - { - goPackagePath = "github.com/chifflier/nfqueue-go"; - fetch = { - type = "git"; - url = "https://github.com/chifflier/nfqueue-go"; - rev = "61ca646babef"; - sha256 = "1i1q2xl86f3s9x3j2ffxprwqhcrkh4w23hh4ib7jksxvaq36v33l"; - }; - } - { - goPackagePath = "github.com/chzyer/logex"; - fetch = { - type = "git"; - url = "https://github.com/chzyer/logex"; - rev = "v1.1.10"; - sha256 = "08pbjj3wx9acavlwyr055isa8a5hnmllgdv5k6ra60l5y1brmlq4"; - }; - } - { - goPackagePath = "github.com/chzyer/test"; - fetch = { - type = "git"; - url = "https://github.com/chzyer/test"; - rev = "a1ea475d72b1"; - sha256 = "0rns2aqk22i9xsgyap0pq8wi4cfaxsri4d9q6xxhhyma8jjsnj2k"; - }; - } - { - goPackagePath = "github.com/davecgh/go-spew"; - fetch = { - type = "git"; - url = "https://github.com/davecgh/go-spew"; - rev = "v1.1.1"; - sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; - }; - } - { - goPackagePath = "github.com/dustin/go-humanize"; - fetch = { - type = "git"; - url = "https://github.com/dustin/go-humanize"; - rev = "v1.0.0"; - sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3"; - }; - } - { - goPackagePath = "github.com/elazarl/goproxy"; - fetch = { - type = "git"; - url = "https://github.com/elazarl/goproxy"; - rev = "473e67f1d7d2"; - sha256 = "1xsrdlcgl088phanm81pskym2ry8z1nizvq3lsq0c7cvzb6mrw4p"; - }; - } - { - goPackagePath = "github.com/evilsocket/islazy"; - fetch = { - type = "git"; - url = "https://github.com/evilsocket/islazy"; - rev = "v1.10.4"; - sha256 = "1ayc4di6584yajybh724mcmng069q38j1dpljgi8fhsyhb4sila3"; - }; - } - { - goPackagePath = "github.com/gobwas/glob"; - fetch = { - type = "git"; - url = "https://github.com/gobwas/glob"; - rev = "e7a84e9525fe"; - sha256 = "1v6vjklq06wqddv46ihajahaj1slv0imgaivlxr8bsx59i90js5q"; - }; - } - { - goPackagePath = "github.com/google/go-github"; - fetch = { - type = "git"; - url = "https://github.com/google/go-github"; - rev = "v17.0.0"; - sha256 = "1kvw95l77a5n5rgal9n1xjh58zxb3a40ij1j722b1h4z8yg9jhg4"; - }; - } - { - goPackagePath = "github.com/google/go-querystring"; - fetch = { - type = "git"; - url = "https://github.com/google/go-querystring"; - rev = "v1.0.0"; - sha256 = "0xl12bqyvmn4xcnf8p9ksj9rmnr7s40pvppsdmy8n9bzw1db0iwz"; - }; - } - { - goPackagePath = "github.com/google/gopacket"; - fetch = { - type = "git"; - url = "https://github.com/google/gopacket"; - rev = "v1.1.17"; - sha256 = "192af5z18nnafn35gdy4wahlx6ggbhlnxzlm1yvxjxawfwnilidn"; - }; - } - { - goPackagePath = "github.com/google/gousb"; - fetch = { - type = "git"; - url = "https://github.com/google/gousb"; - rev = "18f4c1d8a750"; - sha256 = "1i7ffkq395x0v1186j9bhfgy67wlq6s840xkyx8wn87w55yd05rh"; - }; - } - { - goPackagePath = "github.com/google/renameio"; - fetch = { - type = "git"; - url = "https://github.com/google/renameio"; - rev = "v0.1.0"; - sha256 = "1ki2x5a9nrj17sn092d6n4zr29lfg5ydv4xz5cp58z6cw8ip43jx"; - }; - } - { - goPackagePath = "github.com/gorilla/mux"; - fetch = { - type = "git"; - url = "https://github.com/gorilla/mux"; - rev = "v1.7.3"; - sha256 = "0vr38zdad3zgg7q7nn24knl8axngj7cgmlwa93m17yhsnlvqi531"; - }; - } - { - goPackagePath = "github.com/gorilla/websocket"; - fetch = { - type = "git"; - url = "https://github.com/gorilla/websocket"; - rev = "v1.4.1"; - sha256 = "03n1n0nwz3k9qshmriycqznnnvd3dkzsfwpnfjzzvafjxk9kyapv"; - }; - } - { - goPackagePath = "github.com/hashicorp/mdns"; - fetch = { - type = "git"; - url = "https://github.com/hashicorp/mdns"; - rev = "v1.0.1"; - sha256 = "185zpyj1jf1jm7hihg73gqnspr0a359aqwv11v4a6mwd5bkdh19j"; - }; - } - { - goPackagePath = "github.com/inconshreveable/go-vhost"; - fetch = { - type = "git"; - url = "https://github.com/inconshreveable/go-vhost"; - rev = "06d84117953b"; - sha256 = "0wliilsybm7xf5h685a23rsm8bnlhkr332pkdkhf32q16sr1a9rk"; - }; - } - { - goPackagePath = "github.com/jpillora/go-tld"; - fetch = { - type = "git"; - url = "https://github.com/jpillora/go-tld"; - rev = "f16ca3b7b383"; - sha256 = "19v8bj14w0lcvysaw84klf5dg6ka351ixz9r6cd9mksdd80nvzcq"; - }; - } - { - goPackagePath = "github.com/kisielk/gotool"; - fetch = { - type = "git"; - url = "https://github.com/kisielk/gotool"; - rev = "v1.0.0"; - sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn"; - }; - } - { - goPackagePath = "github.com/kr/binarydist"; - fetch = { - type = "git"; - url = "https://github.com/kr/binarydist"; - rev = "v0.1.0"; - sha256 = "0hz1yqlxmkdib8xsdkkvn4ian4i69jmfapadim9fhj632d6jpi7w"; - }; - } - { - goPackagePath = "github.com/kr/pretty"; - fetch = { - type = "git"; - url = "https://github.com/kr/pretty"; - rev = "v0.1.0"; - sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp"; - }; - } - { - goPackagePath = "github.com/kr/pty"; - fetch = { - type = "git"; - url = "https://github.com/kr/pty"; - rev = "v1.1.1"; - sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6"; - }; - } - { - goPackagePath = "github.com/kr/text"; - fetch = { - type = "git"; - url = "https://github.com/kr/text"; - rev = "v0.1.0"; - sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1"; - }; - } - { - goPackagePath = "github.com/malfunkt/iprange"; - fetch = { - type = "git"; - url = "https://github.com/malfunkt/iprange"; - rev = "v0.9.0"; - sha256 = "0gv5w678r74jval675xp0y1hzpf7mm5m9apa1rz9krxc9zd0ycr8"; - }; - } - { - goPackagePath = "github.com/mattn/go-colorable"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-colorable"; - rev = "v0.1.4"; - sha256 = "1yxcz08kminqr1221zxpibnbzfcgs3fafin0z9zqb3gqvf74jywz"; - }; - } - { - goPackagePath = "github.com/mattn/go-isatty"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-isatty"; - rev = "v0.0.10"; - sha256 = "0jf4hwfwd2cpxrlyv0jzcia809q2bjw7y1m3ciaj2s8lj2jqyf6r"; - }; - } - { - goPackagePath = "github.com/mdlayher/dhcp6"; - fetch = { - type = "git"; - url = "https://github.com/mdlayher/dhcp6"; - rev = "2a67805d7d0b"; - sha256 = "0xn7canpik3lrz73dcz4jzapq1bfxpnashvjvnvshcpa2n1lh8yw"; - }; - } - { - goPackagePath = "github.com/mgutz/ansi"; - fetch = { - type = "git"; - url = "https://github.com/mgutz/ansi"; - rev = "9520e82c474b"; - sha256 = "00bz22314j26736w1f0q4jy9d9dfaml17vn890n5zqy3cmvmww1j"; - }; - } - { - goPackagePath = "github.com/mgutz/logxi"; - fetch = { - type = "git"; - url = "https://github.com/mgutz/logxi"; - rev = "aebf8a7d67ab"; - sha256 = "1f8sqibkzz9wfplvvblz9s0xvvmhkd2af8ghcsmjw8818gcrzsqx"; - }; - } - { - goPackagePath = "github.com/miekg/dns"; - fetch = { - type = "git"; - url = "https://github.com/miekg/dns"; - rev = "v1.1.22"; - sha256 = "1iv9jznakz8f5swiir0z4zilr9ypavnsc0g4zi1r0vad6npy7zfl"; - }; - } - { - goPackagePath = "github.com/mitchellh/go-homedir"; - fetch = { - type = "git"; - url = "https://github.com/mitchellh/go-homedir"; - rev = "v1.1.0"; - sha256 = "0ydzkipf28hwj2bfxqmwlww47khyk6d152xax4bnyh60f4lq3nx1"; - }; - } - { - goPackagePath = "github.com/pkg/errors"; - fetch = { - type = "git"; - url = "https://github.com/pkg/errors"; - rev = "v0.8.1"; - sha256 = "0g5qcb4d4fd96midz0zdk8b9kz8xkzwfa8kr1cliqbg8sxsy5vd1"; - }; - } - { - goPackagePath = "github.com/pmezard/go-difflib"; - fetch = { - type = "git"; - url = "https://github.com/pmezard/go-difflib"; - rev = "v1.0.0"; - sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; - }; - } - { - goPackagePath = "github.com/robertkrimen/otto"; - fetch = { - type = "git"; - url = "https://github.com/robertkrimen/otto"; - rev = "15f95af6e78d"; - sha256 = "07j7l340lmqwpfscwyb8llk3k37flvs20a4a8vzc85f16xyd9npf"; - }; - } - { - goPackagePath = "github.com/rogpeppe/go-charset"; - fetch = { - type = "git"; - url = "https://github.com/rogpeppe/go-charset"; - rev = "2471d30d28b4"; - sha256 = "1cmkhwkqx1smnsvrr9ah2x5qav0i6vdiq8x4j8j812xspfl69zwx"; - }; - } - { - goPackagePath = "github.com/rogpeppe/go-internal"; - fetch = { - type = "git"; - url = "https://github.com/rogpeppe/go-internal"; - rev = "v1.3.0"; - sha256 = "0mcdh1licgnnahwml9y2iq6xy5x9xmjw5frcnds2s3wpjyqrl216"; - }; - } - { - goPackagePath = "github.com/stretchr/objx"; - fetch = { - type = "git"; - url = "https://github.com/stretchr/objx"; - rev = "v0.1.0"; - sha256 = "19ynspzjdynbi85xw06mh8ad5j0qa1vryvxjgvbnyrr8rbm4vd8w"; - }; - } - { - goPackagePath = "github.com/stretchr/testify"; - fetch = { - type = "git"; - url = "https://github.com/stretchr/testify"; - rev = "v1.3.0"; - sha256 = "0wjchp2c8xbgcbbq32w3kvblk6q6yn533g78nxl6iskq6y95lxsy"; - }; - } - { - goPackagePath = "github.com/tarm/serial"; - fetch = { - type = "git"; - url = "https://github.com/tarm/serial"; - rev = "98f6abe2eb07"; - sha256 = "1yj4jiv2f3x3iawxdflrlmdan0k9xsbnccgc9yz658rmif1ag3pb"; - }; - } - { - goPackagePath = "golang.org/x/crypto"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/crypto"; - rev = "87dc89f01550"; - sha256 = "0z4i1m2yn3f31ci7wvcm2rxkx2yiv7a78mfzklncmsz2k97rlh2g"; - }; - } - { - goPackagePath = "golang.org/x/mod"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/mod"; - rev = "4bf6d317e70e"; - sha256 = "19lg1ly3j31anx92p0hynic1gjk417wwxphfdrb2cq1c19kj3r17"; - }; - } - { - goPackagePath = "golang.org/x/net"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/net"; - rev = "da9a3fd4c582"; - sha256 = "0iavs400534jn7drmdphx0f18vgg060p2r59xw5d85ji1l5rin1l"; - }; - } - { - goPackagePath = "golang.org/x/sync"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sync"; - rev = "112230192c58"; - sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn"; - }; - } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "727590c5006e"; - sha256 = "0891pfmc73hyr6hrsq1mkk3lasxa8fz4vlnljnzz6yihmhz9ab6a"; - }; - } - { - goPackagePath = "golang.org/x/text"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/text"; - rev = "v0.3.2"; - sha256 = "0flv9idw0jm5nm8lx25xqanbkqgfiym6619w575p7nrdh0riqwqh"; - }; - } - { - goPackagePath = "golang.org/x/tools"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/tools"; - rev = "2ca718005c18"; - sha256 = "1nl4cw8vrfigab0hij86vl2mmhfmyim69r7vy5qk2v60g8frvgxg"; - }; - } - { - goPackagePath = "golang.org/x/xerrors"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/xerrors"; - rev = "a985d3407aa7"; - sha256 = "00wzr5w8aadipgc3rkk8f11i41znskfj9ix5nhhaxyg7isrslgcj"; - }; - } - { - goPackagePath = "gopkg.in/check.v1"; - fetch = { - type = "git"; - url = "https://gopkg.in/check.v1"; - rev = "788fd7840127"; - sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"; - }; - } - { - goPackagePath = "gopkg.in/errgo.v2"; - fetch = { - type = "git"; - url = "https://gopkg.in/errgo.v2"; - rev = "v2.1.0"; - sha256 = "065mbihiy7q67wnql0bzl9y1kkvck5ivra68254zbih52jxwrgr2"; - }; - } - { - goPackagePath = "gopkg.in/sourcemap.v1"; - fetch = { - type = "git"; - url = "https://gopkg.in/sourcemap.v1"; - rev = "v1.0.5"; - sha256 = "08rf2dl13hbnm3fq2cm0nnsspy9fhf922ln23cz5463cv7h62as4"; - }; - } - { - goPackagePath = "honnef.co/go/tools"; - fetch = { - type = "git"; - url = "https://github.com/dominikh/go-tools"; - rev = "v0.0.0-2019.2.1"; - sha256 = "1frpy4pl9yp6j00mjj2yss3k8hip0cc7b5i5mz61n3dlw0kga9z1"; - }; - } -]