Skip to content

Commit 4bd40fe

Browse files
committed
yard doc and comment corrections for auxiliary
1 parent 0dd987d commit 4bd40fe

File tree

129 files changed

+476
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+476
-590
lines changed

modules/auxiliary/admin/2wire/xslt_password_reset.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ def run
5252
return
5353
end
5454

55-
#check to see if we get HTTP OK
55+
# check to see if we get HTTP OK
5656
if (res.code == 200)
5757
print_status("Okay, Got an HTTP 200 (okay) code. Verifying Server header")
5858
else
5959
print_error("Did not get HTTP 200, URL was not found. Exiting!")
6060
return
6161
end
6262

63-
#Check to verify server reported is a 2wire router
63+
# Check to verify server reported is a 2wire router
6464
if (res.headers['Server'].match(/2wire Gateway/i))
6565
print_status("Server is a 2wire Gateway! Grabbing info\n")
6666
else
@@ -88,7 +88,7 @@ def run
8888
print_status("Hardware Version: #{hardware}")
8989
end
9090

91-
#Check the Software Version
91+
# Check the Software Version
9292
if res.body.match(/<td class="data">(5\.\d{1,3}\.\d{1,3}\.\d{1,3})<\/td>/i)
9393
ver = $1
9494
print_status("Software version: #{ver}")

modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def run
7171
print_status("#{rhost}:#{rport} - Sending remote command: " + datastore['CMD'])
7272

7373
cmd = datastore['CMD']
74-
#original post request:
75-
#data_cmd = "submit_button=Diagnostics&change_action=gozila_cgi&submit_type=start_ping&
76-
#action=&commit=0&ping_ip=1.1.1.1&ping_size=%26#{cmd}%26&ping_times=5&traceroute_ip="
74+
# original post request:
75+
# data_cmd = "submit_button=Diagnostics&change_action=gozila_cgi&submit_type=start_ping&
76+
# action=&commit=0&ping_ip=1.1.1.1&ping_size=%26#{cmd}%26&ping_times=5&traceroute_ip="
7777

7878
vprint_status("#{rhost}:#{rport} - using the following target URL: #{uri}")
7979
begin

modules/auxiliary/admin/http/linksys_tmunblock_admin_reset_bof.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def initialize(info = {})
2020
},
2121
'Author' =>
2222
[
23-
'Craig Heffner', #vulnerability discovery and original exploit
24-
'Michael Messner <devnull[at]s3cur1ty.de>' #metasploit module
23+
'Craig Heffner', # vulnerability discovery and original exploit
24+
'Michael Messner <devnull[at]s3cur1ty.de>' # metasploit module
2525
],
2626
'License' => MSF_LICENSE,
2727
'References' =>

modules/auxiliary/admin/http/rails_devise_pass_reset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def reset_one(password, report=false)
130130
return false
131131
end
132132
when 302
133-
#Success!
133+
# Success!
134134
return true
135135
else
136136
print_error("ERROR: received code #{res.code}")

modules/auxiliary/admin/http/typo3_winstaller_default_enc_keys.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ def run
100100
else
101101
print_status("Rotating through known encryption keys")
102102
encryption_keys = [
103-
#TYPO3 4.3.x - 4.4.x
103+
# TYPO3 4.3.x - 4.4.x
104104
'd696ab49a803d7816021cb1768a6917d',
105105
'47d1e990583c9c67424d369f3414728e6793d9dc2ae3429d488a7374bc85d2a0b19b62de67d46a6079a75f10934288d3',
106106
'7b13b2203029ed80337f27127a9f1d28c2597f4c08c9a07b782b674731ecf5328c4d900851957899acdc6d4f911bf8b7',
107-
#TYPO3 4.4.7+
107+
# TYPO3 4.4.7+
108108
'fbbdebd9091d914b3cd523485afe7b03e6006ade4125e4cf4c46195b3cecbb9ae0fe0f7b5a9e72ea2ac5f17b66f5abc7',
109-
#TYPO3 4.5.0
109+
# TYPO3 4.5.0
110110
'def76f1d8139304b7edea83b5f40201088ba70b20feabd8b2a647c4e71774b7b0e4086e4039abaf5d4f6a521f922e8a2',
111111
'bac0112e14971f00431639342415ff22c3c3bf270f94175b8741c0fa95df244afb61e483c2facf63cffc320ed61f2731',
112-
#TYPO3 4.5.2
112+
# TYPO3 4.5.2
113113
'14b1225e2c277d55f54d18665791f114f4244f381113094e2a19dfb680335d842e10460995eb653d105a562a5415d9c7',
114-
#TYPO3 4.5.3
114+
# TYPO3 4.5.3
115115
'5d4eede80d5cec8df159fd869ec6d4041cd2fc0136896458735f8081d4df5c22bbb0665ddac56056023e01fbd4ab5283',
116-
#TYPO3 4.5.4 - 4.5.7
116+
# TYPO3 4.5.4 - 4.5.7
117117
'b2aae63def4c512ce8f4386e57b8a48b40312de30775535cbff60a6eab356809a0b596edaad49c725d9963d93aa2ffae',
118118
]
119119
end

