about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-05-20 17:53:49 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2023-05-20 17:53:49 +0200
commite553dbe0a61ba92b0d7b9f73777c2b3033865aa3 (patch)
tree9fcb1dd3dd0c760ff41f1fec95de7e6fa9b62ff3
parentb7a9deb5bd778e53be505ce8d10f524a86d34e07 (diff)
ec2stepshell: init at unstable-2023-04-07
-rw-r--r--pkgs/tools/security/ec2stepshell/default.nix46
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/security/ec2stepshell/default.nix b/pkgs/tools/security/ec2stepshell/default.nix
new file mode 100644
index 0000000000000..ff6ee22b08eb6
--- /dev/null
+++ b/pkgs/tools/security/ec2stepshell/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "ec2stepshell";
+  version = "unstable-2023-04-07";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "saw-your-packet";
+    repo = "EC2StepShell";
+    rev = "ab1298fa7f2650de711e86e870a693dcce0e1935";
+    hash = "sha256-zy33CgGwa2pBYouqaJ1LM6uRIh3Q1uxi2zNXpDNPsuQ=";
+  };
+
+  postPatch = ''
+    # https://github.com/saw-your-packet/EC2StepShell/pull/1
+    substituteInPlace pyproject.toml \
+      --replace "realpython" "ec2stepshell"
+  '';
+
+  nativeBuildInputs = with python3.pkgs; [
+    setuptools
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    boto3
+    colorama
+    pyfiglet
+    termcolor
+  ];
+
+  pythonImportsCheck = [
+    "ec2stepshell"
+  ];
+
+  meta = with lib; {
+    description = "AWS post-exploitation tool";
+    homepage = "https://github.com/saw-your-packet/EC2StepShell";
+    changelog = "https://github.com/saw-your-packet/EC2StepShell/blob/${version}/CHANGELOG.txt";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6b03392cf33e4..5c2df11b4a24b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -38769,6 +38769,8 @@ with pkgs;
   dxvk_1 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "1.10"; };
   dxvk_2 = callPackage ../misc/dxvk/dxvk.nix { dxvkVersion = "2.1"; };
 
+  ec2stepshell = callPackage ../tools/security/ec2stepshell { };
+
   ecdsatool = callPackage ../tools/security/ecdsatool { };
 
   electricsheep = callPackage ../misc/screensavers/electricsheep { };