准备
* kali linux 系统  这里使用的是虚拟机



* 一张可以开启监听模式的网卡

* 两张网卡使用那一张都可以



* 本教程使用的是 python编写的脚本代码 以下是部分代码

* 在代码中作者写了大量的注释 以供使用者参考

active_wireless_networks = []
# We use this function to test if the ESSID is already in the list file.
# If so we return False so we don't add it again.
# If it is not in the lst we return True which will instruct the elif
# statement to add it to the lst.
def check_for_essid(essid, lst):
check_status = True # If no ESSIDs in list add the row
if len(lst) == 0:
return check_status
# This will only run if there are wireless access points in the list.
for item in lst:
# If True don't add to list. False will add it to list
if essid in item["ESSID"]:
check_status = False return check_status
# Basic user interface header
# This is a period of output, don't want you to do it.
print(r"""______ _ _ ______ _ _
| _ \ (_) | | | ___ \ | | | |
| | | |__ ___ ___ __| | | |_/ / ___ _ __ ___ | |__ __ _| |
| | | / _` \ \ / / |/ _` | | ___ \/ _ \| '_ ` _ \| '_ \ / _` | |
| |/ / (_| |\ V /| | (_| | | |_/ / (_) | | | | | | |_) | (_| | |
|___/ \__,_| \_/ |_|\__,_| \____/ \___/|_| |_| |_|_.__/ \__,_|_|""")
print("\n****************************************************************")
print("\n* Copyright of David Bombal, 2021 *")
print("\n* https://www.davidbombal.com *")
print("\n* https://www.youtube.com/davidbombal *")
print("\n****************************************************************")
# If the user doesn't run the program with super user privileges, don't allow them to continue.
if not 'SUDO_UID' in os.environ.keys():
print("Try running this program with sudo.")
exit()
# Remove .csv files before running the script. for file_name in os.listdir():
# We should only have one csv file as we delete them from the folder
# every time we run the program.
if ".csv" in file_name:
print("There shouldn't be any .csv files in your directory. We found .csv files in your directory and will move them to the backup directory.")
# We get the current working directory.
directory = os.getcwd()
try:
# We make a new directory called /backup
os.mkdir(directory + "/backup/")
except:
print("Backup folder exists.")
# Create a timestamp
timestamp = datetime.now()
# We move any .csv files in the folder to the backup folder.
shutil.move(file_name, directory + "/backup/" + str(timestamp) + "-" + file_name)
# Regex to find wireless interfaces. We're making the assumption they will all be wlan0 or higher. wlan_pattern = re.compile("^wlan[0-9]+") # Python allows is to run system commands by using a function provided by the subprocess module.
# subprocess.run(<list of command line arguments goes here>)
# The script is the parent process and creates a child process which runs the system command,
# and will only continue once the child process has completed.
# We run the iwconfig command to look for wireless interfaces.
check_wifi_result = wlan_pattern.findall(subprocess.run(["iwconfig"], capture_output=True).stdout.decode())
# No WiFi Adapter connected.
if len(check_wifi_result) == 0:
print("Please connect a WiFi adapter and try again.")
exit() # Menu to select WiFi interface from
print("The following WiFi interfaces are available:")
for index, item in enumerate(check_wifi_result):
print(f"{index} - {item}") # Ensure the WiFi interface selected is valid. Simple menu with interfaces to select from.
while True:
wifi_interface_choice = input("Please select the interface you want to use for the attack: ")
try:
if check_wifi_result[int(wifi_interface_choice)]:
break
except:
print("Please enter a number that corresponds with the choices available.")
具体步骤
  • 将提前准备好的 网卡插入 电脑并切换到虚拟机
  • 由于kali linux 自带的python 不是3.7而是3.6 所以要重新下载 python
  • 打开终端 输入一下命令 下载
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
  • 解压压缩包
tar -zxvf Python-3.7.0.tgz
# 将解压出来的文件夹复制到 /usr/local/ 目录下
cp -r python-3.7.0 /usr/local/
  • 然后进行编译安装
./configure --enable-optimizations --prefix=/usr/local/Python-3.7/ && make && make install

  • 在进入到解压出来的文件的位置后输入
./python --version

查看版本信息

  • 在下载的python文件夹里 运行 python文件 s
  • 上面的代码文件我已经放在了 ~/ 目录下
sudo ./python ~/wifi_dos_type1.py
  • 这里会提示 插入的网卡 wlan0
  • 因为这里只有一张 所以就只有一个 输入网卡前的序号

  • 这里是自动开启网卡的监听模式 来扫描附近的WiFi
  • 再按下 之后 会出现提示 在这里输入要攻击WiFi编号

  • 输入编号之后 会自动攻击知道关掉终端或者 按 ctrl + c 强行中断

