Fixed issue with direct IP looking without an MX address throwing up errors
This commit is contained in:
parent
c1cc65d4ae
commit
89fde516ca
@ -51,8 +51,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument("host", help="hostname to lookip")
|
||||
args = parser.parse_args()
|
||||
# If the arg is an IP address go straight to API
|
||||
if re.fullmatch(args.host,
|
||||
'[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'):
|
||||
query_api(args.host)
|
||||
if re.search('[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}', args.host):
|
||||
query_api([args.host])
|
||||
else:
|
||||
findMX(args.host)
|
||||
|
Loading…
x
Reference in New Issue
Block a user