Skip to content

Commit

Permalink
fixed problem with priting results
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfredredbird committed Jan 17, 2024
1 parent e70c25d commit 6b28e16
Showing 1 changed file with 25 additions and 98 deletions.
123 changes: 25 additions & 98 deletions modules/scanmodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,94 +97,27 @@ def Startscan(
f.close
print(language_module.save2)
exit(99)
else:
if webscrape and "-a" in modes and 400 <= response.status_code <= 510 and result == "Yes":

if webscrape:
if response.status_code >= 200 and response.status_code <= 399 and result == "No":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")

if response.status_code >= 400 and response.status_code <= 500 and result == "Yes":
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")

if "-N" in modes:
if (
response.status_code == 200
and siteNSFW == "true"
and result == "No"
):
print(
"["
+ Fore.LIGHTMAGENTA_EX
+ "NSFW"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW"
+ "\n"
)
if (
response.status_code == 200
and siteNSFW == "Unknown"
and result == "No"
):
print(
"["
+ Fore.BLACK
+ "NSFW?"
+ Fore.RESET
+ "] "
+ siteN
+ uname
+ " "
+ Fore.RESET
)
f.write(
str(date)
+ "["
+ "+"
+ "] "
+ siteN
+ uname
+ " NSFW?"
+ "\n"
)

if (
response.status_code == 200
and siteNSFW == "false"
and result == "No"
):



if not webscrape:
if response.status_code >= 200 and "-N" not in modes and response.status_code <= 399:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
if (
response.status_code >= 200
and response.status_code <= 390
and "-N" not in modes
and result == "No"
):
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
return siteProgcounter
if response.status_code == 406 and "-N" not in modes and result == "No":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write("[" + "+" + "] " + siteN + uname + "\n")

if not webscrape and "-a" in modes and 300 <= response.status_code <= 510:
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")
# if response.status_code == 406 and result == "Yes":
# print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
# f.write("[" + "-" + "] " + siteN + uname + "\n")

if response.status_code >= 400 and response.status_code <= 500 and "-a" in modes:
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")

if "-N" in modes:
if response.status_code == 200 and siteNSFW == "true":
Expand All @@ -209,7 +142,7 @@ def Startscan(
+ " NSFW"
+ "\n"
)
if response.status_code == 200 and siteNSFW == "Unknown":
elif response.status_code == 200 and siteNSFW == "Unknown":
print(
"["
+ Fore.BLACK
Expand All @@ -231,23 +164,17 @@ def Startscan(
+ " NSFW?"
+ "\n"
)
if response.status_code == 200 and siteNSFW == "false":
elif response.status_code == 200 and siteNSFW == "false":
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
# if response.status_code == 200 and "-N" not in modes:
# print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
# f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
# return siteProgcounter
if response.status_code == 406 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")
if response.status_code <= 300 and "-N" not in modes:
print("[" + Fore.GREEN + "+" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "+" + "] " + siteN + uname + "\n")

if response.status_code >= 400 and "-a" in modes:
print("[" + Fore.RED + "-" + Fore.RESET + "] " + siteN + uname)
f.write(str(date) + "[" + "-" + "] " + siteN + uname + "\n")









def scanFileList(siteList, slectpath, language_module):
Expand Down

0 comments on commit 6b28e16

Please sign in to comment.