Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
stasinopoulos committed Dec 13, 2023
1 parent 4e3f2e3 commit c3f7f95
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
10 changes: 7 additions & 3 deletions src/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ def main(filename, url):
else:
settings.VERBOSITY_LEVEL = menu.options.verbose

if settings.VERBOSITY_LEVEL != 0:
print(settings.execution("Starting"))

if menu.options.smoke_test:
smoke_test()

Expand Down Expand Up @@ -978,12 +981,13 @@ def main(filename, url):
print(settings.print_abort_msg(abort_msg))
raise SystemExit()

except SystemExit:
raise SystemExit()

except EOFError:
err_msg = "Exiting, due to EOFError."
print(settings.print_error_msg(err_msg))
raise SystemExit()

except SystemExit:
if settings.VERBOSITY_LEVEL != 0:
print(settings.execution("Ending"))
raise SystemExit()
# eof
6 changes: 3 additions & 3 deletions src/utils/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import sys
import time
import sqlite3
import datetime
from datetime import datetime, date
from src.utils import menu
from src.utils import settings
from src.utils import session_handler
Expand Down Expand Up @@ -107,8 +107,8 @@ def create_log_file(url, output_dir):
if not menu.options.no_logging:
output_file.write("\n" + "=" * 37)
output_file.write("\n" + "| Started in " + \
datetime.datetime.fromtimestamp(time.time()).strftime('%m/%d/%Y' + \
" at " + '%H:%M:%S' + " |"))
str(date.today()) + \
" at " + datetime.now().strftime("%H:%M:%S") + " |")
output_file.write("\n" + "=" * 37)
output_file.write("\n" + re.compile(re.compile(settings.ANSI_COLOR_REMOVAL)).sub("",settings.INFO_BOLD_SIGN) + "Tested URL : " + url)
output_file.close()
Expand Down
9 changes: 7 additions & 2 deletions src/utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import random
import string
import codecs
from datetime import datetime
from datetime import datetime, date
from src.core.compat import xrange
from src.thirdparty.six.moves import urllib as _urllib
from src.thirdparty.six.moves import reload_module as _reload_module
Expand Down Expand Up @@ -72,6 +72,11 @@ class HTTPMETHOD(object):
def print_time():
return "[" + Fore.LIGHTBLUE_EX + datetime.now().strftime("%H:%M:%S") + Style.RESET_ALL + "] "

# Print execution status
def execution(status):
debug_msg = status + " " + APPLICATION + " " + VERSION + " at " + datetime.now().strftime("%H:%M:%S") + " (" + str(date.today()) + ")."
return print_time() + DEBUG_SIGN + str(debug_msg) + Style.RESET_ALL

# Print legal disclaimer message
def print_legal_disclaimer_msg(legal_disclaimer_msg):
result = LEGAL_DISCLAIMER + str(legal_disclaimer_msg) + Style.RESET_ALL
Expand Down Expand Up @@ -241,7 +246,7 @@ def sys_argv_errors():
DESCRIPTION = "The command injection exploiter"
AUTHOR = "Anastasios Stasinopoulos"
VERSION_NUM = "3.9"
REVISION = "31"
REVISION = "32"
STABLE_RELEASE = False
VERSION = "v"
if STABLE_RELEASE:
Expand Down

0 comments on commit c3f7f95

Please sign in to comment.