473,411 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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, 60 views)
File Type: jpg 2.jpg (125.8 KB, 52 views)
Nov 6 '18 #1
0 1117

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

Similar topics

42
by: Sheldon | last post by:
Hi, This program works when tested with gdb ( see results 1) but when used in a larger program where 12 becomes 1500 there exists a problem when freeing the memory ( see results 2). Can anyone...
6
by: khajeddin | last post by:
this program print its own source code without opening the source file. would some one please explain me how does it work ,and what what process takes place in this program???? #include <stdio.h>...
13
by: hn.ft.pris | last post by:
Hi: I have the following simple program: #include<iostream> using namespace std; int main(int argc, char* argv){ const double L = 1.234; const int T = static_cast<const int>(L); int arr;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.