mushorg / buttinsky

Botnet monitoring is a crucial part in threat analysis and often neglected due to the lack of proper open source tools. Our tool will provide an open source framework for automated botnet monitoring. The modular design will allow full customization of the used protocols, the monitoring clients behavior, how we log the collected information, processing of the data to analyze the botnets purpose, size and threat and how the monitoring task are distributed between dedicated nodes.
http://buttinsky.org
GNU General Public License v3.0
79 stars 27 forks source link

Close HPFeeds connection on spawner shutdown #33

Closed glaslos closed 11 years ago

glaslos commented 11 years ago

Wrap the main of the spawner in a try/except and close the HPFeeds connection if it's there and the spawner gets stopped.

ihpd commented 11 years ago

Would you want the entire main of spawner in try/catch or the below shown will suffice:

try: hpfeeds_logger = hpfeeds.HPFeedsLogger() except KeyError: pass

glaslos commented 11 years ago

Please use the code formatting if you paste code into a comment. No, this wouldn't work. Who have to catch the exception where it occurred:

try:
    server.serve_forever()
except:
    handle_exception