Skip to content

Instantly share code, notes, and snippets.

@amxku
amxku / gist:5220044
Created March 22, 2013 09:34
checkIpNslookup
def checkIpName(arg):
cmd = 'nslookup %s' % arg.strip()
handle = Popen(cmd, stdout = PIPE, stderr = PIPE, shell = True).stdout
re_handle = handle.read()
handle.close()
# name 关键词
botkey = ['baidu','google','yahoo','msn']
if re.search('Name',re_handle):