Python Forum
scapy ssh connection my network sniffing from my router - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: scapy ssh connection my network sniffing from my router (/thread-2013.html)



scapy ssh connection my network sniffing from my router - Boss - Feb-10-2017

I want to sniff ssh connection to any pc on my network. I have scapy on my router and I would like to get a sniff result whenever someone connect to any of my pc in my network using ssh. This what I did by I have no result.
#!/usr/bin/python
from scapy.all import *

def sniffSSHRequest():
    sniff(iface='eth0', filter="tcp and host 192.168.1.2 and port 22", count=1)

 sniffSSHRequest()



RE: scapy ssh connection my network sniffing from my router - nilamo - Feb-13-2017

Well, you're sniffing, but then not doing anything with the results.  The docs show printing to the screen in various formats to show what's what, if it's a router, what's your gameplan on getting the info back out of it?

http://www.secdev.org/projects/scapy/doc/usage.html#sniffing