Skip to content

Commit

Permalink
better output format
Browse files Browse the repository at this point in the history
  • Loading branch information
nullt3r committed Apr 20, 2022
1 parent bb0e567 commit 3d6a9b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jfscan/modules/Nmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ def _run_single_nmap(self, _args):
output_in_colors = output_in_colors.replace(" filtered ", "\033[1m\033[93m filtered \033[0m")
output_in_colors = output_in_colors.replace(" closed ", "\033[1m\033[91m closed \033[0m")

stdout_buffer += "-------\033[1m" + f_host_domain + "\033[0m" + "".join(["-" for s in range(hyphen_count - len(f_host_domain))])
stdout_buffer += "┌──────\033[1m" + f_host_domain + "\033[0m\n"# + "".join(["-" for s in range(hyphen_count - len(f_host_domain))])
stdout_buffer += "│"

if "Nmap done: 1 IP address (0 hosts up)" in nmap_stdout or result.returncode != 0:
stdout_buffer += f"\nHost {host} seems down now, your network connection is not able to handle the scanning, \nare you scanning over a wifi? Try VPS or ethernet instead.\n\n"
stdout_buffer += f"Host {host} seems down now, your network connection is not able to handle the scanning, \nare you scanning over a wifi? Try VPS or ethernet instead.\n\n"
else:
nmap_stdout = "\r\n".join(nmap_stdout.splitlines()[3:][:-2])
nmap_stdout = "\n".join(nmap_stdout.splitlines()[3:][:-2])

output_in_colors = nmap_stdout.replace(" open ", "\033[1m\033[92m open \033[0m")
output_in_colors = output_in_colors.replace(" filtered ", "\033[1m\033[93m filtered \033[0m")
Expand Down

0 comments on commit 3d6a9b2

Please sign in to comment.