Skip to content

Commit

Permalink
Replace getopt.getopt with getopt.gnu_getopt
Browse files Browse the repository at this point in the history
Addresses Issue arthepsy#41, gnu_getopt allows non-option arguments to be intermingled with option arguments whereas getopt stops processing arguments when a non option is found.
  • Loading branch information
Plloi committed Jun 5, 2019
1 parent 22b671e commit f2e6f1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh-audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def from_cmdline(cls, args, usage_cb):
sopts = 'h1246p:bnvl:'
lopts = ['help', 'ssh1', 'ssh2', 'ipv4', 'ipv6', 'port',
'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:
usage_cb(str(err))
aconf.ssh1, aconf.ssh2 = False, False
Expand Down

0 comments on commit f2e6f1a

Please sign in to comment.