diff --git a/secheaders/cmd_utils.py b/secheaders/cmd_utils.py index 9b837d5..c658816 100644 --- a/secheaders/cmd_utils.py +++ b/secheaders/cmd_utils.py @@ -20,9 +20,9 @@ def get_eval_output(warn, no_color): return f"[ {color_start}{eval_result}{color_end} ]" -def output_text(headers, https, verbose=False, no_color=False) -> str: +def output_text(target_url, headers, https, verbose=False, no_color=False) -> str: terminal_width = shutil.get_terminal_size().columns - output_str = "" + output_str = f"Scan target: {target_url}\n" # If the stdout is not going into terminal, disable colors no_color = no_color or not sys.stdout.isatty() diff --git a/secheaders/securityheaders.py b/secheaders/securityheaders.py index 9c331e0..f42546c 100644 --- a/secheaders/securityheaders.py +++ b/secheaders/securityheaders.py @@ -223,7 +223,7 @@ def main(): if args.json: print(json.dumps({'target': header_check.get_full_url(), 'headers': headers, 'https': https}, indent=2)) else: - print(cmd_utils.output_text(headers, https, args.verbose, args.no_color)) + print(cmd_utils.output_text(header_check.get_full_url(), headers, https, args.verbose, args.no_color)) if __name__ == "__main__":