Skip to content

Commit

Permalink
ip_check
Browse files Browse the repository at this point in the history
  • Loading branch information
grayddq authored and grayddq committed May 5, 2019
1 parent 8614be5 commit 18f8e8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Config_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def check_dns(self):
shell_process = os.popen(
'cat /etc/resolv.conf | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"').read().splitlines()
for ip in shell_process:
if (find(ip)[0:2] != u'中国') and (find(ip)[0:3] != u'局域网') and (find(ip)[0:4] != u'共享地址') and (
find(ip)[0:4] != u'本机地址'):
if check_ip(ip):
self.config_suspicious.append(
{u'配置信息': u'DNS servername: %s' % ip, u'异常类型': u'境外dns', u'文件': u'/etc/resolv.conf'})
suspicious = True
Expand Down

0 comments on commit 18f8e8f

Please sign in to comment.