jpsenior / threataggregator

Aggregates security threats from a number of online sources, and outputs to Syslog CEF, Snort Signatures, Iptables rules, hosts.deny, etc.
MIT License
79 stars 27 forks source link

If a feed is down/otherwise doesn't respond, don't die! #8

Closed jpsenior closed 8 years ago

jpsenior commented 8 years ago

Add appropriate exception handling when working with feeds if they're down. If they're dead, just don't use them and skip to the next one in the list.

Bug report from Jeff on Protect724:

Processing abuse.ch Palveo Tracker from http://palevotracker.abuse.ch/blocklists.php?download=ipblocklist Error downloading: http://palevotracker.abuse.ch/blocklists.php?download=ipblocklist - ('http protocol error', 0, 'got a bad status line', None) Comparing 0 downloaded to 0 cached lines 0 new, 0 deleted, 0 unchanged lines Traceback (most recent call last): File "threataggregator.py", line 665, in start(feeds) File "threataggregator.py", line 627, in start build_db(i['type'], i['url'], i['description'], db_add, db_del, db_equal) File "threataggregator.py", line 563, in build_db raise 'Could not rename %s to %s - %s' % (new_filename, old_filename, e) TypeError: exceptions must be old-style classes or derived from BaseException, not str

jpsenior commented 8 years ago

All fixed!