0 Members and 1 Guest are viewing this topic.
#!/usr/bin/pythonimport hashlibimport jsonimport osimport loggingimport requests# Parameters, don't forget to modifyapikey = "your_token"host = "mrf.yourserver.com"urlserver = "http://mrf.yourserver.com/api.php?action=uploadfiles"def post_multipart(host, selector, fields, files): headers = {'user-agent': 'Dionaea honeypot'} r = requests.post(selector, headers=headers, data=fields, files=files)def file_md5(fname): hash_md5 = hashlib.md5() with open(fname, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): hash_md5.update(chunk) return hash_md5.hexdigest() def UploadFile(pl): md5 = file_md5(pl) filename = os.path.basename(pl) files_data = [{"index":0, "vtsubmit":True, "cksubmit":False, "tags":"honeypot"}] parameters = {"hash": md5, "comment": "", "token": apikey, "files_data": json.dumps(files_data)} # Send file to server API with open(pl, 'rb') as f: files = {filename: f} post_multipart(host, urlserver, parameters, files)
Where are the logs so i can troubleshoot problems with submissions via api ? apache access log ?
/var/log/apache2/error.log/var/log/apache2/access.log
Is it possible to choose which virustotal vendor result get displayed in the mrf repo ?
Is it possible to disable the download of malware from the md5 link in the repo ?
Just so you know, we are selling support for MRF :phttps://shop.adlice.com/product/mrf-premium/