准备
* 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. 【SpringCloud】Re03 Feign

    Feign是一个声明式的HttpClient?更简洁的实现Http请求发送 安装Feign组件: 配置Feign的依赖坐标: <?xml version="1.0" enco ...

  2. 【JS】02 基础语法

    JS的引入方式: 第一种: 就是我们在HTML标签中使用script标签,然后在这个标签中可以书写JS代码 type="text/javascript"  可以不用写,浏览器会根据 ...

  3. 人形机器人 —— Figure 01机器人亮相 | OpenAI多模态能力加持 | 与人类流畅对话交互 | 具身智能的GPT-4时刻

    视频地址: https://www.youtube.com/watch?v=vO1wnHA0tZg Figure AI 公司主页: https://www.figure.ai/ 根据Figure 01 ...

  4. Ubuntu Server无桌面无显示器情况下虚拟屏幕xvfb的安装及设置—ubuntu18.04server服务器系统下为python安装虚拟显示器 (使用jupyter notebook在web端播放openai的gym下保存的运行视频——需安装ipython)

    1.  安装xvfb sudo apt-get install xvfb Xvfb是流行的虚拟现实库,可以使很多需要图形界面的程序虚拟运行. 2. 安装pyvirtualdisplay pyvirtu ...

  5. 文本相似度 HanPL汉语言处理

    @ 目录 前言 需求 简介 实操开始 1. 添加pom.xml依赖 2. 文本相似度工具类 3. 案例验证 4. 验证结果 总结 前言 请各大网友尊重本人原创知识分享,谨记本人博客:南国以南i. 提示 ...

  6. .net相关知识点总结

    基础知识 [1]静态构造函数(执行一次,调用静态成员或实例化时执行一次) [2]抽象类和接口的区别 1:抽象类有字段,构造函数,非抽象方法(C#新版本接口可以定义方法体),接口没有 2:抽象类不可多继 ...

  7. java_GUI_监听事件关闭窗口_AWT

    package Panel;import java.awt.*;import java.awt.event.WindowAdapter;import java.awt.event.WindowEven ...

  8. pyinstall通过配置.spec文件引用资源文件

    pyinstall通过配置.spec文件引用资源文件 pyinstall可以自动将所有依赖的.py文件连接起来编译成一个可执行exe文件,但是如果在程序中 使用了外部资源,如图片,或者是其它的配置文件 ...

  9. IE中在线预览PDF文件

    今天在项目中偶然遇到一个需要在线查看pdf的需求.在查阅一些资料之后使用了最简单的写法(需要在客户端安装AdbeRdr11000_zh_CN_11.0.0.379.exe软件). 还有其他方法可以实现 ...

  10. AWS EC2 实例类型命名规则

    AWS EC2(Elastic Compute Cloud)实例类型的命名规则反映了实例的性能特征.用途和硬件配置.这些实例类型的名称由几个组件构成,每个组件都提供了关于该实例类型特定方面的信息.理解 ...