bootle debug said:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 764, in _handle
return route.call(**args)
File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 1575, in wrapper
rv = callback(*a, **ka)
File "/home/tin/sg/main.py", line 30, in login
user.login(sharer)
File "/home/tin/sg/User.py", line 60, in login
User.send_tcp(self.ip, sharer.id, sharer.password)
File "/home/tin/sg/User.py", line 161, in send_tcp
send(IP(src=ip, dst='destIP') / TCP(sport=sport, dport=80, seq=0, flags='S'))
File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 251, in send
__gen_send(conf.L3socket(*args, **kargs), x, inter=inter, loop=loop, count=count,verbose=verbose, realtime=realtime)
File "/usr/lib/python2.7/dist-packages/scapy/arch/linux.py", line 307, in __init__
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type))
File "/usr/lib/python2.7/socket.py", line 187, in __init__
_sock = _realsocket(family, type, proto)
error: [Errno 1] Operation not permitted
When I run the app in bottle builtin function run()
, it works. It only report this error when I use the send()
from python-scapy.
and I have aleady do chown www-data:www-data
to all myapp files.
How to fix my problem.