2

I'm trying to bruteforce (a rootme challenge don't worry :p) an SNMPv3 authentication password using this python script : https://github.com/cysboy/SnmpCrack/blob/master/SnmpCrack.py

Nevertheless, I have an error loading a scapy snmp module line 72 on this code snmp = pkt[SNMP]

I printed the error by adding

            except Exception as e : 
            print("Continuing")
            print(e)
            continue

In the followed try catch.

I get this error : Layer [<class 'scapy.layers.snmp.SNMP'>] not found

So I tried to search where this class should have been declared. I found a file under /usr/lib/python2.7/dist-packages/scapy/layers/snmp.py where the class is defined.

I tried to import this file manually and other modules with

import sys
sys.path.insert(0, "/usr/lib/python2.7/dist-packages/scapy/layers/")
import snmp
from scapy.all import *
from scapy.layers import *
from scapy.layers.snmp import * #SNMP, SNMPresponse, SNMPvarbind

But I don't really know what I'm doing exactly. Is there a way to be sure this file is included as a scapy submodule / class ?

I'm running under the latest Kali 64 bit. I tried with python3 aswell without success. I'm running this script with python 2.7.14+

Thanks if you can help me with that :) Have a good day

T. Rode
  • 86
  • 6

1 Answers1

1

Quite old question already. As you can see in the code source, https://github.com/secdev/scapy/blob/master/scapy/layers/snmp.py the fields do exist in recent versions.

Try uninstalling scapy from apt, and install it via github or via pip install scapy It may be a problem of versioning...

Cukic0d
  • 5,111
  • 2
  • 19
  • 48