Added GEOIP lookup using built in linux util, might need to install on server (REMINDER)
This commit is contained in:
parent
a2429d3192
commit
4ba53007c9
13
HTTPy.py
Normal file → Executable file
13
HTTPy.py
Normal file → Executable file
@ -9,6 +9,7 @@ import re # YAY REVERSE ENGINEER... wait its just regex
|
|||||||
#Made this work with linux magic
|
#Made this work with linux magic
|
||||||
|
|
||||||
inInput = ""
|
inInput = ""
|
||||||
|
partDomain = ""
|
||||||
#URL https://www.whois.com/whois/benjamyn-testing.com
|
#URL https://www.whois.com/whois/benjamyn-testing.com
|
||||||
#class df-block-raw
|
#class df-block-raw
|
||||||
|
|
||||||
@ -34,9 +35,16 @@ def dig(inDomain):
|
|||||||
test = dig.split("\n")
|
test = dig.split("\n")
|
||||||
iterate(test)
|
iterate(test)
|
||||||
|
|
||||||
|
def ipLookup(inDomain):
|
||||||
|
ipLook = subprocess.check_output(["geoiplookup", inDomain])
|
||||||
|
host = subprocess.check_output(["host", inDomain]) #Do exit status check...
|
||||||
|
print ipLook, "PTR: ", host
|
||||||
|
|
||||||
def getInput():
|
def getInput():
|
||||||
global inInput
|
global inInput
|
||||||
|
global partDomain
|
||||||
inInput = raw_input()
|
inInput = raw_input()
|
||||||
|
partDomain = inInput.partition(".")
|
||||||
|
|
||||||
|
|
||||||
#if partDomain[2] != "":
|
#if partDomain[2] != "":
|
||||||
@ -45,7 +53,10 @@ def getInput():
|
|||||||
|
|
||||||
print "Domain: "
|
print "Domain: "
|
||||||
getInput()
|
getInput()
|
||||||
whois(inInput)
|
if len(partDomain) == 3:
|
||||||
|
ipLookup(inInput)
|
||||||
|
|
||||||
|
#whois(inInput)
|
||||||
|
|
||||||
# tmp = raw_input()
|
# tmp = raw_input()
|
||||||
# whois(tmp)
|
# whois(tmp)
|
||||||
|
|||||||
6
TODO
6
TODO
@ -12,10 +12,12 @@
|
|||||||
|
|
||||||
#TODO: LEARN REGEX
|
#TODO: LEARN REGEX
|
||||||
|
|
||||||
|
#TODO: ADD GEOIP LOOKUPS + HOST COMMAND
|
||||||
|
|
||||||
#TODO: Add extra nice features
|
#TODO: Add extra nice features
|
||||||
#Full DNS record lookup
|
#Full DNS record lookup
|
||||||
#VentraIP Nameserver identifier
|
#COMPANY Nameserver identifier
|
||||||
#VentraIP SSHer
|
#COMPANY SSHer
|
||||||
#SPF Validator
|
#SPF Validator
|
||||||
#Ping utility
|
#Ping utility
|
||||||
#Not my problem indicator (If the nameservers are not ours + the A records not ours + the mail. record is not ours and the domain is not ours then the customer can get fucked)
|
#Not my problem indicator (If the nameservers are not ours + the A records not ours + the mail. record is not ours and the domain is not ours then the customer can get fucked)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user