Skip to content

Commit

Permalink
优化-s参数输出逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
asaotomo authored Nov 17, 2022
1 parent 5f2741b commit 39a9ce5
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions client/fofamap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def banner():
| _| (_) | _| (_| | | | | (_| | |_) |
|_| \___/|_| \__,_|_| |_|\__,_| .__/
|_| V1.1.3
#Coded By Hx0战队 Update:2022.11.09""")
#Coded By Hx0战队 Update:2022.11.17""")
logger_sw = config.get("logger", "logger")
full_sw = config.get("full", "full")
print(colorama.Fore.RED + "======基础配置=======")
Expand Down Expand Up @@ -182,11 +182,9 @@ def nuclie_scan(filename):
def out_file_scan(filename, database):
scan_list = []
for target in database:
if target[1] == "http":
if "https://" not in target[0]:
if "http" in target[1]:
if target[1] == "http":
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)
Expand Down Expand Up @@ -264,11 +262,9 @@ def print_result(database, fields, scan_format):
if scan_format:
scan_list = []
for target in database:
if target[1] == "http":
if "https://" not in target[0]:
if "http" in target[1]:
if target[1] == "http":
scan_list.append(colorama.Fore.GREEN + "http://{}".format(target[0]))
elif "https://" in target and ":443" in target[0]:
scan_list.append(colorama.Fore.GREEN + "{}".format(target[0]).replace(":443", ""))
else:
scan_list.append(colorama.Fore.GREEN + "{}".format(target[0]))
scan_list = set(scan_list)
Expand Down Expand Up @@ -432,7 +428,9 @@ def __init__(self, filename):
def write(self, message):
self.terminal.write(message)
self.log.write(
"{}".format(message).replace("\033[31m", "").replace("\033[32m", "").replace("\033[33m", "").replace(
"{}".format(message).replace("\033[91m", "").replace("\033[92m", "").replace("\033[93m", "").replace(
"\033[94m", "").replace("\033[96m", "").replace("\033[31m", "").replace("\033[32m", "").replace(
"\033[33m", "").replace(
"\033[36m", "").replace(
"\033[34m", "").replace("\033[0m", ""))

Expand Down

0 comments on commit 39a9ce5

Please sign in to comment.