Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39619
    Bornrich
    Participant

    I am having issue importing scapy.all as scapy to run on my kali machine.

    #!/usr/bin/env python

    import scapy.all as scapy

    def scan(ip):
    arp_request = scapy.ARP()
    print(arp_request.summary())
    scapy.ls(scapy.ARP())

    scan(“10.0.2.1/24”)

    This is the result below

    Traceback (most recent call last):
    File “Network_Scanner.py”, line 3, in <module>
    import scapy.all as scapy
    ImportError: No module named scapy.all

    #39645
    Diego PérezDiego Pérez
    Participant

    Hi!
    Are you running your code in kali’s terminal?

    Run the these commands in kali’s terminal:

    pip unistall scapy
    pip install scapy==2.4.2

    Let me know how it goes!
    Diego

    #41724
    gcasillascos
    Participant

    I installed scapy <complete, and basic, even install modules on pycharm no matter what I do, I cant make it to work to find arp, or arping or almost any module, I installed it on de kali linux version from your site

    #41726
    Diego PérezDiego Pérez
    Participant

    Hi!
    What do you mean by “install scapy complete and basic”? There’s no need to install them in Pycharm.
    Also you didn’t answered if you are running the script in kali’s terminal, can you tell please? Did you get any errors while running the commands I shared? Are you using python 2 or 3?

    Can you share a screenshot of the command used to run the script and the result please?

    Thanks!
    Diego

    #41763
    gcasillascos
    Participant

    Executed
    pip unistall scapy
    pip install scapy==2.4.2

    no errors

    I am using python 3.8 and python 2.7.18

    My code

    #!/usr/bin/env python

    import scapy.all as scapy

    def scan(ip):
    scapy.airping(ip)

    scan(“192.168.241.2”)

    my result on kali terminal no matter if using python or python3

    Traceback (most recent call last):
    File “netScanner.py”, line 10, in <module>
    scan(“192.168.241.2”)
    File “netScanner.py”, line 7, in scan
    scapy.airping(ip)
    AttributeError: ‘module’ object has no attribute ‘airping’

    #41783
    Diego PérezDiego Pérez
    Participant

    Hi!
    The error you are showing is because of a typo, is not airping but arping.

    Let me know how it goes!
    Diego

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Privacy Overview
ZSecurity logo featuring a stylized red letter Z

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

3rd Party Cookies

This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping these cookies enabled helps us to improve our website.