Open nstr10 opened 7 years ago
Hey there,
Thanks a lot for your input. You're right, I just had so much trouble lately with Malwr.com. I started working again on this and I will push (maybe tonight) some changes I had on a local branch. Let me know what you think about it and we can work on this if you want.
Thanks a lot though for your feedback, I really appreciated it!
Hey, got some trouble with malwr.com getting under maintenance.. but I didn't forget you. I will push it as soon as malwr.com is back up.
I've also been waiting for the site to come back. Thinking again about trying to build a Cuckoo sandbox...
Yeah, that might be the alternative I will go for too..
Been using this for awhile and appreciate you work! One small gripe I have is that, because Malwr.com is often not in a usable state, I get a lot of errors from your library.
IndexError: list index out of range
is the most common error, because we're using regular expressions to find content in the response to a request we haven't checked the status of - and we're assuming the result will have an index! I was going to submit a pull request, but realized there are several potential ways to fix this:status_code
is 200 when the request is made, else have a clean exit path that reports the HTTP status receivedre.findall(pattern, req.content)
isn't just[]
before trying to access an index of it (this should really be done regardless!)Let me know what you think - I'm happy to write the solution, but wouldn't want to waste my time in case you think of a better fix than any of those I've listed.
P.S. I think also the requests library has a property method so you could just check if
req.ok
is true or false rather than mucking about with status codes.