Showing 15,831 of 21,886 total issues
Method build_request
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_request(v)
xml = ''
elo = Rex::Text.rand_text_alpha(rand(12)+4)
Method send_crafted_request
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def send_crafted_request(path:, qsl: datastore['MinQSL'], customh_length: 1, cmd: '', allow_retry: true)
uri = Rex::Text.uri_encode(normalize_uri(target_uri.path, path)).gsub(/([?&])/, { '?' => '%3F', '&' => '%26' })
qsl_delta = uri.length - path.length - Rex::Text.uri_encode(target_uri.path).length
if qsl_delta.odd?
fail_with Failure::Unknown, "Got odd qslDelta, that means the URL encoding gone wrong: path=#{path}, qsl_delta=#{qsl_delta}"
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
# if we are using the exec CMD stager
# important to check which php functions are disabled
if datastore['CMD']
p = "passthru(\"%s\");" % datastore['CMD']
Method pick_target
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def pick_target
return target if target.name != 'Automatic'
print_status("Determining target")
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
@username = datastore['USERNAME']
@password = datastore['PASSWORD']
@auth_cookies = ''
p = payload.encoded
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
@use_public_repo = true
datastore['GIT_USERNAME'] = datastore['USERNAME']
datastore['GIT_PASSWORD'] = datastore['PASSWORD']
Method save_page
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def save_page(nodeid, userid, pt_id, payload_url, wi_id, session_info)
print_status("Sending request to '#{target_uri.path}/admin/savepage' to save new page at '#{payload_url}'.")
res = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'admin', 'savepage'),
Method upload_payload
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def upload_payload(backdoor_fname, payload_fname)
p = generate_payload_exe(
code: payload.encoded,
platform: @my_target.platform,
arch: @my_target.arch
Method log_in
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def log_in(username, password)
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path, 'login'),
'keep_cookies' => true
Method change_username
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def change_username(curr_uname, new_uname)
@user_id ||= get_user_id(curr_uname)
headers = {
'X-Requested-With' => 'XMLHttpRequest',
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
@proto = (ssl ? 'https' : 'http')
if (!check.eql? Exploit::CheckCode::Vulnerable) && !datastore['ForceExploit']
fail_with(Failure::NotVulnerable, 'The target is not exploitable.')
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
uri = normalize_uri(target_uri.path)
payload_name = "#{rand_text_alpha(5)}.php"
print_status("Trying to upload #{payload_name} to mma.php Backdoor")
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
print_status("Checking injection...")
if check == Exploit::CheckCode::Vulnerable
Method ognl_append_file
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ognl_append_file(payload_file, payload_chunk)
data_header = datastore['HEADER'] + 'd'
file_header = datastore['HEADER'] + 'f'
headers = {
"#{data_header}": payload_chunk,
Method upload_php?
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def upload_php?(login_token, shell_filename)
vprint_status("Uploading PHP file #{shell_filename}")
vars_form_data =
[
{
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
session_id = login_bypass
fail_with(Failure::NoAccess, 'Login bypass failed') unless session_id
print_good('Login bypass successful')
Method exploit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit
print_status("Checking if the wp-config.php file already exists...")
tpath_wp_config = normalize_uri(datastore['TARGETURI'] + '/../wp-config.php')
response = send_request_cgi({ 'uri' => tpath_wp_config }, timeout = datastore['TIMEOUT'])
Method on_request_uri
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_request_uri(cli, request)
print_status("handling request for #{request.uri}")
case request.uri
when /\.jar$/i
Method create_function?
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_function?(language, func_name)
load_func = ''
case language
when 'perl'
Method on_request_uri
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_request_uri(cli, request)
print_status("handling request for #{request.uri}")
case request.uri
when /\.jar$/i