相关疑难解决方法(0)

如何在python中嗅探HTTP数据包?

我想通过python(版本2.6)来嗅探我计算机中的所有HTTP数据包.这可能吗?我可以用scapy做,还是没有其他外部模块?

python http sniffer

16
推荐指数
1
解决办法
3万
查看次数

为Windows构建Python C扩展模块

我有一个C扩展模块,分发内置的二进制文件会很好.Setuptools可以很容易地在OS X和GNU/Linux上构建扩展模块,因为这些操作系统附带GCC,但我不知道如何在Windows中执行.

我是否需要购买Visual Studio的副本,或者Visual Studio Express是否有效?我可以使用Cygwin或MinGW吗?

python windows

12
推荐指数
1
解决办法
9541
查看次数

Python 脚本中的 Scapy

我正在用 Python 编写一个使用 Scapy 的脚本,但我的问题是例外是:

我 = IP()

NameError:未定义全局名称“IP”

这是我的脚本:

import random
from scapy import *
import threading
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)

print ("Which IP would you like to choose?")
ip = raw_input("-->")
print ("Which Port would you like to choose?")
port = raw_input("-->")

class sendSYN(threading.Thread):
    global ip, port

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        # Method -
        i = IP()
        i.src = "%i.%i.%i.%i" % (random.randint(1, 254), random.randint(1, 254), random.randint(1, 254), random.randint(1, 254))
        i.dst = ip

        t = TCP()
        t.sport = random.randint(1, …
Run Code Online (Sandbox Code Playgroud)

python scapy

5
推荐指数
1
解决办法
9535
查看次数

标签 统计

python ×3

http ×1

scapy ×1

sniffer ×1

windows ×1