py amsi
1.11
PY-AMSI ist eine Bibliothek, die Zeichenfolgen oder Dateien für Malware mithilfe der AMSI-API (Windows Antimalware Scan Interface) scannt. AMSI ist eine Schnittstelle, die in Windows verwendet wird, mit der Anwendungen das auf dem System installierte Antiviren auffordern können, eine Datei/eine String zu analysieren. AMSI ist nicht an Windows Defender gebunden. Antivirus -Anbieter implementieren die AMSI -Schnittstelle, um Anrufe von Anwendungen zu empfangen. Diese Bibliothek nutzt die API, um Antiviren -Scans in Python zu machen. Lesen Sie hier mehr über die Windows AMSI -API.
Via pip
pip install pyamsi
Klon -Repository
git clone https://github.com/Tomiwa-Ot/py-amsi.git
cd py-amsi/
python setup.py install from pyamsi import Amsi
# Scan a file
Amsi . scan_file ( file_path , debug = True ) # debug is optional and False by default
# Scan string
Amsi . scan_string ( string , string_name , debug = False ) # debug is optional and False by default
# Both functions return a dictionary of the format
# {
# 'Sample Size' : 68, // The string/file size in bytes
# 'Risk Level' : 0, // The risk level as suggested by the antivirus
# 'Message' : 'File is clean' // Response message
# }| Risikoniveau | Bedeutung |
|---|---|
| 0 | AMSI_RESULT_CLEAN (Datei ist sauber) |
| 1 | AMSI_RESULT_NOT_DETECTED (keine Bedrohung erkannt) |
| 16384 | AMSI_RESULT_BLOCKED_BY_ADMIN_START (Bedrohung wird vom Administrator blockiert) |
| 20479 | AMSI_RESULT_BLOCKED_BY_ADMIN_END (Bedrohung wird vom Administrator blockiert) |
| 32768 | AMSI_RESULT_DETECTECT (Datei gilt Malware) |
https://tomiwa-ot.github.io/py-amsi/index.html