Fix fh, trailing comma, and ruby loop syntax

unstable
sinn3r 2012-01-23 15:15:49 -06:00 committed by James Lee
parent f6b951ac36
commit 89279b680a
1 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ class Metasploit3 < Msf::Auxiliary
'Author' => [ 'K. Reid Wightman <wightman[at]digitalbond.com>' ], 'Author' => [ 'K. Reid Wightman <wightman[at]digitalbond.com>' ],
'License' => MSF_LICENSE, 'License' => MSF_LICENSE,
'Version' => '$Revision: 1 $', 'Version' => '$Revision: 1 $',
'DisclosureDate' => 'Jan 19 2012', 'DisclosureDate' => 'Jan 19 2012'
)) ))
register_options( register_options(
@ -200,8 +200,8 @@ class Metasploit3 < Msf::Auxiliary
'Header' => "D20 usernames, passwords, and account levels\n(use for TELNET authentication)", 'Header' => "D20 usernames, passwords, and account levels\n(use for TELNET authentication)",
'Indent' => 1, 'Indent' => 1,
'Columns' => ["Type", "User Name", "Password"]) 'Columns' => ["Type", "User Name", "Password"])
range = Range.new(0, numentries - 1)
range.each do |i| 0.upto(numentries -1).each |i|
f.seek(dstart + headerlen + i * entrylen) f.seek(dstart + headerlen + i * entrylen)
accounttype = makeword(f.read(2)) accounttype = makeword(f.read(2))
f.seek(dstart + headerlen + i * entrylen + 2) f.seek(dstart + headerlen + i * entrylen + 2)
@ -241,7 +241,7 @@ class Metasploit3 < Msf::Auxiliary
def parse(fh) def parse(fh)
print_status("Parsing file") print_status("Parsing file")
f = File.open(fh, 'rb') f = File.open(fh.path, 'rb')
used = f.read(4) used = f.read(4)
if used != "USED" if used != "USED"
print_error "Invalid Configuration File!" print_error "Invalid Configuration File!"