Skip to content

Commit

Permalink
修复了一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
EASY233 committed Jun 13, 2021
1 parent d94d0da commit 6fc56e3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/Fofa.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ def run(self,ip):
try:
response = requests.get(url,timeout=10,headers = self.headers )
datas = json.loads(response.text)
for data in datas["results"]:
if "http" == data[0] or "https" == data[0]:
Urls.url.append("{0}:https://{1}".format(data[0], data[1]))
logging.info("{0}:https://{1}".format(data[0], data[1]))
elif "http" in data[1] or "https" in data[1]:
Urls.url.append(data[1])
logging.info(data[1])
if "results" in datas.keys():
for data in datas["results"]:
if "http" == data[0] or "https" == data[0]:
Urls.url.append("{0}:https://{1}".format(data[0], data[1]))
logging.info("{0}:https://{1}/".format(data[0], data[1]))
elif "http" in data[1] or "https" in data[1]:
Urls.url.append(data[1])
logging.info(data[1])

except requests.exceptions.ReadTimeout:
logging.error("请求超时")
Expand Down

0 comments on commit 6fc56e3

Please sign in to comment.