Kali linux搭建wifi绵羊墙

复现了获取SSID,但手机连不上来获取主机名,可能是因为手机保存的热点是有密码的。

设置网卡

网卡支持的情况下,kali下直接运行

复制代码
ifconfig wlan0 up
airmon-ng check kill
airmon-ng start wlan0
airbase-ng -P -C 30 -v wlan0mon | tee nohup.out

网页显示,python2

show.py,注意修改nohup.out的路径

复制代码
import SimpleHTTPServer
import SocketServer
import threading
import os
import json
from time import sleep
class back(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
    def cmd(self,c):
        c=os.popen(c).read()
        return c
    def run(self):
        while True:
            cmd_=self.cmd("cat ./nohup.out |grep -|awk -F 'from ' '{print$2}'|sort |uniq ").replace('"','').split('\n')
            nohup=''
            x=0
            for i in cmd_:
                j='  "%d":"%s",' %(x,i) 

                nohup+= j
                x+=1

            nohup='{%s}'%nohup[:len(nohup)-1]
            cmd_h=self.cmd("cat /var/lib/dhcp/dhcpd.leases|grep host|awk '{print$2}' ").replace('"','').split('\n')
            x=0
            dhcp=''
            for i in cmd_h:
                j='  "%d":"%s",' %(x,i)             
                dhcp+= j
                x+=1
            dhcp='{%s}'%dhcp[:len(dhcp)-1]
            open('Host.json','w').write(dhcp)
            open('Mac.json','w').write(nohup)
            print dhcp,nohup
            print "reading .."
            sleep(30)
back().start()

PORT = 8009
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

最终效果

类似于:


参考:

https://www.freesion.com/article/68271084308/

相关推荐
欢乐熊嵌入式编程15 天前
WIFI通信协议全解析18: ESP32 作为 AP 热点:打造自己的“微型路由器”(附完整实战代码)
物联网·wifi·esp32·蓝牙·wifi协议·ap热点
天南散修17 天前
MT7916 BA流程
网络·驱动开发·wifi·802.11
天南散修18 天前
MT7916驱动中802.11转换为802.3
linux·网络·驱动开发·wifi·802.11
阿钱真强道21 天前
27 鸿蒙LiteOS RK2206 设备连路由器完整实战(配网+联网验证+网络连通性测试)
wifi·harmonyos·鸿蒙·rk·liteos·开源鸿蒙·瑞芯微
星恒讯工业路由器1 个月前
物联网网关天线:分类解析与信号质量认知误区
网络·物联网·wifi·信息与通信·wifi 天线·lora 天线·物联网关天线
星恒讯工业路由器1 个月前
WiFi 安全技术演进全解析:从 WEP 到 WPA3 的迭代与安全蜕变
网络·安全·wifi·信息与通信
桑榆肖物1 个月前
ImprovWifi 跨平台传输层设计:把协议层做薄,把宿主层做稳
嵌入式硬件·wifi·.net·ble
绿竹-大地1 个月前
韦东山开发板imx6ull移植WS1-CBS-Kit
嵌入式硬件·wifi
青天喵喵2 个月前
Linux WiFi 架构解析:从用户态到驱动与硬件(基础篇)
linux·运维·arm开发·架构·wifi·嵌入式
滴水之功2 个月前
调试OpenWrt的iw组件的link.c文件
wifi·openwrt