py amsi
1.11
PY-AMSI هي مكتبة تقوم بمسح الأوتار أو الملفات للبرامج الضارة باستخدام واجهة واجهة برمجة تطبيقات Windows Antimalware Scan (AMSI). AMSI هي واجهة أصلية لنظام التشغيل Windows تتيح للتطبيقات أن تطلب من مكافحة الفيروسات المثبتة على النظام تحليل ملف/سلسلة. AMSI غير مرتبط بمدافع Windows. يقوم مقدمو خدمات مكافحة الفيروسات بتنفيذ واجهة AMSI لتلقي المكالمات من التطبيقات. تستفيد هذه المكتبة من واجهة برمجة التطبيقات لإجراء عمليات مسح مكافحة الفيروسات في بيثون. اقرأ المزيد عن Windows AMSI API هنا.
عبر PIP
pip install pyamsi
مستودع استنساخ
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
# }| مستوى المخاطر | معنى |
|---|---|
| 0 | amsi_result_clean (ملف نظيف) |
| 1 | amsi_result_not_detected (لم يتم اكتشاف تهديد) |
| 16384 | AMSI_RESULT_BLOCKED_BY_ADMIN_START (تم حظر التهديد من قبل المسؤول) |
| 20479 | AMSI_RESULT_BLOCKED_BY_ADMIN_END (تم حظر التهديد من قبل المسؤول) |
| 32768 | amsi_result_detected (يعتبر الملف برامج ضارة) |
https://tomiwa-ot.github.io/py-amsi/index.html