[英]Why do I get a 'permission denied' error when I try to access a serial device when executing python script on Jenkins?
[英]Why do I get “permission denied” when trying to start Python Scapy loopback interface?
我是网络的新手(我正在尝试启动ICMP的回送接口以及得到的内容:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from scapy.all import *
WARNING: No route found for IPv6 destination :: (no default route?)
>>> conf.L3socket
<L3dnetSocket: read/write packets at layer 3 using libdnet and libpcap>
>>> conf.L3socket=L3RawSocket
>>> sr1(IP(dst="127.0.0.1")/ICMP())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\site-packages\scapy\sendrecv.py", line 334, in sr1
s=conf.L3socket(filter=filter, nofilter=nofilter, iface=iface)
File "C:\Python25\lib\site-packages\scapy\supersocket.py", line 63, in __init_
_
self.outs = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RA
W)
File "c:\Python25\lib\socket.py", line 159, in __init__
_sock = _realsocket(family, type, proto)
socket.error: (10013, 'Permission denied')
我做错了什么?
您需要以root用户身份启动scapy,才能使用原始套接字发送消息。
由于您正在运行Windows,因此您需要弄清楚如何以管理员身份启动scapy。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.