ValueError: invalid literal for int() with base 10: ' '
VagelisD opened this issue · comments
python enyx.py 2c public ip
[+] Snmpwalk found.
[+] Grabbing IPv6.
Traceback (most recent call last):
File "enyx.py", line 65, in <module>
ip(IPS)
File "enyx.py", line 39, in ip
step4=map(int,step3)
ValueError: invalid literal for int() with base 10: ''
Python version is 2.7.15.
Weird thing is that is happening only in macOS, with Kali everything is fine.
Can you reproduce this ?
It is probably because you have snmp-mibs installed. snmp-mibs convert directly output of snmpwalk to ASCII, so it can be readable. Enyx won't find the hex string that it is supposed to if you have snmp-mibs installed. So remove snmp-mibs. Try it out
I haven't found snmp-mibs on my system, although i have an old version of NET-SNMP
snmpwalk -V
NET-SNMP version: 5.6.2.1
I too am facing the same issue on my macOS. Tried installing net-snmp through brew, which again installed NET-SNMP version 5.6.2.1
$ python enyx.py 1 public 10.10.10.92
########################################################################################## ## # # # # #
# # # # # # # #
###### # # # ## ##
# # # # ## # #
###### # ## ## # #
SNMP IPv6 Enumerator Tool
Author: Thanasis Tserpelis aka Trickster0
###################################################################################
[+] Snmpwalk found.
[+] Grabbing IPv6.
Traceback (most recent call last):
File "enyx.py", line 65, in
ip(IPS)
File "enyx.py", line 39, in ip
step4=map(int,step3)
ValueError: invalid literal for int() with base 10: ''
$ snmpwalk -V
NET-SNMP version: 5.6.2.1
$ net-snmp-config --version
5.6.2.1
I've got the same error on Kali - python enyx.py 1 public 10.10.10.1
[+] Snmpwalk found. [+] Grabbing IPv6. Traceback (most recent call last): File "enyx.py", line 65, in <module> ip(IPS) File "enyx.py", line 39, in ip step4=map(int,step3) ValueError: invalid literal for int() with base 10: ''
NET-SNMP version: 5.7.3
Execute the below command and give me the output since i don't have a mac to try it.
snmpwalk -c public -v2c IP iso.3.6.1.2.1.4.34.1.3.2.16
Heres my output.
snmpwalk -c public -v2c IP iso.3.6.1.2.1.4.34.1.3.2.16
IP-MIB::ipAddressIfIndex.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: 1
IP-MIB::ipAddressIfIndex.ipv6."de:ad:be:ef:00:00:00:00:02:50:56:ff:fe:b9:ff:12" = INTEGER: 2
IP-MIB::ipAddressIfIndex.ipv6."fe:80:00:00:00:00:00:00:02:50:56:ff:fe:b9:ff:12" = INTEGER: 2
Eventually i ended up using this method for grabbing IPv6 addresses from snmp.
Yea so it makes sense. The output is entirely different. it looks like in OSX the snmp-mibs is installed or exists in the system, which means my tool won't work for OSX....for now but i will make it work tomorrow probably.
Thanks a lot
Just commenting out mibs
in /etc/snmp/snmp.conf
made this error go away in kali while having snmp-mibs installed.