Writing Python Script
This is my first post and i need some help.
The thing is followed these steps in the given link https://null-byte.wonderhowto.com/how-to/hack-like-pro-find-exact-location-any-ip-address-0161964/and succeeded in finding location. Now I'm planning to write a script which does the whole process when we execute the script. First i made a .sh script with following commands:
./IPloc.py (This is the script i made after)
In IPloc.py, the following commands are there:
x=raw_input('Insert the IP address:')
for key,val in rec.items():
print "%s: %s" %(key,val
The results are not coming. But when i manually execute the commands in IPloc.py, there is no error.
This is how the error looks like:
Insert the IP address:18.104.22.168
Traceback (most recent call last):
File "./IPlocfind.py", line 5, in <module>
File "/root/NH3/pygeoip-0.3.2/pygeoip/init.py", line 546, in recordbyaddr
ipnum = util.ip2long(addr)
File "/root/NH3/pygeoip-0.3.2/pygeoip/util.py", line 39, in ip2long
return int(binascii.hexlify(socket.inetpton(socket.AFINET6, ip)), 16)
socket.error: illegal IP address string passed to inet_pton
Any help would be appreciated!