From cb7d50dc6a81dc470cbb744de8473f8a881ec4fe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Jul 2021 09:59:28 +0200 Subject: [PATCH 1/4] python3Packages.ROPGadget: 6.5 -> 6.6 --- .../python-modules/ROPGadget/default.nix | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/ROPGadget/default.nix b/pkgs/development/python-modules/ROPGadget/default.nix index 6be0ed48e289..aaf31f06a1cc 100644 --- a/pkgs/development/python-modules/ROPGadget/default.nix +++ b/pkgs/development/python-modules/ROPGadget/default.nix @@ -1,16 +1,30 @@ -{ lib, buildPythonPackage, fetchPypi -, capstone}: +{ lib +, buildPythonPackage +, fetchFromGitHub +, capstone +}: buildPythonPackage rec { - pname = "ROPGadget"; + pname = "ropgadget"; version = "6.6"; - src = fetchPypi { - inherit pname version; - sha256 = "dc61186e0114ec67ec7ce374df8fd2ddc2a7cba129a1242338e900a7483fba22"; + src = fetchFromGitHub { + owner = "JonathanSalwan"; + repo = "ROPgadget"; + rev = "v${version}"; + sha256 = "1i0gx0cwhxk6d8byvck17hh83szz3k6ndd118ha3q0r0msap0lz1"; }; - propagatedBuildInputs = [ capstone ]; + propagatedBuildInputs = [ + capstone + ]; + + # Test suite is working with binaries + doCheck = false; + + pythonImportsCheck = [ + "ropgadget" + ]; meta = with lib; { description = "Tool to search for gadgets in binaries to facilitate ROP exploitation"; From 112d6127a098651d4232809a128e54d1d91a1c65 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Jul 2021 10:04:43 +0200 Subject: [PATCH 2/4] python3Packages.ropgadget: rename from ROPGadget --- .../python-modules/{ROPGadget => ropgadget}/default.nix | 0 pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) rename pkgs/development/python-modules/{ROPGadget => ropgadget}/default.nix (100%) diff --git a/pkgs/development/python-modules/ROPGadget/default.nix b/pkgs/development/python-modules/ropgadget/default.nix similarity index 100% rename from pkgs/development/python-modules/ROPGadget/default.nix rename to pkgs/development/python-modules/ropgadget/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41337a999a83..df794c802a87 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3505,6 +3505,8 @@ with pkgs; restream = callPackage ../applications/misc/remarkable/restream { }; + ropgadget = with python3Packages; toPythonApplication ropgadget; + ryujinx = callPackage ../misc/emulators/ryujinx { }; scour = with python3Packages; toPythonApplication scour; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 7c7c0133ee9d..89a8bbd2e24c 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -90,6 +90,7 @@ mapAliases ({ scikitlearn = scikit-learn; # added 2021-07-21 selectors34 = throw "selectors34 has been removed: functionality provided by Python itself; archived by upstream."; # added 2021-06-10 setuptools_scm = setuptools-scm; # added 2021-06-03 + ROPGadget = ropgadget; # added 2021-07-06 smart_open = smart-open; # added 2021-03-14 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14 sphinxcontrib_plantuml = sphinxcontrib-plantuml; # added 2021-08-02 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4bf25880ad3b..d14767b19596 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8262,7 +8262,7 @@ in { rope = callPackage ../development/python-modules/rope { }; - ROPGadget = callPackage ../development/python-modules/ROPGadget { }; + ropgadget = callPackage ../development/python-modules/ropgadget { }; ropper = callPackage ../development/python-modules/ropper { }; From ba01d17d49d4ebed6ad5755932c620aeb2052e48 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 00:10:24 +0100 Subject: [PATCH 3/4] python3Packages.pwntools: update ropgadget --- pkgs/development/python-modules/pwntools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 6241a7d86e46..cfcbf14703b0 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -6,7 +6,7 @@ , packaging , pysocks , pygments -, ROPGadget +, ropgadget , capstone , colored-traceback , paramiko @@ -55,7 +55,7 @@ buildPythonPackage rec { packaging pysocks pygments - ROPGadget + ropgadget capstone colored-traceback paramiko From ddcf2bb8c1911aa4c46b08cd4d711d6389f348ca Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 00:13:01 +0100 Subject: [PATCH 4/4] pwndbg: update ropgadget --- pkgs/development/tools/misc/pwndbg/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/pwndbg/default.nix b/pkgs/development/tools/misc/pwndbg/default.nix index 9aa11f35957f..01b399e15a39 100644 --- a/pkgs/development/tools/misc/pwndbg/default.nix +++ b/pkgs/development/tools/misc/pwndbg/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , python3 , fetchFromGitHub , makeWrapper @@ -13,7 +14,7 @@ let pycparser pyelftools python-ptrace - ROPGadget + ropgadget six unicorn pygments