diogo-fernan / malsub

A Python RESTful API framework for online malware analysis and threat intelligence services.
Other
365 stars 83 forks source link

Create a basic module out of malsub #17

Closed ITAYC0HEN closed 4 years ago

ITAYC0HEN commented 4 years ago

This pull request improves the installation instructions and now it installs the module globally. This helps to use malsub as a module globally, and not only inside the cloned repository

import malsub
from malsub.service import serv as services

hashes = malsub.core.crypto.parse_hashl(
    "5f782447ff08ee2c36a5d3988dd4774674233f8ea0e1ad09dd766e842d785ddd",
    "58ffd8200db69cfbc048921e18d79aa1adc894af34db3e1782e53beab3b2d98f")

API_KEY = {'apikey': {'apikey': '...truncated...'}}

vt = services['vt']
vt.set_apikey(API_KEY)

for h in hashes:
    vt.download_file(h)
diogo-fernan commented 4 years ago

Cool, never thought of this before! I will update the README meanwhile.

diogo-fernan commented 4 years ago

https://github.com/diogo-fernan/malsub#modularizing-malsub