Skip to content

Commit f2e6f1a

Browse files
authored
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.
1 parent 22b671e commit f2e6f1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssh-audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def from_cmdline(cls, args, usage_cb):
136136
sopts = 'h1246p:bnvl:'
137137
lopts = ['help', 'ssh1', 'ssh2', 'ipv4', 'ipv6', 'port',
138138
'batch', 'no-colors', 'verbose', 'level=']
139-
opts, args = getopt.getopt(args, sopts, lopts)
139+
opts, args = getopt.gnu_getopt(args, sopts, lopts)
140140
except getopt.GetoptError as err:
141141
usage_cb(str(err))
142142
aconf.ssh1, aconf.ssh2 = False, False

0 commit comments

Comments
 (0)