Merge pull request #150429 from fabaff/msoffcrypto

python3Packages.msoffcrypto-tool: init at 4.12.0, python3Packages.oletools: init at 0.60
This commit is contained in:
Fabian Affolter 2021-12-13 14:58:34 +01:00 committed by GitHub
commit b18b983170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 163 additions and 0 deletions

View file

@ -0,0 +1,55 @@
{ lib
, olefile
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, cryptography
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "msoffcrypto-tool";
version = "4.12.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "nolze";
repo = pname;
rev = "v${version}";
sha256 = "sha256-EBEwldh2Ct/4oxnAF1hWeW/uRrVsCYEi0cJaZubofFk=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
cryptography
olefile
setuptools
];
checkInputs = [
pytestCheckHook
];
disabledTests = [
# Test fails with AssertionError
"test_cli"
];
pythonImportsCheck = [
"msoffcrypto"
];
meta = with lib; {
description = "Python tool and library for decrypting MS Office files with passwords or other keys";
homepage = "https://github.com/nolze/msoffcrypto-tool";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, colorclass
, easygui
, fetchFromGitHub
, msoffcrypto-tool
, olefile
, pcodedmp
, pyparsing
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "oletools";
version = "0.60";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "decalage2";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gatUVkf8iT1OGnahX1BzQLDypCqhS1EvkAgUHJ6myA4=";
};
propagatedBuildInputs = [
colorclass
easygui
msoffcrypto-tool
olefile
pcodedmp
pyparsing
];
checkInputs = [
pytestCheckHook
];
disabledTests = [
# Test fails with AssertionError: Tuples differ: ('MS Word 2007+...
"test_all"
];
pythonImportsCheck = [
"oletools"
];
meta = with lib; {
description = "Python tool to analyze MS OLE2 files and MS Office documents";
homepage = "https://github.com/decalage2/oletools";
license = with licenses; [ bsd2 /* and */ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pcodedmp";
version = "1.2.6";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bontchev";
repo = pname;
rev = version;
sha256 = "sha256-SYOFGMvrzxDPMACaCvqwU28Mh9LEuvFBGvAph4X+geo=";
};
postPatch = ''
# Circular dependency
substituteInPlace setup.py \
--replace "'oletools>=0.54'," ""
'';
# Module doesn't have tests
doCheck = false;
pythonImportsCheck = [
"pcodedmp"
];
meta = with lib; {
description = "Python VBA p-code disassembler";
homepage = "https://github.com/bontchev/pcodedmp";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -373,6 +373,8 @@ with pkgs;
onesixtyone = callPackage ../tools/security/onesixtyone {}; onesixtyone = callPackage ../tools/security/onesixtyone {};
oletools = with python3.pkgs; toPythonApplication oletools;
creddump = callPackage ../tools/security/creddump {}; creddump = callPackage ../tools/security/creddump {};
credential-detector = callPackage ../tools/security/credential-detector { }; credential-detector = callPackage ../tools/security/credential-detector { };
@ -18768,6 +18770,8 @@ with pkgs;
msgpack = callPackage ../development/libraries/msgpack { }; msgpack = callPackage ../development/libraries/msgpack { };
msoffcrypto-tool = with python3.pkgs; toPythonApplication msoffcrypto-tool;
msilbc = callPackage ../development/libraries/msilbc { }; msilbc = callPackage ../development/libraries/msilbc { };
mp4v2 = callPackage ../development/libraries/mp4v2 { }; mp4v2 = callPackage ../development/libraries/mp4v2 { };

View file

@ -5030,6 +5030,8 @@ in {
msldap = callPackage ../development/python-modules/msldap { }; msldap = callPackage ../development/python-modules/msldap { };
msoffcrypto-tool = callPackage ../development/python-modules/msoffcrypto-tool { };
mss = callPackage ../development/python-modules/mss { }; mss = callPackage ../development/python-modules/mss { };
msrestazure = callPackage ../development/python-modules/msrestazure { }; msrestazure = callPackage ../development/python-modules/msrestazure { };
@ -5409,6 +5411,8 @@ in {
olefile = callPackage ../development/python-modules/olefile { }; olefile = callPackage ../development/python-modules/olefile { };
oletools = callPackage ../development/python-modules/oletools { };
omegaconf = callPackage ../development/python-modules/omegaconf { }; omegaconf = callPackage ../development/python-modules/omegaconf { };
omnilogic = callPackage ../development/python-modules/omnilogic { }; omnilogic = callPackage ../development/python-modules/omnilogic { };
@ -5694,6 +5698,8 @@ in {
pc-ble-driver-py = toPythonModule (callPackage ../development/python-modules/pc-ble-driver-py { }); pc-ble-driver-py = toPythonModule (callPackage ../development/python-modules/pc-ble-driver-py { });
pcodedmp = callPackage ../development/python-modules/pcodedmp { };
pcpp = callPackage ../development/python-modules/pcpp { }; pcpp = callPackage ../development/python-modules/pcpp { };
pdf2image = callPackage ../development/python-modules/pdf2image { }; pdf2image = callPackage ../development/python-modules/pdf2image { };