API-malwr.com icon indicating copy to clipboard operation
API-malwr.com copied to clipboard

Python 3.x Compatibility

Open nstr10 opened this issue 9 years ago • 2 comments

Just wanted to let you know I'm using this with Python 3.5, and it works almost perfectly with one trivial issue - on lines 155 and 171, req.content needs to be cast as a string, as is required by string pattern search. I don't think this will cause any issues for 2.x, so it should be a safe change. Thanks for this awesome library!

nstr10 avatar Oct 12 '16 20:10 nstr10

Hi there!

Thanks for your report. I just pushed the branch content-changes Could you give it a shot with this version and let me know if that works for you as well?

Cheers mate!

PaulSec avatar Oct 13 '16 07:10 PaulSec

Thanks for the quick response! I plugged in the new version and get the following traceback when calling api_authenticated.submit_sample() with a filepath string: File "/mnt/win/MalwareManager/MalwrAPI.py", line 159, in submit_sample 'csrfmiddlewaretoken': soup.find('input', {'name': 'csrfmiddlewaretoken'})['value'], TypeError: 'NoneType' object is not subscriptable

I'll try and troubleshoot when I get time in the next few days.

nstr10 avatar Oct 13 '16 15:10 nstr10