scapy--介绍、安装、python导入包
前言全局说明
一、说明
1.1 环境:
Ubuntu 18.04.6 LTS (Linux qt-vm 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux) python3 Python 3.6.9 (default, Mar 10 2023, 16:46:00) [GCC 8.4.0] on linux
1.2 官网:
1.3 官方文档:
https://scapy.readthedocs.io/en/latest/index.html
1.4 中文版说明:
https://wizardforcel.gitbooks.io/scapy-docs/content/3.html
https://www.osgeo.cn/scapy/index.html
1.5 python 历史版本:
https://pypi.org/project/scapy/#history
1.6 其他:
ASCII编码查询: https://baike.baidu.com/item/ASCII/309296
ubuntu 18.04 安装 wireshark :https://blog.csdn.net/weixin_46048542/article/details/121730448
二、Scapy 介绍
2.1 Scapy是什么?
咱们看看官方文档怎么介绍Scapy工具的:
Scapy is a Python program that enables the user to send, sniff and dissect and forge network packets. This capability allows construction of tools that can probe, scan or attack networks.
Scapy 是一个 Python 程序,它使用户能够发送、嗅探、剖析和伪造网络数据包。此功能允许构建可以探测、扫描或攻击网络的工具。
In other words, Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. Scapy can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery. It can replace hping, arpspoof, arp-sk, arping, p0f and even some parts of Nmap, tcpdump, and tshark.
换句话说,Scapy 是一个强大的交互式数据包操作程序。它能够伪造或解码多种协议的数据包,通过网络发送它们,捕获它们,匹配请求和回复等等。Scapy 可以轻松处理大多数经典任务,例如扫描、跟踪路由、探测、单元测试、攻击或网络发现。它可以替代 hping、arpspoof、arp-sk、arping、p0f 甚至 Nmap、tcpdump 和 tshark 的某些部分。
Scapy also performs very well on a lot of other specific tasks that most other tools can’t handle, like sending invalid frames, injecting your own 802.11 frames, combining techniques (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, …), etc.
Scapy 在大多数其他工具无法处理的许多其他特定任务上也表现出色,例如发送无效帧、注入您自己的 802.11 帧、组合技术(VLAN 跳跃 + ARP 缓存中毒、WEP 加密通道上的 VoIP 解码等), 等等。
三、安装
3.1 python pip 安装
类型 | 包含内容 | Pip命令 | 备注 |
---|---|---|---|
默认版 | Only Scapy | pip install scapy | |
基础版 | Scapy & IPython. Highly recommended | pip install --pre scapy[basic] | |
完整版 | Scapy & all its main dependencies | pip install --pre scapy[complete] |
3.2 安装 scapy 最新完整版本
pip install scapy
3.3 安装 scapy 最新基础版本
pip install --pre scapy basic
3.4 安装 scapy 最新完整版本
pip install --pre scapy complete
3.4 安装 scapy 指定版本
pip install scapy==2.4.5
更多版本,查看上面1.4节链接
Windows环境下除了安装Python环境之外还需要安装Npcap或Wincap,官方推荐使用Npcap
四、python导入包
4.1 导入scapy 全部模块
from scapy.all import *
4.2
免责声明:本号所涉及内容仅供安全研究与教学使用,如出现其他风险,后果自负。
参考、来源:
https://blog.csdn.net/qq_26879323/article/details/117752689
https://geek-docs.com/python/python-ask-answer/605_python_what_does_the_pre_option_in_pip_signify.html (pip install 的–pre选项的含义)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
2023-09-13 HashCat解密成功界面提示,查看结果
2023-09-13 HashCat字典文件夹 模式
2023-09-13 Hashcat Invalid mask(无效掩码)
2023-09-13 HashCat内置字符集,自定义密码组合字典
2022-09-13 华为显示器(huawei)亮度恢复默认值,UOS统信