Skip to content

Commit adf03e2

Browse files
author
Tod Beardsley
committed
Fix SpaceBeforeModifierKeyword Rubocop warning
This also deals with some errant tabs where internal spaces should be, as well as one syntax error which was preventing an old meterpreter script from ever working correctly. Some day, we need to get rid of those Meterpeter scripts. Srsly.
1 parent 820ea7e commit adf03e2

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

modules/auxiliary/scanner/http/nginx_source_disclosure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def run_host(ip)
8989
save_source.puts(res.body.to_s)
9090
save_source.close
9191

92-
print_status("#{target_url} - nginx - File successfully saved: #{path_save}#{uri}") if (File.exists?("#{path_save}#{uri}"))
92+
print_status("#{target_url} - nginx - File successfully saved: #{path_save}#{uri}") if (File.exists?("#{path_save}#{uri}"))
9393

9494
else
9595
print_error("http://#{vhost}:#{rport} - nginx - Unrecognized #{res.code} response")

modules/auxiliary/scanner/smtp/smtp_enum.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ def smtp_send(data=nil)
7070

7171
def run_host(ip)
7272
users_found = {}
73-
result = nil # temp for storing result of SMTP request
74-
code = 0 # status code parsed from result
75-
vrfy = true # if vrfy allowed
76-
expn = true # if expn allowed
77-
rcpt = true # if rcpt allowed and useful
73+
result = nil # temp for storing result of SMTP request
74+
code = 0 # status code parsed from result
75+
vrfy = true # if vrfy allowed
76+
expn = true # if expn allowed
77+
rcpt = true # if rcpt allowed and useful
7878
usernames = extract_words(datastore['USER_FILE'])
7979

8080
cmd = 'HELO' + " " + "localhost" + "\r\n"
@@ -94,20 +94,20 @@ def run_host(ip)
9494
end
9595

9696
domain = result.split()[1]
97-
domain = 'localhost' if(domain == '' or not domain or domain.downcase == 'hello')
97+
domain = 'localhost' if(domain == '' or not domain or domain.downcase == 'hello')
9898

9999

100100
vprint_status("#{ip}:#{rport} Domain Name: #{domain}")
101101

102102
result, code = smtp_send("VRFY root\r\n")
103103
vrfy = (code == 250)
104-
users_found = do_enum('VRFY', usernames) if (vrfy)
104+
users_found = do_enum('VRFY', usernames) if (vrfy)
105105

106106
if(users_found.empty?)
107107
# VRFY failed, lets try EXPN
108108
result, code = smtp_send("EXPN root\r\n")
109109
expn = (code == 250)
110-
users_found = do_enum('EXPN', usernames) if(expn)
110+
users_found = do_enum('EXPN', usernames) if(expn)
111111
end
112112

113113
if(users_found.empty?)

plugins/wmap.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
# Web assessment for the metasploit framework
33
# Efrain Torres - et[ ] metasploit.com 2012
44
#
5-
# $Id$
6-
# $Revision$
7-
#
85

96
require 'rabal/tree'
107
require 'msf/core/rpc/v10/client'
11-
#require 'fileutils'
128

139
module Msf
1410

@@ -931,7 +927,7 @@ def cmd_wmap_run(*args)
931927
end
932928
end
933929

934-
datastr = temparr.join("&") if (temparr and not temparr.empty?)
930+
datastr = temparr.join("&") if (temparr and not temparr.empty?)
935931

936932
if (utest_query.has_key?(signature(form.path,datastr)) == false)
937933

@@ -1070,7 +1066,7 @@ def cmd_wmap_run(*args)
10701066
end
10711067
end
10721068

1073-
datastr = temparr.join("&") if (temparr and not temparr.empty?)
1069+
datastr = temparr.join("&") if (temparr and not temparr.empty?)
10741070

10751071
modopts['METHOD'] = req.method.upcase
10761072
modopts['PATH'] = req.path

scripts/meterpreter/service_permissions_escalate.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
handler.datastore['ExitOnSession'] = false
7979
#start a handler to be ready
8080
handler.exploit_simple(
81-
'Payload' => handler.datastore['PAYLOAD'],
82-
'RunAsJob' => true
81+
'Payload' => handler.datastore['PAYLOAD'],
82+
'RunAsJob' => true
8383
)
8484

8585
#attempt to make new service
@@ -132,7 +132,7 @@
132132
moved = false
133133
configed = false
134134
#default path, but there should be an ImagePath registry key
135-
source = "#{sysdir}\\system32\\#{serv}.exe")
135+
source = "#{sysdir}\\system32\\#{serv}.exe"
136136
#get path to exe; parse out quotes and arguments
137137
sourceorig = registry_getvaldata("#{serviceskey}\\#{serv}","ImagePath").to_s
138138
sourcemaybe = client.fs.file.expand_path(sourceorig)

0 commit comments

Comments
 (0)