From f4dde049660b1b4a58de61559556e371314f1566 Mon Sep 17 00:00:00 2001 From: Kyle Maxwell Date: Wed, 6 Aug 2014 03:04:22 +0000 Subject: [PATCH] Interpret results correctly --- maltrieve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maltrieve.py b/maltrieve.py index 344898c..f3d5f1f 100755 --- a/maltrieve.py +++ b/maltrieve.py @@ -272,7 +272,7 @@ def main(): for chunk in chunker(reqs, 32): malware_downloads = grequests.map(chunk) for each in malware_downloads: - if each.status_code != 200: + if not each or each.status_code != 200: continue md5 = save_malware(each, cfg['dumpdir']) if 'vxcage' in cfg: @@ -281,7 +281,7 @@ def main(): upload_cuckoo(md5) if 'viper' in cfg: upload_viper(each) - past_urls.add(each[0]) + past_urls.add(each.url) print "Completed downloads"