about summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-04-21 08:29:51 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-04-21 08:29:51 +0200
commit803b3d296c7fbc4daf5ae4d712204f8b28c0834a (patch)
treeafb2a1e3e1489050764a358d850e4804e516587c /pkgs/tools/networking
parentd2d7fbc431a06ec58f537921dc1b898167a69adc (diff)
parentb71232fc53af1d7c7fcbb05d3e42ff5f562912ca (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/ferm/default.nix10
-rw-r--r--pkgs/tools/networking/mitmproxy/default.nix50
-rw-r--r--pkgs/tools/networking/mitmproxy/pytest5.patch31
-rw-r--r--pkgs/tools/networking/modem-manager/default.nix2
-rw-r--r--pkgs/tools/networking/mu/default.nix19
-rw-r--r--pkgs/tools/networking/rshijack/default.nix23
-rw-r--r--pkgs/tools/networking/wifite2/default.nix4
7 files changed, 50 insertions, 89 deletions
diff --git a/pkgs/tools/networking/ferm/default.nix b/pkgs/tools/networking/ferm/default.nix
index dcd3fc6ae99fa..8fcdeb234ec36 100644
--- a/pkgs/tools/networking/ferm/default.nix
+++ b/pkgs/tools/networking/ferm/default.nix
@@ -1,12 +1,14 @@
 { stdenv, fetchurl, makeWrapper, perl, ebtables, ipset, iptables, nixosTests }:
 
-stdenv.mkDerivation rec {
-  version = "2.4.1";
+let
+  inherit (stdenv.lib.versions) majorMinor;
+in stdenv.mkDerivation rec {
+  version = "2.5";
   pname = "ferm";
 
   src = fetchurl {
-    url = "http://ferm.foo-projects.org/download/2.4/ferm-${version}.tar.xz";
-    sha256 = "1fv8wk513yysp4q0i65rl2m0hg2lxwwgk9ppprsca1xcxrdpsvwa";
+    url = "http://ferm.foo-projects.org/download/${majorMinor version}/ferm-${version}.tar.xz";
+    sha256 = "0lxqcpirphihpvdqrh5kq0621aqq0h2vdy9q2v85gqdhd52js20p";
   };
 
   buildInputs = [ perl ipset ebtables iptables makeWrapper ];
diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix
index 7a623ab69a68b..b9d873fad6af4 100644
--- a/pkgs/tools/networking/mitmproxy/default.nix
+++ b/pkgs/tools/networking/mitmproxy/default.nix
@@ -4,47 +4,15 @@ with python3Packages;
 
 buildPythonPackage rec {
   pname = "mitmproxy";
-  version = "4.0.4";
+  version = "5.1.1";
 
   src = fetchFromGitHub {
     owner  = pname;
     repo   = pname;
     rev    = "v${version}";
-    sha256 = "14i9dkafvyl15rq2qa8xldscn5lmkk2g52kbi2hl63nzx9yibx6r";
+    sha256 = "1lirlckpvd3c6s6q3p32w4k4yfna5mlgr1x9g39lhzzq0sdiz3lk";
   };
 
-  patches = [
-    (fetchpatch {
-      # Tests failed due to expired test certificates,
-      # https://github.com/mitmproxy/mitmproxy/issues/3316
-      # TODO: remove on next update
-      name = "test-certificates.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/1b6a8d6acd3d70f9b9627ad4ae9def08103f8250.patch";
-      sha256 = "03y79c25yir7d8xj79czdc81y3irqq1i3ks9ca0mv1az8b7xsvfv";
-    })
-    (fetchpatch {
-      # 0.13 <= wsproto < 0.14 patch
-      # https://github.com/mitmproxy/mitmproxy/issues/3459
-      # TODO: remove on next update
-      name = "wsproto-0.13.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/70777a1b6ed64af9cafcdef223a8a260ecc96864.patch";
-      sha256 = "1ddxdr7js510kzyq3gyks4k5k1n8zb1i9amxw7wzmi1dcg8kqw9a";
-      # We strip these bounds anyway
-      excludes = [ "setup.py" ];
-    })
-    (fetchpatch {
-      # Fix for newer pytest disallowing calling fixtures
-      # https://github.com/mitmproxy/mitmproxy/issues/3403
-      # TODO: remove on next update
-      name = "dont-call-fixtures.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/ce28721458c8cc71de86513a5110676e9763041b.patch";
-      sha256 = "05pljr28lx7l1xgswqr9sz8dnhvc7npzh8xg2p9hignf159kd54d";
-      # Irrelevant in nixpkgs
-      excludes = [ "setup.py" "setup.cfg" "release/docker/*" ];
-    })
-    ./pytest5.patch
-  ];
-
   postPatch = ''
     # remove dependency constraints
     sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?//' -i setup.py
@@ -61,17 +29,21 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [
-    blinker click certifi cryptography
-    h2 hyperframe kaitaistruct passlib
-    pyasn1 pyopenssl pyparsing pyperclip
-    ruamel_yaml tornado urwid brotlipy
-    sortedcontainers ldap3 wsproto setuptools
+    blinker brotli certifi cffi
+    click cryptography flask h11
+    h2 hpack hyperframe itsdangerous
+    jinja2 kaitaistruct ldap3 markupsafe
+    passlib protobuf publicsuffix2 pyasn1
+    pycparser pyopenssl pyparsing pyperclip
+    ruamel_yaml setuptools six sortedcontainers
+    tornado urwid werkzeug wsproto zstandard
   ];
 
   checkInputs = [
     beautifulsoup4 flask pytest
     requests glibcLocales
     asynctest parver pytest-asyncio
+    hypothesis
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/mitmproxy/pytest5.patch b/pkgs/tools/networking/mitmproxy/pytest5.patch
deleted file mode 100644
index bfbf7253b9c40..0000000000000
--- a/pkgs/tools/networking/mitmproxy/pytest5.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/test/mitmproxy/net/test_tls.py b/test/mitmproxy/net/test_tls.py
-index 489bf89f..c78472e3 100644
---- a/test/mitmproxy/net/test_tls.py
-+++ b/test/mitmproxy/net/test_tls.py
-@@ -87,14 +87,16 @@ def test_get_client_hello():
-     rfile = io.BufferedReader(io.BytesIO(
-         FULL_CLIENT_HELLO_NO_EXTENSIONS[:30]
-     ))
--    with pytest.raises(exceptions.TlsProtocolException, message="Unexpected EOF"):
-+    with pytest.raises(exceptions.TlsProtocolException):
-         tls.get_client_hello(rfile)
-+        pytest.fail("Unexpected EOF")
- 
-     rfile = io.BufferedReader(io.BytesIO(
-         b"GET /"
-     ))
--    with pytest.raises(exceptions.TlsProtocolException, message="Expected TLS record"):
-+    with pytest.raises(exceptions.TlsProtocolException):
-         tls.get_client_hello(rfile)
-+        pytest.fail("Expected TLS record")
- 
- 
- class TestClientHello:
-@@ -153,5 +155,6 @@ class TestClientHello:
-             b"\x01\x00\x00\x03" +  # handshake header
-             b"foo"
-         ))
--        with pytest.raises(exceptions.TlsProtocolException, message='Cannot parse Client Hello'):
-+        with pytest.raises(exceptions.TlsProtocolException):
-             tls.ClientHello.from_file(rfile)
-+            pytest.fail('Cannot parse Client Hello')
diff --git a/pkgs/tools/networking/modem-manager/default.nix b/pkgs/tools/networking/modem-manager/default.nix
index bf702261258f6..7329d78c2c832 100644
--- a/pkgs/tools/networking/modem-manager/default.nix
+++ b/pkgs/tools/networking/modem-manager/default.nix
@@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
     export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon"
   '';
 
+  enableParallelBuilding = true;
+
   doCheck = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/mu/default.nix b/pkgs/tools/networking/mu/default.nix
index 2e6a401350cdc..ae1ca3f776113 100644
--- a/pkgs/tools/networking/mu/default.nix
+++ b/pkgs/tools/networking/mu/default.nix
@@ -5,20 +5,15 @@
 
 stdenv.mkDerivation rec {
   pname = "mu";
-  version = "1.2";
+  version = "1.4.1";
 
   src = fetchFromGitHub {
     owner  = "djcb";
     repo   = "mu";
     rev    = version;
-    sha256 = "0yhjlj0z23jw3cf2wfnl98y8q6gikvmhkb8vdm87bd7jw0bdnrfz";
+    sha256 = "0q2ik7fj5k9i76js4ijyxbgrwqff437lass0sd5if2r40rqh0as0";
   };
 
-  # test-utils coredumps so don't run those
-  postPatch = ''
-    sed -i -e '/test-utils/d' lib/parser/Makefile.am
-  '';
-
   buildInputs = [
     sqlite xapian glib gmime3 texinfo emacs guile libsoup icu
   ] ++ stdenv.lib.optionals withMug [ gtk3 webkitgtk ];
@@ -27,19 +22,17 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  preConfigure = "./autogen.sh";
+
   preBuild = ''
     # Fix mu4e-builddir (set it to $out)
     substituteInPlace mu4e/mu4e-meta.el.in \
       --replace "@abs_top_builddir@" "$out"
-
-    # We install msg2pdf to bin/msg2pdf, fix its location in elisp
-    substituteInPlace mu4e/mu4e-actions.el \
-      --replace "/toys/msg2pdf/" "/bin/"
   '';
 
-  # Install mug and msg2pdf
+  # Install mug
   postInstall = stdenv.lib.optionalString withMug ''
-    for f in msg2pdf mug ; do
+    for f in mug ; do
       install -m755 toys/$f/$f $out/bin/$f
     done
   '';
diff --git a/pkgs/tools/networking/rshijack/default.nix b/pkgs/tools/networking/rshijack/default.nix
new file mode 100644
index 0000000000000..59558028c01e7
--- /dev/null
+++ b/pkgs/tools/networking/rshijack/default.nix
@@ -0,0 +1,23 @@
+{ lib, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rshijack";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "kpcyrd";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0y01hi3jpfawqlqs8ka0vwfhjw5j5gkhk2nz5m13ns2h27bw20v7";
+  };
+
+  cargoSha256 = "0l1kavacnjvi22l6pawgkqqxnjaizi3pddqkhwjshw4pzzixzvli";
+
+  meta = with lib; {
+    description = "TCP connection hijacker";
+    homepage = "https://github.com/kpcyrd/rshijack";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ xrelkd ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/networking/wifite2/default.nix b/pkgs/tools/networking/wifite2/default.nix
index 8ff0c6d84ab5d..505e461e48062 100644
--- a/pkgs/tools/networking/wifite2/default.nix
+++ b/pkgs/tools/networking/wifite2/default.nix
@@ -3,14 +3,14 @@
 , hcxdumptool, pyrit, which }:
 
 python3.pkgs.buildPythonApplication rec {
-  version = "2.5.2";
+  version = "2.5.3";
   pname = "wifite2";
 
   src = fetchFromGitHub {
     owner = "kimocoder";
     repo = "wifite2";
     rev = version;
-    sha256 = "0hsb59d86szn27s3hynpzkp49rmw4g692vrl67nal7rfcdvpp8hb";
+    sha256 = "080hbjpbgdnzr6jkmg5cb8dvzxm57zpi4c9x0y92yy472vqll3ax";
   };
 
   patches = [