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:
commit
b18b983170
5 changed files with 163 additions and 0 deletions
55
pkgs/development/python-modules/msoffcrypto-tool/default.nix
Normal file
55
pkgs/development/python-modules/msoffcrypto-tool/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
57
pkgs/development/python-modules/oletools/default.nix
Normal file
57
pkgs/development/python-modules/oletools/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
41
pkgs/development/python-modules/pcodedmp/default.nix
Normal file
41
pkgs/development/python-modules/pcodedmp/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -373,6 +373,8 @@ with pkgs;
|
|||
|
||||
onesixtyone = callPackage ../tools/security/onesixtyone {};
|
||||
|
||||
oletools = with python3.pkgs; toPythonApplication oletools;
|
||||
|
||||
creddump = callPackage ../tools/security/creddump {};
|
||||
|
||||
credential-detector = callPackage ../tools/security/credential-detector { };
|
||||
|
@ -18768,6 +18770,8 @@ with pkgs;
|
|||
|
||||
msgpack = callPackage ../development/libraries/msgpack { };
|
||||
|
||||
msoffcrypto-tool = with python3.pkgs; toPythonApplication msoffcrypto-tool;
|
||||
|
||||
msilbc = callPackage ../development/libraries/msilbc { };
|
||||
|
||||
mp4v2 = callPackage ../development/libraries/mp4v2 { };
|
||||
|
|
|
@ -5030,6 +5030,8 @@ in {
|
|||
|
||||
msldap = callPackage ../development/python-modules/msldap { };
|
||||
|
||||
msoffcrypto-tool = callPackage ../development/python-modules/msoffcrypto-tool { };
|
||||
|
||||
mss = callPackage ../development/python-modules/mss { };
|
||||
|
||||
msrestazure = callPackage ../development/python-modules/msrestazure { };
|
||||
|
@ -5409,6 +5411,8 @@ in {
|
|||
|
||||
olefile = callPackage ../development/python-modules/olefile { };
|
||||
|
||||
oletools = callPackage ../development/python-modules/oletools { };
|
||||
|
||||
omegaconf = callPackage ../development/python-modules/omegaconf { };
|
||||
|
||||
omnilogic = callPackage ../development/python-modules/omnilogic { };
|
||||
|
@ -5694,6 +5698,8 @@ in {
|
|||
|
||||
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 { };
|
||||
|
||||
pdf2image = callPackage ../development/python-modules/pdf2image { };
|
||||
|
|
Loading…
Reference in a new issue