nslookup: support lookup of multiple record types at once
This commit is contained in:
9
bert.py
9
bert.py
@ -460,13 +460,12 @@ def command_loop():
|
||||
except:
|
||||
say(channel, r+"You must specify a domain!")
|
||||
continue
|
||||
try:
|
||||
nstype = msg_parts[2]
|
||||
except:
|
||||
nstype = "A"
|
||||
nstype = msg_parts[2:]
|
||||
if not nstype:
|
||||
nstype = ["AAAA", "A"]
|
||||
print("got nslookup command with domain: "+str(nsdomain)+" and type: "+str(nstype))
|
||||
nsresult = nslookup(nsdomain, nstype)
|
||||
nslines = nsresult.split("\n")
|
||||
nslines = set(nsresult.split("\n"))
|
||||
for nsline in nslines:
|
||||
say(channel, y+" "+str(nsline))
|
||||
except Exception as err:
|
||||
|
Reference in New Issue
Block a user