Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ optional arguments:
-t N, --timeout N timeout (in seconds) for connection and reading
(default: 5)
-v, --verbose enable verbose output
-V, --version show version and exit
--conn-rate-test N[:max_rate]
perform a connection rate test (useful for collecting
metrics related to susceptibility of the DHEat vuln).
Expand Down
6 changes: 6 additions & 0 deletions src/ssh_audit/ssh_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ def process_commandline(out: OutputBuffer, args: List[str]) -> 'AuditConf': # p
parser.add_argument("-T", "--targets", action="store", dest="targets", metavar="targets.txt", type=str, default=None, help="a file containing a list of target hosts (one per line, format HOST[:PORT]). Use -p/--port to set the default port for all hosts. Use --threads to control concurrent scans")
parser.add_argument("-t", "--timeout", action="store", dest="timeout", metavar="N", type=int, default=5, help="timeout (in seconds) for connection and reading (default: %(default)s)")
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", default=False, help="enable verbose output")
parser.add_argument("-V", "--version", action="store_true", dest="version", default=False, help="show version and exit")

# Add long options to the parser
parser.add_argument("--conn-rate-test", action="store", dest="conn_rate_test", metavar="N[:max_rate]", type=str, default=None, help="perform a connection rate test (useful for collecting metrics related to susceptibility of the DHEat vuln). Testing is conducted with N concurrent sockets with an optional maximum rate of connections per second")
Expand All @@ -810,6 +811,11 @@ def process_commandline(out: OutputBuffer, args: List[str]) -> 'AuditConf': # p
try:
argument = parser.parse_args(args=args)

# Print version and exit.
if argument.version is True:
print(VERSION)
sys.exit(exitcodes.GOOD)

# Set simple flags.
aconf.client_audit = argument.client_audit
aconf.ipv4 = argument.ipv4
Expand Down
5 changes: 5 additions & 0 deletions ssh-audit.1
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ The number of threads to use when scanning multiple targets (with -T/--targets).
.br
Enable verbose output.

.TP
.B -V, \-\-version
.br
Show version and exit.


.SH STANDARD AUDIT
.PP
Expand Down