python中的数据包处理模块scapy调研笔记
来源:互联网 发布:能恢复手机数据的软件 编辑:程序博客网 时间:2024/06/05 06:06
Scapy简介
Scapy的是一个强大的交互式数据包处理程序(使用python编写)。它能够伪造或者解码大量的网络协议数据包,能够发送、捕捉、匹配请求和回复包等等。它可以很容易地处理一些典型操作,比如端口扫描,tracerouting,探测,单元测试,攻击或网络发现(可替代hping,NMAP,arpspoof,ARP-SK,arping,tcpdump,tethereal,P0F等)。最重要的他还有很多更优秀的特性——发送无效数据帧、注入修改的802.11数据帧、在WEP上解码加密通道(VOIP)、ARP缓存攻击(VLAN)等,这也是其他工具无法处理完成的。
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.
sniff 嗅探
dissect 解剖
forge 伪造
fingerprinting 指纹识别
安装方法
模块官网
https://pypi.python.org/pypi/scapy
目前最新版本号是2.3.2
wget 'https://pypi.python.org/packages/source/s/scapy/scapy-2.3.2.tar.gz#md5=b8ca06ca3b475bd01ba6cf5cdc5619af'
tar zxvf scapy-2.3.2.tar.gz
cd scapy-2.3.2
python setup.py install
然后在命令行确认下:
import scapy
from scapy.all import *
conf
查看是否有错误,然后运行参考文献[1]中的例子?
另外在ubuntu上需要额外安装标准依赖包
sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-crypto python-pyx
/符号表示两个链路层的组合
>>>> IP()/TCP()
>>>> IP()/TCP()/"GET /HTTP/1.0\r\n\r\n" 数据部分可以直接使用字符串
Run Scapy with root priviledges.
In Scapy v2 use from scapy.all import * instead of from scapy import *.
in Python _ (underscore) is the latest result
The sendp() function will work at layer 2. It’s up to you to choose the right interface and the right link layer protocol.
正确的使用方法
sudo scapy
进入scapy交互环境,输入quit()退出并返回shell命令行环境
查看某个函数的具体用法
help(sniff)
参考文献
[1].http://www.cnblogs.com/xiaowuyi/p/3329795.html
[2].http://blog.csdn.net/wang_walfred/article/details/40044141 非常重要,对各函数的解释非常详细
[3].http://blog.csdn.net/wang_walfred/article/details/40072751 非常精彩
[4].http://www.secdev.org/projects/scapy/doc/installation.html 官网安装文档
[5].http://www.secdev.org/projects/scapy/doc/usage.html 详见用法说明,非常详细
Scapy的是一个强大的交互式数据包处理程序(使用python编写)。它能够伪造或者解码大量的网络协议数据包,能够发送、捕捉、匹配请求和回复包等等。它可以很容易地处理一些典型操作,比如端口扫描,tracerouting,探测,单元测试,攻击或网络发现(可替代hping,NMAP,arpspoof,ARP-SK,arping,tcpdump,tethereal,P0F等)。最重要的他还有很多更优秀的特性——发送无效数据帧、注入修改的802.11数据帧、在WEP上解码加密通道(VOIP)、ARP缓存攻击(VLAN)等,这也是其他工具无法处理完成的。
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.
sniff 嗅探
dissect 解剖
forge 伪造
fingerprinting 指纹识别
安装方法
模块官网
https://pypi.python.org/pypi/scapy
目前最新版本号是2.3.2
wget 'https://pypi.python.org/packages/source/s/scapy/scapy-2.3.2.tar.gz#md5=b8ca06ca3b475bd01ba6cf5cdc5619af'
tar zxvf scapy-2.3.2.tar.gz
cd scapy-2.3.2
python setup.py install
然后在命令行确认下:
import scapy
from scapy.all import *
conf
查看是否有错误,然后运行参考文献[1]中的例子?
另外在ubuntu上需要额外安装标准依赖包
sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-crypto python-pyx
/符号表示两个链路层的组合
>>>> IP()/TCP()
>>>> IP()/TCP()/"GET /HTTP/1.0\r\n\r\n" 数据部分可以直接使用字符串
Run Scapy with root priviledges.
In Scapy v2 use from scapy.all import * instead of from scapy import *.
in Python _ (underscore) is the latest result
The sendp() function will work at layer 2. It’s up to you to choose the right interface and the right link layer protocol.
正确的使用方法
sudo scapy
进入scapy交互环境,输入quit()退出并返回shell命令行环境
查看某个函数的具体用法
help(sniff)
参考文献
[1].http://www.cnblogs.com/xiaowuyi/p/3329795.html
[2].http://blog.csdn.net/wang_walfred/article/details/40044141 非常重要,对各函数的解释非常详细
[3].http://blog.csdn.net/wang_walfred/article/details/40072751 非常精彩
[4].http://www.secdev.org/projects/scapy/doc/installation.html 官网安装文档
[5].http://www.secdev.org/projects/scapy/doc/usage.html 详见用法说明,非常详细
0 0
- python中的数据包处理模块scapy调研笔记
- Python.Scapy -- 交互式数据包处理(可单独使用/在Python中调用)
- 交互式数据包处理程序 Scapy 入门指南
- 用python+scapy生成网络数据包
- [python] scapy模块的使用
- python scapy模块安装与依赖模块
- python网络数据包处理中的一些tips
- 用python+scapy生成网络数据包 / packet forging / generation / crafting
- python scapy 捕获与解析数据包的源码解析
- Scapy 伪造网络数据包
- scapy:网络数据包操作
- Python中的网络扫描大杀器Scapy初探
- Python中的Scapy初探之二
- Python自动化运维笔记(二):Python中的IP地址处理模块IPy的使用
- 使用Scapy分析pcap数据包
- scapy基础-网络数据包结构
- Python学习笔记-DNS处理模块dnspython
- Python中的Scapy初探之三-ARP中毒
- scala学习笔记一
- 南京理工大学第八届程序设计大赛(校外镜像) A 偷吃糖果
- WPF 一个MVVM的简单例子
- 总结了一些java基本的一些陷阱
- 204. Count Primes【E】【40】【150题纪念!】
- python中的数据包处理模块scapy调研笔记
- Android中加密机制
- 南京理工大学第八届程序设计大赛(校外镜像) J water1
- 百度前端技术学院,第一阶段学习笔记
- 在eclipse中使用javap
- 台大林轩田《机器学习基石》学习笔记:线性模型二(Logistics regression)
- 字符串的next特征函数,KMP算法,C++
- ubuntu 12.04下访问windows共享文件夹
- Reachability的使用和方法介绍和NSAssert、NSParameterAssert的使用