modules/auxiliary/admin/maxdb/maxdb_cons_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def initialize(info = {})
3737
def run
3838
connect
3939

40-
#Grab the MaxDB info.
40+
# Grab the MaxDB info.
4141
pdbmsrv = "\x5A\x00\x00\x00\x03\x5B\x00\x00\x01\x00\x00\x00\xFF\xFF\xFF\xFF"
4242
pdbmsrv << "\x00\x00\x04\x00\x5A\x00\x00\x00\x00\x02\x42\x00\x04\x09\x00\x00"
4343
pdbmsrv << "\x00\x40\x00\x00\xD0\x3F\x00\x00\x00\x40\x00\x00\x70\x00\x00\x00"
@@ -60,7 +60,7 @@ def run
6060
print_status(info)
6161
end
6262

63-
#Send our command.
63+
# Send our command.
6464
len = 39 + datastore['CMD'].length
6565

6666
data = len.chr + "\x00\x00\x00\x03\x3F\x00\x00\x01\x00\x00\x00\x54\x0D\x00\x00"

modules/auxiliary/admin/misc/sercomm_dump_config.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def initialize(info={})
4747
'License' => MSF_LICENSE,
4848
'Author' =>
4949
[
50-
'Eloi Vanderbeken <eloi.vanderbeken[at]gmail.com>', #Initial discovery, poc
51-
'Matt "hostess" Andreko <mandreko[at]accuvant.com>' #Msf module
50+
'Eloi Vanderbeken <eloi.vanderbeken[at]gmail.com>', # Initial discovery, poc
51+
'Matt "hostess" Andreko <mandreko[at]accuvant.com>' # Msf module
5252
],
5353
'References' =>
5454
[
@@ -174,7 +174,7 @@ def dump_configuration
174174

175175
unless length == data.length
176176
vprint_warning("#{peer} - Inconsistent length / data packet")
177-
#return nil
177+
# return nil
178178
end
179179

180180
return { :length => length, :data => data }

modules/auxiliary/admin/mssql/mssql_enum.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def run
4848
:type => 'MSSQL_ENUM',
4949
:data => "Version: #{sqlversion}")
5050

51-
#-------------------------------------------------------
52-
#Check Configuration Parameters and check what is enabled
51+
#---------------------------------------------------------
52+
# Check Configuration Parameters and check what is enabled
5353
print_status("Configuration Parameters:")
5454
if vernum.join != "2000"
5555
query = "SELECT name, CAST(value_in_use AS INT) from sys.configurations"
@@ -59,7 +59,7 @@ def run
5959
sysconfig[l[0].strip] = l[1].to_i
6060
end
6161
else
62-
#enable advanced options
62+
# enable advanced options
6363
mssql_query("EXEC sp_configure \'show advanced options\', 1; RECONFIGURE")[:rows]
6464
query = "EXECUTE sp_configure"
6565
ver = mssql_query(query)[:rows]
@@ -71,7 +71,7 @@ def run
7171
end
7272

