user2879214
user2879214

Reputation: 41

Traceback (most recent call last): File "<stdin>", line 1, in <module> error in scapy on ubuntu 12.04

I have installed python 2.7.3 and scapy on my ubuntu 12.04 through software center.But now i'm not able to access scapy through python.

like in the terminal first type python (works fine) and then scapy it shows an error written below.

All the simple ip commands work fine in scapy but the send,sr,etc don't work .it gives the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

or

Traceback (most recent call last):
  File "<console>", line 1, in <module>

for all the commands i try . so,pls help me out here .i'm really in the need.

Upvotes: 1

Views: 30160

Answers (1)

RyPeck
RyPeck

Reputation: 8177

From your comment - [Errno 1] Operation not permitted

When running a Python script that uses Scapy, or just running Scapy from terminal, if you want to send packets over the wire, you need to call it with root or administrative rights.

So using the terminal -

# Works, but won't be able to send or receive packets.
rypeck@laptop:~$ scapy
>>> 
KeyboardInterrupt
>>> 

# Will work!
rypeck@laptop:~$ sudo scapy
Welcome to Scapy (2.2.0)
>>> 

Scripts you call using sudo python.

Upvotes: 1

Related Questions