mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-25 20:11:40 +01:00
Replace getopt.getopt with getopt.gnu_getopt
Addresses Issue #41, gnu_getopt allows non-option arguments to be intermingled with option arguments whereas getopt stops processing arguments when a non option is found.
This commit is contained in:
parent
22b671e15f
commit
f2e6f1a71c
@ -136,7 +136,7 @@ class AuditConf(object):
|
|||||||
sopts = 'h1246p:bnvl:'
|
sopts = 'h1246p:bnvl:'
|
||||||
lopts = ['help', 'ssh1', 'ssh2', 'ipv4', 'ipv6', 'port',
|
lopts = ['help', 'ssh1', 'ssh2', 'ipv4', 'ipv6', 'port',
|
||||||
'batch', 'no-colors', 'verbose', 'level=']
|
'batch', 'no-colors', 'verbose', 'level=']
|
||||||
opts, args = getopt.getopt(args, sopts, lopts)
|
opts, args = getopt.gnu_getopt(args, sopts, lopts)
|
||||||
except getopt.GetoptError as err:
|
except getopt.GetoptError as err:
|
||||||
usage_cb(str(err))
|
usage_cb(str(err))
|
||||||
aconf.ssh1, aconf.ssh2 = False, False
|
aconf.ssh1, aconf.ssh2 = False, False
|
||||||
|
Loading…
Reference in New Issue
Block a user