
Liaisons Python3 natives pour Detect-It-Easy de @horsicq
Bindings Python natifs 3.11+ pour @horsicq's Detect-It-Easy
L'installation la plus simple et recommandée se fait via pip.
pip install die-python
git clone https://github.com/elastic/die-python
cd die-python
Installez Qt dans le répertoire build. Il peut être facilement installé à l'aide de aqt comme suit (ici avec Qt version 6.7.3) :
python -m pip install aqtinstall --user -U
python -m aqt install-qt -O ./build linux desktop 6.7.3 linux_gcc_64 # linux x64 only
python -m aqt install-qt -O ./build linux_arm64 desktop 6.7.3 linux_gcc_arm64 # linux arm64 only
python -m aqt install-qt -O ./build windows desktop 6.7.3 win64_msvc2019_64 # windows x64 only
python -m aqt install-qt -O ./build windows desktop 6.7.3 win64_msvc2019_arm64 # windows arm64 only (will requires `win64_msvc2019_64`)
python -m aqt install-qt -O ./build mac desktop 6.7.3 clang_64 # mac only
Ensuite, vous pouvez installer le paquet :
python -m pip install . --user -U
import die, pathlib
print(die.scan_file("c:/windows/system32/ntdll.dll", die.ScanFlags.DEEP_SCAN))
'PE64'
print(die.scan_file("../upx.exe", die.ScanFlags.RESULT_AS_JSON, str(die.database_path) ))
{
"detects": [
{
"filetype": "PE64",
"parentfilepart": "Header",
"values": [
{
"info": "Console64,console",
"name": "GNU linker ld (GNU Binutils)",
"string": "Linker: GNU linker ld (GNU Binutils)(2.28)[Console64,console]",
"type": "Linker",
"version": "2.28"
},
{
"info": "",
"name": "MinGW",
"string": "Compiler: MinGW",
"type": "Compiler",
"version": ""
},
{
"info": "NRV,brute",
"name": "UPX",
"string": "Packer: UPX(4.24)[NRV,brute]",
"type": "Packer",
"version": "4.24"
}
]
}
]
}
for db in die.databases():
print(db)
\path\to\your\pyenv\site-packages\die\db\ACE
\path\to\your\pyenv\site-packages\die\db\Amiga\DeliTracker.1.sg
\path\to\your\pyenv\site-packages\die\db\Amiga\_Amiga.0.sg
\path\to\your\pyenv\site-packages\die\db\Amiga\_init
\path\to\your\pyenv\site-packages\die\db\APK\AlibabaProtection.2.sg
[...]
Publié sous licence Apache 2.0 et intègre les dépôts suivants :