423,680 Members | 2,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,680 IT Pros & Developers. It's quick & easy.

a simple sniffer,why does not this simple program work well?

P: 1
These time I am reading a wondeful book,it's name is "GRAY HAT PYTHON".And in the 4 chapter,it make a mail sniffer,but in my computer,it can not sniffer the mail login data packets.
it's code:
Expand|Select|Wrap|Line Numbers
  1. #coding=utf-8
  2. from scapy.all import *
  3. def packet_callback(packet):
  4.     if packet[TCP].payload:
  5.         mail_packet = str(packet[TCP].payload)
  6.         if "user" in mail_packet.lower() or "pass" in mail_packet.lower():
  7. #do not mate the if code
  8.             print ("[*] Server: %s" % packet[IP].dst)
  9.             print ("[*] %s" % packet[TCP].payload)
  10. sniff(filter="tcp port 110 or tcp port 25 or tcp port 143", prn=packet_callback, store=0)
  11.  
pop3.163.com is a chinese mail server,I telnet it use port 110,and try "user and pass",but it is not sniffed by my program.
Is it use SSL or other skill to encrypt the packet?
should any kind people help me?
Thanks in advance!
Attached Images
File Type: jpg 1.jpg (110.0 KB, 13 views)
File Type: jpg 2.jpg (125.8 KB, 11 views)
2 Weeks Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.