Skip to content

Commit

Permalink
修复使用-s命令时,输出内容包含非http协议的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
asaotomo authored Nov 9, 2022
1 parent b9807c4 commit f679f7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions fofamap.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ def nuclie_scan(filename):
def out_file_scan(filename, database):
scan_list = []
for target in database:
if "https://" not in target:
scan_list.append("http://{}\n".format(target))
elif "https://" in target and ":443" in target:
scan_list.append("{}\n".format(target).replace(":443", ""))
else:
scan_list.append("{}\n".format(target))
if target[1] == "http":
if "https://" not in target[0]:
scan_list.append("http://{}\n".format(target[0]))
elif "https://" in target and ":443" in target[0]:
scan_list.append("{}\n".format(target[0]).replace(":443", ""))
else:
scan_list.append("{}\n".format(target[0]))
scan_list = set(scan_list)
scan_list = set(scan_list)
print(colorama.Fore.GREEN + "[+] 已自动对结果做去重处理".format(filename))
filename = "{}".format(filename).split(".")[0] + ".txt"
Expand Down

0 comments on commit f679f7c

Please sign in to comment.