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
    Moderator

    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
    Moderator

    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
    Moderator

    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.