foospidy/HoneyPy

Enhancement: Need event for "Connection Close" in Plugins

ameygat opened this issue · 4 comments

I was editing plugin file for example:
https://github.com/foospidy/HoneyPy/blob/master/plugins/TelnetDebian7/TelnetDebian7.py

I wanted some log to be created at connection close event but didnt found any sample function which is doing this. May I know if there is a event generated for connection close event ? Or some addition can be done to get this event generated ?

Since it is leveraging the twisted framework there may be a connectionLost method available, here's an example
https://github.com/foospidy/HoneyPy/blob/master/lib/honeypy_console.py#L131

Please give it a try and see if that does what you need.

Just a side note, TelnetUnix is a better telnet plugin. I recommend using that one instead.

Yup that function works on connection close. Thanks alot, also thanks for pointing to TelnetUnix plugin.

Great! I'm glad you were able to resolve it!