在不需要WiFi密码的情况下进行断网攻击的更多相关文章

  1. Linux下MySQL在知道密码的情况下修改密码

    1.在知道原密码的情况下,进入MySQL: mysql -u root -p 2.进入 mysql数据库,然后通过语句修改密码: 我的MySQL版本是:mysql  Ver 14.14 Distrib ...

  2. /etc/sudoers文件设置为允许用户在不输入该用户的密码的情况下使用所有命令

    设置用户666在不输入该用户的密码的情况下使用所有命令: /etc/sudoers ALL=(ALL) NOPASSWD:ALL # ALL=(ALL) ALL #sudo su - 时是需要输入66 ...

  3. Kali下进行局域网断网攻击

    今天我就来演示一下在kali下的局域网断网攻击,即ARP地址欺骗,下图所要用到的arp地址欺骗状态图: 则: 第一步:假设主机A访问某网站,那么要告知某网站我的IP和MAC地址,但这是以广播的方式告知 ...

  4. Arcgis api for javascript学习笔记 - 不改变默认端口(6080)情况下,外网访问Arcgis Server 发布的接口

    Arcgis Server发布的地图服务地址默认端口号是6080,假设本机上只对80端口做了外网映射,在IIS中部署了一个网站绑定了80端口,那么网站中某个页面通过arcgis api for js ...

  5. ubuntu wifi连接不上或经常断网,重启就好

    问题1.知道wifi密码,驱动也有,可以点击连接,总是提示"连接断开,您现在处于离线状态". 1.打开终端"ctrl+alt+T" 2.输入: sudo vim ...

  6. Win7 64 + mysql5.6.24(.zip) 不知道root密码的情况下重设密码

    解决方式 第一步:在运行(常常在附件中)里输出cmd,右键以系统管理员身份登陆: 第二步:停止mysql服务,命令为:net stop mysql  注意,若不行将当前目录切换到mysql\bin目录 ...

  7. 在忘记root密码的情况下如何修改linux系统的root密码

    1.系统启动时长按shift键后可以看到如下界面:     2.找到 recovery mode 那一行, 按下[e]键进入命令编辑状态,到 linux /boot/vmlinuz-....... r ...

  8. 虚拟机Linux系统忘记密码的情况下,修改root或其他用户密码

    使用场景 linux管理员忘记root密码,需要进行找回操作. 注意事项:本文基于centos7环境进行操作,由于centos的版本是有差异的,继续之前请确定好版本. 步骤 一.重启系统,在开机过程中 ...

  9. Centos7 忘记密码的情况下,修改root或其他用户密码

    转载:https://blog.csdn.net/wcy00q/article/details/70570043 应用场景 linux管理员忘记root密码,需要进行找回操作. 注意事项:本文基于ce ...

  10. Centos 7 忘记密码的情况下,修改root密码

    应用场景 linux管理员忘记root密码,需要进行找回操作. 注意事项:本文基于centos7.4环境进行操作,由于centos的版本是有差异的,继续之前请确定好版本 操作步骤 一.重启系统,在开机 ...

随机推荐

  1. 【SqlServer】Windows-2019 安装

    安装教程参考: https://blog.csdn.net/weixin_43790591/article/details/104149800 数据库SQL Server 2019 + 管理工具SQL ...

  2. 中美在AI领域差距12个月

    看到一个新闻: <马斯克再谈AI:中美差距12个月> 其实想想这个评价也还中肯,尽管这些年国内AI大有弯道超车之势,但是不可否认的是由于欧美的历史领先优势和强大的科研及商业上的独立创新能力 ...

  3. NVRM: Xid (PCI:0000:b1:00): 13, pid=1375637, Graphics SM Global Exception on (GPC 0, TPC 1, SM 1): Multiple Warp Errors

    显卡服务器中一个显卡崩溃了: May 16 05:38:58 dell kernel: [14244871.006970] NVRM: Xid (PCI:0000:b1:00): 13, pid=13 ...

  4. 实验室服务彻底死机记录——硬件故障——主板pcie槽坏掉或显卡坏掉

    2022年11月8日   后记(最新更新) 服务器送售后,售后给厂家技术打电话,厂家技术说可能是显卡的电源线松了,于是我们打开机箱把显卡的电源线紧了紧,然后神奇的事情发生了,故障解除了...... 一 ...

  5. vue项目之主页布局

    1.背景 2.基本结构 代码: <template> <el-container class="home-container"> <!-- 头部--& ...

  6. Apache DolphinScheduler 1.3.4升级至3.1.2版本过程中的踩坑记录

    因为在工作中需要推动Apache DolphinScheduler的升级,经过预研,从1.3.4到3.1.2有的体验了很大的提升,在性能和功能性有了很多的改善,推荐升级. 查看官方的升级文档,可知有提 ...

  7. Apache DolphinScheduler 与 AWS 的 EMR/Redshift 集成实践分享

    引言 这篇文章将给大家讲解关于DolphinScheduler与AWS的EMR和Redshift的集成实践,通过本文希望大家能更深入地了解AWS智能湖仓架构,以及DolphinScheduler在实际 ...

  8. Mybatis Log 插件

    目前的idea插件已经开始收费---找了一个免费的插件安装到idea中重启一下就可以了 百度网盘提取码:sjc8

  9. 在 Mac 上使用 X11

    有时我们需要在服务器上运行一个 GUI 程序,然而我们是通过 SSH 连接到服务器的,看不到图形界面,怎么办呢?我们可以通过 X11 将 GUI 程序的界面转发到本地. 在 Mac 上使用 X11 需 ...

  10. ZXING 修复预览页面变形问题

    ZXING之前都用的好好的,结果在一个Android11的设备上翻了车 (基于全屏预览的情况下) 扫码页面预览效果变形, 在网上找了一些代码,修改后发现无效,不适用我这边的设备, 最后想着,预览结果变 ...