foospidy / HoneyPy

A low to medium interaction honeypot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement: Need event for "Connection Close" in Plugins

ameygat opened this issue · 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 ?

commented

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.

commented

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