Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SpaceBeforeModifierKeyword Rubocop warning #3588

Merged
merged 1 commit into from
Aug 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/auxiliary/scanner/http/nginx_source_disclosure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def run_host(ip)
save_source.puts(res.body.to_s)
save_source.close

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

else
print_error("http://#{vhost}:#{rport} - nginx - Unrecognized #{res.code} response")
Expand Down
16 changes: 8 additions & 8 deletions modules/auxiliary/scanner/smtp/smtp_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def smtp_send(data=nil)

def run_host(ip)
users_found = {}
result = nil # temp for storing result of SMTP request
code = 0 # status code parsed from result
vrfy = true # if vrfy allowed
expn = true # if expn allowed
rcpt = true # if rcpt allowed and useful
result = nil # temp for storing result of SMTP request
code = 0 # status code parsed from result
vrfy = true # if vrfy allowed
expn = true # if expn allowed
rcpt = true # if rcpt allowed and useful
usernames = extract_words(datastore['USER_FILE'])

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

domain = result.split()[1]
domain = 'localhost' if(domain == '' or not domain or domain.downcase == 'hello')
domain = 'localhost' if(domain == '' or not domain or domain.downcase == 'hello')


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

result, code = smtp_send("VRFY root\r\n")
vrfy = (code == 250)
users_found = do_enum('VRFY', usernames) if (vrfy)
users_found = do_enum('VRFY', usernames) if (vrfy)

if(users_found.empty?)
# VRFY failed, lets try EXPN
result, code = smtp_send("EXPN root\r\n")
expn = (code == 250)
users_found = do_enum('EXPN', usernames) if(expn)
users_found = do_enum('EXPN', usernames) if(expn)
end

if(users_found.empty?)
Expand Down
8 changes: 2 additions & 6 deletions plugins/wmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
# Web assessment for the metasploit framework
# Efrain Torres - et[ ] metasploit.com 2012
#
# $Id$
# $Revision$
#

require 'rabal/tree'
require 'msf/core/rpc/v10/client'
#require 'fileutils'

module Msf

Expand Down Expand Up @@ -931,7 +927,7 @@ def cmd_wmap_run(*args)
end
end

datastr = temparr.join("&") if (temparr and not temparr.empty?)
datastr = temparr.join("&") if (temparr and not temparr.empty?)

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

Expand Down Expand Up @@ -1070,7 +1066,7 @@ def cmd_wmap_run(*args)
end
end

datastr = temparr.join("&") if (temparr and not temparr.empty?)
datastr = temparr.join("&") if (temparr and not temparr.empty?)

modopts['METHOD'] = req.method.upcase
modopts['PATH'] = req.path
Expand Down
6 changes: 3 additions & 3 deletions scripts/meterpreter/service_permissions_escalate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
handler.datastore['ExitOnSession'] = false
#start a handler to be ready
handler.exploit_simple(
'Payload' => handler.datastore['PAYLOAD'],
'RunAsJob' => true
'Payload' => handler.datastore['PAYLOAD'],
'RunAsJob' => true
)

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