2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "keepwn";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.3";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-Cyberdefense";
|
|
|
|
repo = "KeePwn";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-haKWuoTtyC9vIise+gznruHEwMIDz1W6euihLLKnSdc=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
chardet
|
|
|
|
impacket
|
|
|
|
lxml
|
2024-01-25 14:12:00 +00:00
|
|
|
pefile
|
|
|
|
pykeepass
|
|
|
|
python-magic
|
2023-05-24 13:37:59 +00:00
|
|
|
termcolor
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
mv $out/bin/KeePwn $out/bin/$pname
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"keepwn"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool to automate KeePass discovery and secret extraction";
|
|
|
|
homepage = "https://github.com/Orange-Cyberdefense/KeePwn";
|
|
|
|
changelog = "https://github.com/Orange-Cyberdefense/KeePwn/releases/tag/${version}";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|