7373
#-------------------------------------------------------
74-
#checking for C2 Audit Mode
74+
# checking for C2 Audit Mode
7575
if sysconfig['c2 audit mode'] == 1
7676
print_status("\tC2 Audit Mode is Enabled")
7777
report_note(:host => datastore['RHOST'],
@@ -89,7 +89,7 @@ def run
8989
end
9090

9191
#-------------------------------------------------------
92-
#check if xp_cmdshell is enabled
92+
# check if xp_cmdshell is enabled
9393
if vernum.join != "2000"
9494
if sysconfig['xp_cmdshell'] == 1
9595
print_status("\txp_cmdshell is Enabled")
@@ -126,7 +126,7 @@ def run
126126
end
127127

128128
#-------------------------------------------------------
129-
#check if remote access is enabled
129+
# check if remote access is enabled
130130
if sysconfig['remote access'] == 1
131131
print_status("\tremote access is Enabled")
132132
report_note(:host => datastore['RHOST'],
@@ -162,7 +162,7 @@ def run
162162
end
163163

164164
#-------------------------------------------------------
165-
#check if Mail stored procedures are enabled
165+
# check if Mail stored procedures are enabled
166166
if vernum.join != "2000"
167167
if sysconfig['Database Mail XPs'] == 1
168168
print_status("\tDatabase Mail XPs is Enabled")
@@ -199,7 +199,7 @@ def run
199199
end
200200

201201
#-------------------------------------------------------
202-
#check if OLE stored procedures are enabled
202+
# check if OLE stored procedures are enabled
203203
if vernum.join != "2000"
204204
if sysconfig['Ole Automation Procedures'] == 1
205205
print_status("\tOle Automation Procedures are Enabled")
@@ -451,7 +451,7 @@ def run
451451
end
452452

453453
#-------------------------------------------------------
454-
#Check for local accounts with same username as password
454+
# Check for local accounts with same username as password
455455
sameasuser = []
456456
if vernum.join != "2000"
457457
sameasuser = mssql_query("SELECT name FROM sys.sql_logins WHERE PWDCOMPARE\(name, password_hash\) = 1")[:rows]
@@ -479,7 +479,7 @@ def run
479479
end
480480

481481
#-------------------------------------------------------
482-
#Check for local accounts with empty password
482+
# Check for local accounts with empty password
483483
blankpass = []
484484
if vernum.join != "2000"
485485
blankpass = mssql_query("SELECT name FROM sys.sql_logins WHERE PWDCOMPARE\(\'\', password_hash\) = 1")[:rows]
@@ -507,7 +507,7 @@ def run
507507
end
508508

509509
#-------------------------------------------------------
510-
#Check for dangerous stored procedures
510+
# Check for dangerous stored procedures
511511
fountsp = []
512512
dangeroussp = [
513513
'sp_createorphan',
@@ -732,7 +732,7 @@ def run
732732
end
733733

734734
#-------------------------------------------------------
735-
#Enumerate Instances
735+
# Enumerate Instances
736736
instances =[]
737737
if vernum.join != "2000"
738738
querykey = "EXEC master..xp_regenumvalues \'HKEY_LOCAL_MACHINE\',\'SOFTWARE\\Microsoft\\Microsoft SQL Server\\Instance Names\\SQL\'"
@@ -769,7 +769,7 @@ def run
769769
end
770770

771771
#---------------------------------------------------------
772-
#Enumerate under what accounts the instance services are running under
772+
# Enumerate under what accounts the instance services are running under
773773
print_status("Default Server Instance SQL Server Service is running under the privilege of:")
774774
privdflt = mssql_query("EXEC master..xp_regread \'HKEY_LOCAL_MACHINE\' ,\'SYSTEM\\CurrentControlSet\\Services\\MSSQLSERVER\',\'ObjectName\'")[:rows]
775775
if privdflt != nil

modules/auxiliary/admin/mssql/mssql_escalate_dbowner_sqli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def check_trust_dbs
150150
return nil
151151
end
152152

153-
#Parse results
153+
# Parse results
154154
parsed_result = res.body.scan(/#{clue_start}(.*?)#{clue_end}/m)
155155

156156
if parsed_result && !parsed_result.empty?

modules/auxiliary/admin/mssql/mssql_findandsampledata.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def run_host(ip)
5353

5454
def sql_statement()
5555

56-
#DEFINED HEADER TEXT
56+
# DEFINED HEADER TEXT
5757
headings = [
5858
["Server","Database", "Schema", "Table", "Column", "Data Type", "Sample Data","Row Count"]
5959
]
6060

61-
#DEFINE SEARCH QUERY AS VARIABLE
61+
# DEFINE SEARCH QUERY AS VARIABLE
6262
sql = "
6363
-- CHECK IF VERSION IS COMPATABLE = > than 2000
6464
IF (SELECT SUBSTRING(CAST(SERVERPROPERTY('ProductVersion') as VARCHAR), 1,
@@ -341,11 +341,11 @@ def sql_statement()
341341

342342

343343

344-
#STATUSING
344+
# STATUSING
345345
print_line(" ")
346346
print_status("Attempting to connect to the SQL Server at #{rhost}:#{rport}...")
347347

348-
#CREATE DATABASE CONNECTION AND SUBMIT QUERY WITH ERROR HANDLING
348+
# CREATE DATABASE CONNECTION AND SUBMIT QUERY WITH ERROR HANDLING
349349
begin
350350
result = mssql_query(sql, false) if mssql_login_datastore
351351
column_data = result[:rows]
@@ -355,14 +355,14 @@ def sql_statement()
355355
return
356356
end
357357

358-
#CREATE TABLE TO STORE SQL SERVER DATA LOOT
358+
# CREATE TABLE TO STORE SQL SERVER DATA LOOT
359359
sql_data_tbl = Rex::Ui::Text::Table.new(
360360
'Header' => 'SQL Server Data',
361361
'Indent' => 1,
362362
'Columns' => ['Server', 'Database', 'Schema', 'Table', 'Column', 'Data Type', 'Sample Data', 'Row Count']
363363
)
364364

365-
#STATUSING
365+
# STATUSING
366366
print_status("Attempting to retrieve data ...")
367367

368368
if (column_data.count < 7)
@@ -386,15 +386,15 @@ def sql_statement()
386386
print_line(" ")
387387
end
388388

389-
#SETUP ROW WIDTHS
389+
# SETUP ROW WIDTHS
390390
widths = [0, 0, 0, 0, 0, 0, 0, 0]
391391
(column_data|headings).each { |row|
392392
0.upto(7) { |col|
393393
widths[col] = row[col].to_s.length if row[col].to_s.length > widths[col]
394394
}
395395
}
396396

397-
#PRINT HEADERS
397+
# PRINT HEADERS
398398
buffer1 = ""
399399
buffer2 = ""
400400
headings.each { |row|
@@ -406,7 +406,7 @@ def sql_statement()
406406
buffer2 = buffer2.chomp(",")+ "\n"
407407
}
408408

409-
#PRINT DIVIDERS
409+
# PRINT DIVIDERS
410410
buffer1 = ""
411411
buffer2 = ""
412412
headings.each { |row|
@@ -417,7 +417,7 @@ def sql_statement()
417417
print_line(buffer1)
418418
}
419419

420-
#PRINT DATA
420+
# PRINT DATA
421421
buffer1 = ""
422422
buffer2 = ""
423423
print_line("")
@@ -429,7 +429,7 @@ def sql_statement()
429429
print_line(buffer1)
430430
buffer2 = buffer2.chomp(",")+ "\n"
431431

432-
#WRITE QUERY OUTPUT TO TEMP REPORT TABLE
432+
# WRITE QUERY OUTPUT TO TEMP REPORT TABLE
433433
sql_data_tbl << [row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7]]
434434

435435
buffer1 = ""
@@ -448,7 +448,7 @@ def sql_statement()
448448
)
449449
end
450450

451-
#CONVERT TABLE TO CSV AND WRITE TO FILE
451+
# CONVERT TABLE TO CSV AND WRITE TO FILE
452452
if (save_loot=="yes")
453453
filename= "#{datastore['RHOST']}-#{datastore['RPORT']}_sqlserver_query_results.csv"
454454
path = store_loot("mssql.data", "text/plain", datastore['RHOST'], sql_data_tbl.to_csv, filename, "SQL Server query results",this_service)

0 commit comments

Comments
 (0)