bettercap: 1.6.2 -> 2.4.0

bettercap 2 is a complete reimplementation using go instead of ruby
See: https://www.evilsocket.net/2018/02/27/All-hail-bettercap-2-0-one-tool-to-rule-them-all/

+243 -173
-2
pkgs/tools/security/bettercap/Gemfile
··· 1 - source 'https://rubygems.org' 2 - gem 'bettercap'
···
-42
pkgs/tools/security/bettercap/Gemfile.lock
··· 1 - GEM 2 - remote: https://rubygems.org/ 3 - specs: 4 - bettercap (1.6.2) 5 - colorize (~> 0.8.0) 6 - em-proxy (~> 0.1, >= 0.1.8) 7 - net-dns (~> 0.8, >= 0.8.0) 8 - network_interface (~> 0.0, >= 0.0.1) 9 - packetfu (~> 1.1, >= 1.1.10) 10 - pcaprub (~> 0.12, >= 0.12.0, <= 1.1.11) 11 - rubydns (~> 1.0, >= 1.0.3) 12 - celluloid (0.16.0) 13 - timers (~> 4.0.0) 14 - celluloid-io (0.16.2) 15 - celluloid (>= 0.16.0) 16 - nio4r (>= 1.1.0) 17 - colorize (0.8.1) 18 - em-proxy (0.1.9) 19 - eventmachine 20 - eventmachine (1.2.5) 21 - hitimes (1.2.6) 22 - net-dns (0.8.0) 23 - network_interface (0.0.2) 24 - nio4r (2.2.0) 25 - packetfu (1.1.13) 26 - pcaprub 27 - pcaprub (0.12.4) 28 - rubydns (1.0.3) 29 - celluloid (= 0.16.0) 30 - celluloid-io (= 0.16.2) 31 - timers (~> 4.0.1) 32 - timers (4.0.4) 33 - hitimes 34 - 35 - PLATFORMS 36 - ruby 37 - 38 - DEPENDENCIES 39 - bettercap 40 - 41 - BUNDLED WITH 42 - 1.14.6
···
+15 -8
pkgs/tools/security/bettercap/default.nix
··· 1 - { lib, bundlerEnv, ruby, libpcap}: 2 3 - bundlerEnv rec { 4 name = "bettercap-${version}"; 5 6 - version = (import gemset).bettercap.version; 7 - inherit ruby; 8 - gemdir = ./.; 9 - gemset = ./gemset.nix; 10 11 - buildInputs = [ libpcap ruby ]; 12 13 - meta = with lib; { 14 description = "A man in the middle tool"; 15 longDescription = '' 16 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.
··· 1 + { stdenv, buildGoPackage, fetchFromGitHub, pkgconfig, libpcap, libnfnetlink, libnetfilter_queue }: 2 3 + buildGoPackage rec { 4 name = "bettercap-${version}"; 5 + version = "2.4"; 6 7 + goPackagePath = "github.com/bettercap/bettercap"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "bettercap"; 11 + repo = "bettercap"; 12 + rev = "v${version}"; 13 + sha256 = "1k1ank8z9sr3vxm86dfcrn1y3qa3gfwyb2z0fvkvi38gc88pfljb"; 14 + }; 15 + 16 + buildInputs = [libpcap libnfnetlink libnetfilter_queue pkgconfig]; 17 18 + goDeps = ./deps.nix; 19 20 + meta = with stdenv.lib; { 21 description = "A man in the middle tool"; 22 longDescription = '' 23 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.
+228
pkgs/tools/security/bettercap/deps.nix
···
··· 1 + # file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) 2 + [ 3 + { 4 + goPackagePath = "github.com/adrianmo/go-nmea"; 5 + fetch = { 6 + type = "git"; 7 + url = "https://github.com/adrianmo/go-nmea"; 8 + rev = "22095aa1b48050243d3eb9a001ca80eb91a0c6fa"; 9 + sha256 = "0hgjfmnff794j537kbrjcsxzr9xyggm09rw3wp2xrzahh9pxdlm5"; 10 + }; 11 + } 12 + { 13 + goPackagePath = "github.com/bettercap/gatt"; 14 + fetch = { 15 + type = "git"; 16 + url = "https://github.com/bettercap/gatt"; 17 + rev = "6475b946a0bff32e906c25d861f2b1c6d2056baa"; 18 + sha256 = "0f2n35yz6fcbmswy1wyv2z72d3iia7xxapjkvwkbj2zqfxxwn26s"; 19 + }; 20 + } 21 + { 22 + goPackagePath = "github.com/bettercap/readline"; 23 + fetch = { 24 + type = "git"; 25 + url = "https://github.com/bettercap/readline"; 26 + rev = "9cec905dd29109b64e6752507fba73474c2efd46"; 27 + sha256 = "1lsnyckg2l78hz4la8dhwvjsyff706khw10nxds5afzl4mrih3vn"; 28 + }; 29 + } 30 + { 31 + goPackagePath = "github.com/chifflier/nfqueue-go"; 32 + fetch = { 33 + type = "git"; 34 + url = "https://github.com/chifflier/nfqueue-go"; 35 + rev = "61ca646babef3bd4dea1deb610bfb0005c0a1298"; 36 + sha256 = "1i1q2xl86f3s9x3j2ffxprwqhcrkh4w23hh4ib7jksxvaq36v33l"; 37 + }; 38 + } 39 + { 40 + goPackagePath = "github.com/dustin/go-humanize"; 41 + fetch = { 42 + type = "git"; 43 + url = "https://github.com/dustin/go-humanize"; 44 + rev = "bb3d318650d48840a39aa21a027c6630e198e626"; 45 + sha256 = "1lqd8ix3cb164j5iazjby2jpa6bdsflhy0h9mi4yldvvcvrc194c"; 46 + }; 47 + } 48 + { 49 + goPackagePath = "github.com/elazarl/goproxy"; 50 + fetch = { 51 + type = "git"; 52 + url = "https://github.com/elazarl/goproxy"; 53 + rev = "a96fa3a318260eab29abaf32f7128c9eb07fb073"; 54 + sha256 = "0grm4n28mkj2w4c42ghl797svxykv1z3hsdi1ihnrvq6pr08xky4"; 55 + }; 56 + } 57 + { 58 + goPackagePath = "github.com/google/go-github"; 59 + fetch = { 60 + type = "git"; 61 + url = "https://github.com/google/go-github"; 62 + rev = "437797734d06eec5394734a84cb5b59c82a66ee6"; 63 + sha256 = "09ajj73rwsxc03dmm39g8b0qaz88h6gnraw2xn8h7z57qqv6ikcx"; 64 + }; 65 + } 66 + { 67 + goPackagePath = "github.com/google/go-querystring"; 68 + fetch = { 69 + type = "git"; 70 + url = "https://github.com/google/go-querystring"; 71 + rev = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"; 72 + sha256 = "0lkbm067nhmxk66pyjx59d77dbjjzwyi43gdvzyx2f8m1942rq7f"; 73 + }; 74 + } 75 + { 76 + goPackagePath = "github.com/google/gopacket"; 77 + fetch = { 78 + type = "git"; 79 + url = "https://github.com/google/gopacket"; 80 + rev = "1d3841317373a001d49e2abcc5be4e442211d454"; 81 + sha256 = "1jffnrvrma3rm5zxmig52145y9bxc3b4ys4jr1nwmq43jk15s3kp"; 82 + }; 83 + } 84 + { 85 + goPackagePath = "github.com/gorilla/context"; 86 + fetch = { 87 + type = "git"; 88 + url = "https://github.com/gorilla/context"; 89 + rev = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"; 90 + sha256 = "03p4hn87vcmfih0p9w663qbx9lpsf7i7j3lc7yl7n84la3yz63m4"; 91 + }; 92 + } 93 + { 94 + goPackagePath = "github.com/gorilla/mux"; 95 + fetch = { 96 + type = "git"; 97 + url = "https://github.com/gorilla/mux"; 98 + rev = "4dbd923b0c9e99ff63ad54b0e9705ff92d3cdb06"; 99 + sha256 = "02d5c3vh81v2j6g6fnca87ksxjx0xrgp7x7iivfw5x92q1l5h254"; 100 + }; 101 + } 102 + { 103 + goPackagePath = "github.com/gorilla/websocket"; 104 + fetch = { 105 + type = "git"; 106 + url = "https://github.com/gorilla/websocket"; 107 + rev = "eb925808374e5ca90c83401a40d711dc08c0c0f6"; 108 + sha256 = "0swncxnl97pmsl78q1p4npx9jghnrzj7alkxab89jy9cza5w165x"; 109 + }; 110 + } 111 + { 112 + goPackagePath = "github.com/inconshreveable/go-vhost"; 113 + fetch = { 114 + type = "git"; 115 + url = "https://github.com/inconshreveable/go-vhost"; 116 + rev = "06d84117953b22058c096b49a429ebd4f3d3d97b"; 117 + sha256 = "0wliilsybm7xf5h685a23rsm8bnlhkr332pkdkhf32q16sr1a9rk"; 118 + }; 119 + } 120 + { 121 + goPackagePath = "github.com/jpillora/go-tld"; 122 + fetch = { 123 + type = "git"; 124 + url = "https://github.com/jpillora/go-tld"; 125 + rev = "a31ae10e978ab5f352c5dad2cfbd60546dcea75f"; 126 + sha256 = "1gfxnbr1xsnlja2qpqxis8ynnk1lrz9c65aah7vc2c44g8vyy78x"; 127 + }; 128 + } 129 + { 130 + goPackagePath = "github.com/malfunkt/iprange"; 131 + fetch = { 132 + type = "git"; 133 + url = "https://github.com/malfunkt/iprange"; 134 + rev = "3a31f5ed42d2d8a1fc46f1be91fd693bdef2dd52"; 135 + sha256 = "0gv5w678r74jval675xp0y1hzpf7mm5m9apa1rz9krxc9zd0ycr8"; 136 + }; 137 + } 138 + { 139 + goPackagePath = "github.com/mattn/go-colorable"; 140 + fetch = { 141 + type = "git"; 142 + url = "https://github.com/mattn/go-colorable"; 143 + rev = "efa589957cd060542a26d2dd7832fd6a6c6c3ade"; 144 + sha256 = "0kshi4hvm0ayrsxqxy0599iv81kryhd2fn9lwjyczpj593cq069r"; 145 + }; 146 + } 147 + { 148 + goPackagePath = "github.com/mattn/go-isatty"; 149 + fetch = { 150 + type = "git"; 151 + url = "https://github.com/mattn/go-isatty"; 152 + rev = "6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"; 153 + sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; 154 + }; 155 + } 156 + { 157 + goPackagePath = "github.com/mdlayher/dhcp6"; 158 + fetch = { 159 + type = "git"; 160 + url = "https://github.com/mdlayher/dhcp6"; 161 + rev = "e26af0688e455a82b14ebdbecf43f87ead3c4624"; 162 + sha256 = "0fvw8zz2yhla03jfb79bby9vg4rbmaj39v00ypb8yl4fb696zfip"; 163 + }; 164 + } 165 + { 166 + goPackagePath = "github.com/mgutz/ansi"; 167 + fetch = { 168 + type = "git"; 169 + url = "https://github.com/mgutz/ansi"; 170 + rev = "9520e82c474b0a04dd04f8a40959027271bab992"; 171 + sha256 = "00bz22314j26736w1f0q4jy9d9dfaml17vn890n5zqy3cmvmww1j"; 172 + }; 173 + } 174 + { 175 + goPackagePath = "github.com/mgutz/logxi"; 176 + fetch = { 177 + type = "git"; 178 + url = "https://github.com/mgutz/logxi"; 179 + rev = "aebf8a7d67ab4625e0fd4a665766fef9a709161b"; 180 + sha256 = "1f8sqibkzz9wfplvvblz9s0xvvmhkd2af8ghcsmjw8818gcrzsqx"; 181 + }; 182 + } 183 + { 184 + goPackagePath = "github.com/pkg/errors"; 185 + fetch = { 186 + type = "git"; 187 + url = "https://github.com/pkg/errors"; 188 + rev = "816c9085562cd7ee03e7f8188a1cfd942858cded"; 189 + sha256 = "1ws5crb7c70wdicavl6qr4g03nn6m92zd6wwp9n2ygz5c8rmxh8k"; 190 + }; 191 + } 192 + { 193 + goPackagePath = "github.com/robertkrimen/otto"; 194 + fetch = { 195 + type = "git"; 196 + url = "https://github.com/robertkrimen/otto"; 197 + rev = "6c383dd335ef8dcccef05e651ce1eccfe4d0f011"; 198 + sha256 = "1n6h7c8gi6wv4nklqd7ygzx2afvh7ddxbml9w9x0jxwcfb3bdy17"; 199 + }; 200 + } 201 + { 202 + goPackagePath = "github.com/tarm/serial"; 203 + fetch = { 204 + type = "git"; 205 + url = "https://github.com/tarm/serial"; 206 + rev = "eaafced92e9619f03c72527efeab21e326f3bc36"; 207 + sha256 = "09pii3q72bygv40v9xsh3nzj821iwqwa0b14wvkagid8mfnl3a7k"; 208 + }; 209 + } 210 + { 211 + goPackagePath = "golang.org/x/sys"; 212 + fetch = { 213 + type = "git"; 214 + url = "https://go.googlesource.com/sys"; 215 + rev = "378d26f46672a356c46195c28f61bdb4c0a781dd"; 216 + sha256 = "1d02saysx8lh2wv8s915k4shiqicg4j1fh6sxmcxy6bvywax2q9c"; 217 + }; 218 + } 219 + { 220 + goPackagePath = "gopkg.in/sourcemap.v1"; 221 + fetch = { 222 + type = "git"; 223 + url = "https://github.com/go-sourcemap/sourcemap"; 224 + rev = "b019cc30c1eaa584753491b0d8f8c1534bf1eb44"; 225 + sha256 = "03k44fdrnknba05f7cd58lq4rzk7jdpiqksmc0wxrdzwschrbgw8"; 226 + }; 227 + } 228 + ]
-121
pkgs/tools/security/bettercap/gemset.nix
··· 1 - { 2 - bettercap = { 3 - dependencies = ["colorize" "em-proxy" "net-dns" "network_interface" "packetfu" "pcaprub" "rubydns"]; 4 - source = { 5 - remotes = ["https://rubygems.org"]; 6 - sha256 = "1mns96yfyfnksk720p8k83qkwwsid4sicwgrzxaa9gbc53aalll0"; 7 - type = "gem"; 8 - }; 9 - version = "1.6.2"; 10 - }; 11 - celluloid = { 12 - dependencies = ["timers"]; 13 - source = { 14 - remotes = ["https://rubygems.org"]; 15 - sha256 = "044xk0y7i1xjafzv7blzj5r56s7zr8nzb619arkrl390mf19jxv3"; 16 - type = "gem"; 17 - }; 18 - version = "0.16.0"; 19 - }; 20 - celluloid-io = { 21 - dependencies = ["celluloid" "nio4r"]; 22 - source = { 23 - remotes = ["https://rubygems.org"]; 24 - sha256 = "1l1x0p6daa5vskywrvaxdlanwib3k5pps16axwyy4p8d49pn9rnx"; 25 - type = "gem"; 26 - }; 27 - version = "0.16.2"; 28 - }; 29 - colorize = { 30 - source = { 31 - remotes = ["https://rubygems.org"]; 32 - sha256 = "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"; 33 - type = "gem"; 34 - }; 35 - version = "0.8.1"; 36 - }; 37 - em-proxy = { 38 - dependencies = ["eventmachine"]; 39 - source = { 40 - remotes = ["https://rubygems.org"]; 41 - sha256 = "1yzkg6jkmcg859b5mf13igpf8q2bjhsmqjsva05948fi733w5n2j"; 42 - type = "gem"; 43 - }; 44 - version = "0.1.9"; 45 - }; 46 - eventmachine = { 47 - source = { 48 - remotes = ["https://rubygems.org"]; 49 - sha256 = "075hdw0fgzldgss3xaqm2dk545736khcvv1fmzbf1sgdlkyh1v8z"; 50 - type = "gem"; 51 - }; 52 - version = "1.2.5"; 53 - }; 54 - hitimes = { 55 - source = { 56 - remotes = ["https://rubygems.org"]; 57 - sha256 = "06222h9236jw9jgmdlpi0q7psac1shvxqxqx905qkvabmxdxlfar"; 58 - type = "gem"; 59 - }; 60 - version = "1.2.6"; 61 - }; 62 - net-dns = { 63 - source = { 64 - remotes = ["https://rubygems.org"]; 65 - sha256 = "12nal6vhdyg0pbcqpsxqr59h7mbgdhcqp3v0xnzvy167n40gabf9"; 66 - type = "gem"; 67 - }; 68 - version = "0.8.0"; 69 - }; 70 - network_interface = { 71 - source = { 72 - remotes = ["https://rubygems.org"]; 73 - sha256 = "1xh4knfq77ii4pjzsd2z1p3nd6nrcdjhb2vi5gw36jqj43ffw0zp"; 74 - type = "gem"; 75 - }; 76 - version = "0.0.2"; 77 - }; 78 - nio4r = { 79 - source = { 80 - remotes = ["https://rubygems.org"]; 81 - sha256 = "0jjrj7vs29w6dfgsxq08226jfbi2j0x62lf4p9zmvyp19dj4z00a"; 82 - type = "gem"; 83 - }; 84 - version = "2.2.0"; 85 - }; 86 - packetfu = { 87 - dependencies = ["pcaprub"]; 88 - source = { 89 - remotes = ["https://rubygems.org"]; 90 - sha256 = "16ppq9wfxq4x2hss61l5brs3s6fmi8gb50mnp1nnnzb1asq4g8ll"; 91 - type = "gem"; 92 - }; 93 - version = "1.1.13"; 94 - }; 95 - pcaprub = { 96 - source = { 97 - remotes = ["https://rubygems.org"]; 98 - sha256 = "0pl4lqy7308185pfv0197n8b4v20fhd0zb3wlpz284rk8ssclkvz"; 99 - type = "gem"; 100 - }; 101 - version = "0.12.4"; 102 - }; 103 - rubydns = { 104 - dependencies = ["celluloid" "celluloid-io" "timers"]; 105 - source = { 106 - remotes = ["https://rubygems.org"]; 107 - sha256 = "1cvj8li8shz7zn1rc5hdrkqmvr9j187g4y28mvkfvmv1j9hdln62"; 108 - type = "gem"; 109 - }; 110 - version = "1.0.3"; 111 - }; 112 - timers = { 113 - dependencies = ["hitimes"]; 114 - source = { 115 - remotes = ["https://rubygems.org"]; 116 - sha256 = "1jx4wb0x182gmbcs90vz0wzfyp8afi1mpl9w5ippfncyk4kffvrz"; 117 - type = "gem"; 118 - }; 119 - version = "4.0.4"; 120 - }; 121 - }
···