mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
edited so that the type in the output won't be messed up
This commit is contained in:
parent
7dc6d9b510
commit
bc02651e78
1 changed files with 6 additions and 1 deletions
|
|
@ -53,6 +53,8 @@ class NmapHook(object):
|
|||
"""
|
||||
outputs the current scan information
|
||||
"""
|
||||
# have to create a spacer or the output comes out funky..
|
||||
spacer_data = {4: " " * 8, 6: " " * 6, 8: " " * 4}
|
||||
logger.info(set_color("finding data for IP '{}'...".format(self.ip)))
|
||||
json_data = json.loads(json_data)["scan"]
|
||||
print(
|
||||
|
|
@ -66,9 +68,12 @@ class NmapHook(object):
|
|||
oports = json_data[self.ip]["tcp"].keys()
|
||||
oports.sort()
|
||||
for port in oports:
|
||||
port_status = json_data[self.ip]["tcp"][port]["state"]
|
||||
# output the found port information..
|
||||
print(
|
||||
"Port: {}\tStatus: {}\tType: {}".format(
|
||||
"Port: {}\tStatus: {}{}Type: {}".format(
|
||||
port, json_data[self.ip]["tcp"][port]["state"],
|
||||
spacer_data[len(port_status)],
|
||||
json_data[self.ip]["tcp"][port]["name"]
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue