Skip to content

Commit 0f27c63

Browse files
committed
fix msftidy warnings
1 parent fef9c67 commit 0f27c63

36 files changed

+659
-659
lines changed

modules/auxiliary/admin/smb/psexec_command.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ def get_output(file)
124124
vprint_line("#{output}")
125125

126126
report_note(
127-
:rhost => datastore['RHOSTS'],
128-
:rport => datastore['RPORT'],
127+
:rhost => datastore['RHOSTS'],
128+
:rport => datastore['RPORT'],
129129
:type => "psexec_command",
130-
:name => datastore['COMMAND'],
130+
:name => datastore['COMMAND'],
131131
:data => output
132132
)
133133

modules/auxiliary/pdf/foxit/authbypass.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run
5151
end
5252

5353
#http://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/
54-
def nObfu(str)
54+
def n_obfu(str)
5555
result = ""
5656
str.scan(/./u) do |c|
5757
if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
@@ -63,19 +63,19 @@ def nObfu(str)
6363
result
6464
end
6565

66-
def RandomNonASCIIString(count)
66+
def random_non_ascii_string(count)
6767
result = ""
6868
count.times do
6969
result << (rand(128) + 128).chr
7070
end
7171
result
7272
end
7373

74-
def ioDef(id)
74+
def io_def(id)
7575
"%d 0 obj" % id
7676
end
7777

78-
def ioRef(id)
78+
def io_ref(id)
7979
"%d 0 R" % id
8080
end
8181

@@ -87,17 +87,17 @@ def make_pdf(exec)
8787

8888
# Randomize PDF version?
8989
pdf = "%%PDF-%d.%d" % [1 + rand(2), 1 + rand(5)] << eol
90-
pdf << "%" << RandomNonASCIIString(4) << eol
90+
pdf << "%" << random_non_ascii_string(4) << eol
9191
xref << pdf.length
92-
pdf << ioDef(1) << nObfu("<</Type/Catalog/Outlines ") << ioRef(2) << nObfu("/Pages ") << ioRef(3) << nObfu("/OpenAction ") << ioRef(5) << ">>" << endobj
92+
pdf << io_def(1) << n_obfu("<</Type/Catalog/Outlines ") << io_ref(2) << n_obfu("/Pages ") << io_ref(3) << n_obfu("/OpenAction ") << io_ref(5) << ">>" << endobj
9393
xref << pdf.length
94-
pdf << ioDef(2) << nObfu("<</Type/Outlines/Count 0>>") << endobj
94+
pdf << io_def(2) << n_obfu("<</Type/Outlines/Count 0>>") << endobj
9595
xref << pdf.length
96-
pdf << ioDef(3) << nObfu("<</Type/Pages/Kids[") << ioRef(4) << nObfu("]/Count 1>>") << endobj
96+
pdf << io_def(3) << n_obfu("<</Type/Pages/Kids[") << io_ref(4) << n_obfu("]/Count 1>>") << endobj
9797
xref << pdf.length
98-
pdf << ioDef(4) << nObfu("<</Type/Page/Parent ") << ioRef(3) << nObfu("/MediaBox[0 0 612 792]>>") << endobj
98+
pdf << io_def(4) << n_obfu("<</Type/Page/Parent ") << io_ref(3) << n_obfu("/MediaBox[0 0 612 792]>>") << endobj
9999
xref << pdf.length
100-
pdf << ioDef(5) << "<</Type/Action/S/Launch/F << /F(#{exec})>>/NewWindow true\n" + ioRef(6) + ">>" << endobj
100+
pdf << io_def(5) << "<</Type/Action/S/Launch/F << /F(#{exec})>>/NewWindow true\n" + io_ref(6) + ">>" << endobj
101101
xref << pdf.length
102102
pdf << endobj
103103
xrefPosition = pdf.length
@@ -107,7 +107,7 @@ def make_pdf(exec)
107107
xref.each do |index|
108108
pdf << "%010d 00000 n" % index << eol
109109
end
110-
pdf << "trailer" << nObfu("<</Size %d/Root " % (xref.length + 1)) << ioRef(1) << ">>" << eol
110+
pdf << "trailer" << n_obfu("<</Size %d/Root " % (xref.length + 1)) << io_ref(1) << ">>" << eol
111111
pdf << "startxref" << eol
112112
pdf << xrefPosition.to_s() << eol
113113
pdf << "%%EOF" << eol

modules/auxiliary/scanner/http/ektron_cms400net.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def run_host(ip)
9393
eventvalidation = ""
9494
end
9595

96-
GetVersion()
96+
get_version
9797

9898
print_status "Testing passwords at #{target_url}"
9999
each_user_pass { |user, pass|
@@ -109,7 +109,7 @@ def run_host(ip)
109109
end
110110
end
111111

112-
def GetVersion
112+
def get_version
113113
#Attempt to retrieve the version of CMS400.NET installed.
114114
#Not always possible based on version/config.
115115
payload = "http://#{vhost}:#{rport}/WorkArea/java/ektron.site-data.js.ashx"

modules/auxiliary/scanner/http/jenkins_enum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def parse_system_info(body)
217217

218218
# Report a fingerprint.match for OS fingerprinting support, tied to this service
219219
report_note(:host => rhost, :port => rport, :proto => 'tcp', :ntype => 'fingerprint.match', :data => fprint)
220-
220+
221221
# Report a jenkins information note for future analysis, tied to this service
222222
report_note(:host => rhost, :port => rport, :proto => 'tcp', :ntype => 'jenkins.info', :data => jinfo)
223223

modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def run_host(ip)
4747
return
4848
end
4949

50-
getEnvironment(ip)
50+
get_environment(ip)
5151
end
5252

53-
def getEnvironment(rhost)
53+
def get_environment(rhost)
5454
print_status("#{rhost}:#{rport} [SAP] Connecting to SAP Management Console SOAP Interface ")
5555
success = false
5656

modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def run_host(ip)
4747
return
4848
end
4949

50-
getStartProfile(ip)
50+
get_start_profile(ip)
5151
end
5252

53-
def getStartProfile(rhost)
53+
def get_start_profile(rhost)
5454
print_status("#{rhost}:#{rport} [SAP] Connecting to SAP Management Console SOAP Interface")
5555
success = false
5656
soapenv ='http://schemas.xmlsoap.org/soap/envelope/'

modules/auxiliary/scanner/smb/smb_enumusers_domain.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def parse_value(resp, idx)
5151
return value,idx
5252
end
5353

54-
def parse_NetWkstaEnumUsersInfo(resp)
54+
def parse_net_wksta_enum_users_info(resp)
5555
accounts = [ Hash.new() ]
5656

5757
#print_debug resp[0,20].unpack("H*")
@@ -130,7 +130,7 @@ def run_host(ip)
130130

131131
resp = dcerpc.last_response ? dcerpc.last_response.stub_data : nil
132132

133-
accounts = parse_NetWkstaEnumUsersInfo(resp)
133+
accounts = parse_net_wksta_enum_users_info(resp)
134134
accounts.shift
135135

136136
if datastore['VERBOSE']

modules/auxiliary/scanner/vmware/esx_fingerprint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def fingerprint_vmware(ip,res)
8080
print_good("#{rhost}:#{rport} - Identified #{full_match[1]}")
8181
report_service(:host => (this_host || ip), :port => rport, :proto => 'tcp', :name => 'https', :info => full_match[1])
8282
end
83-
83+
8484
if os_match and ver_match and build_match
8585
if os_match[1] =~ /ESX/ or os_match[1] =~ /vCenter/
8686
# Report a fingerprint match for OS identification

modules/auxiliary/scanner/vmware/vmware_http_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def fingerprint_vmware(res)
119119
:host => ip,
120120
:ntype => 'fingerprint.match',
121121
:data => {'os.vendor' => 'VMware', 'os.product' => os_match[1] + " " + ver_match[1], 'os.version' => build_match[1] }
122-
)
122+
)
123123
end
124124
return true
125125
else

modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def exploit
7474

7575
def trailer(root_obj)
7676
id = @xref.keys.max+1
77-
"trailer" << eol << "<</Size %d/Root " % id << ioRef(root_obj) << ">>" << eol
77+
"trailer" << eol << "<</Size %d/Root " % id << io_ref(root_obj) << ">>" << eol
7878
end
7979

8080
def add_compressed(n, data)

0 commit comments

Comments
 (0)