python 安装 scapy windows 10 64bit
2023-09-27 14:22:23 时间
简介:
前段时间装的pypcap做嗅探。打包受阻。因为我都是在windows做的。也要打包到exe给别人用。
所以尝试了一下scapy,也可以嗅探,貌似功能更强大。先用sniff吧。
这个也不是在venv中点鼠标就能装上的。
看下官方提示:
You need the following software packages in order to install Scapy on Windows:
- Python: Python 2.7.X or 3.3+. After installation, add the Python installation directory and its Scripts subdirectory to your PATH. Depending on your Python version, the defaults would be
C:\Python27
andC:\Python27\Scripts
respectively.- Npcap: the latest version. Default values are recommanded. Scapy will also work with Winpcap.
- Scapy: latest development version from the Git repository. Unzip the archive, open a command prompt in that directory and run “python setup.py install”.
把python加入系统PATH
安装Npcap,没说Npcap SDN。不过我电脑上装的有。也不知道不装可以不可以。
git 源码, 运行python setup.py install
再讲一下怎么图形安装它。
pycharm打开源码包。
打开setup.py,随便运行一下。不管报什么错。
点setup旁边的小箭头,打开 Edit Configurations
Script path : 这是setup.py的路径,刚才忽视错误运行一下,就是为了让它自动生成。
Parameters: 扩展命令 参数 填 install
Python interpreter :所用的环境,也就是要选venv。选你准备运行scapy的环境。安装到这个环境里面。
scapy示例代码:没有解包。乱码一样。
from scapy.all import sniff pkts = sniff(prn=lambda x:x.sprintf("{IP:%IP.src% -> %IP.dst%\n}{Raw:%Raw.load%\n}")) print(pkts)
相关文章
- windows系统下Python环境的搭建
- 这可能是2023全网最详细的python安装教程(windows)
- windows python flask与mysql数据库写入查询
- windows python flask返回json数据
- Python编程-数据库-利用PyMysql访问windows下的MySql数据库
- windows下的安装及使用 python
- python windows时间同步工具
- Python 实现Windows开机运行某软件
- 关于Python 获取windows信息收集
- python安装whl文件的注意事项(windows系统)
- 《Python数据可视化编程实战》——1.5 在Windows上安装matplotlib
- 《Python编程初学者指南》—— 1.3 在Windows上设置Python
- python 运算符重复
- 转 python 简易windows编辑器
- 转 windows下安装pycharm并连接Linux的python环境 以及 windows 下notepad ++编辑 linux 的文件
- python:使用Djangorestframework编写post和get接口
- python+selenium:解决上传文件<input type='file'>标签属性被css的visibility隐藏导致无法定位元素的问题
- 【python】Windows 系统 chrome禁止更新