Skip to content

Commit

Permalink
add target url to cmd output
Browse files Browse the repository at this point in the history
  • Loading branch information
juerkkil committed Dec 1, 2024
1 parent a0fc971 commit 5818e0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions secheaders/cmd_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion secheaders/securityheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit 5818e0e

Please sign in to comment.