Showing 15,730 of 21,757 total issues
Method fingerprint_service
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fingerprint_service(target_uri)
res = send_request_raw(
'uri' => normalize_uri(target_uri, 'version'),
'method' => 'GET'
)
Method parse_rocketmq_data
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_rocketmq_data(res)
# remove a response header so we have json-ish data
res = res[8..]
# we have 2 json objects appended to each other, so we now need to split that out and make it usable
Method srandom_r
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def srandom_r (seed)
state = @randtbl
if seed == 0
seed = 1
end
Method group_vulns
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def group_vulns(vulns)
return [] if vulns.empty?
vulns = vulns.map do |vuln|
[vuln, Set.new(vuln.refs.map {|r| r.name.upcase})]
Method parse_search_string
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.parse_search_string(search_string)
search_string ||= ''
search_string += ' '
# Split search terms by space, but allow quoted strings
Method encoded_exe
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def encoded_exe(opts={})
# Ensure arch and platform are in the format that to_executable expects
if opts[:arch] and not opts[:arch].kind_of? Array
opts[:arch] = [ opts[:arch] ]
end
Method validate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def validate
# First, validate that a target has been selected
if (target_idx == nil)
raise MissingTargetError,
"A payload cannot be selected until a target is specified.",
Method import_msf_web_vuln_element
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_msf_web_vuln_element(element, options={}, ¬ifier)
options.assert_valid_keys(:allow_yaml, :workspace)
import_msf_web_element(element,
:allow_yaml => options[:allow_yaml],
Method unserialize_object
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def unserialize_object(xml_elem, allow_yaml = false)
return nil unless xml_elem
string = xml_elem.text.to_s.strip
return string unless string.is_a?(String)
return nil if (string.empty? || string.nil?)
Method import_amap_log
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_amap_log(args={}, &block)
data = args[:data]
wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
Method add_javascript_interface_exploit_js
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add_javascript_interface_exploit_js(arch)
%Q|
function exec(runtime, cmdArr) {
var ch = 0;
var output = '';
Method vim_powerOFF_vm
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def vim_powerOFF_vm(vm_ref)
soap_data = vim_soap_envelope(vim_soap_power_off_vm(vm_ref))
res = vim_send_soap_request(soap_data)
if res.class == Hash
task_id = res['PowerOffVM_TaskResponse']['returnval']
Method vim_powerON_vm
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def vim_powerON_vm(vm_ref)
soap_data = vim_soap_envelope(vim_soap_power_on_vm(vm_ref))
res = vim_send_soap_request(soap_data)
if res.class == Hash
task_id = res['PowerOnVM_TaskResponse']['returnval']
Method vim_get_dcs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def vim_get_dcs
soap_data = vim_soap_envelope(vim_soap_retrieve_service_content)
res = vim_send_soap_request(soap_data)
if res.class == Hash
@server_objects.merge!(res['RetrieveServiceContentResponse']['returnval'])
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super
register_options(
[
Method wordpress_helper_post_comment
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def wordpress_helper_post_comment(comment, comment_post_id, login_cookie, author, email, url)
vars_post = {
'comment' => comment,
'submit' => 'Post+Comment',
'comment_post_ID' => comment_post_id.to_s,
Method ncs_send_request
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ncs_send_request(opts={}, req=nil, temp: true)
req = generate_req(opts) unless req
return nil unless req
if datastore['NCSTRACE']
Method sign_license_agreement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def sign_license_agreement(cookies, nsp)
if cookies.blank?
return [2, 'Cannot sign the license agreement. The provided cookies are empty or nil.']
end
Method mssql_upload_exec
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def mssql_upload_exec(exe, debug=false)
hex = exe.unpack("H*")[0]
var_bypass = rand_text_alpha(8)
var_payload = rand_text_alpha(8)
Method authenticate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def authenticate(service_name, username, password = nil)
debug { 'Sending SSH_MSG_USERAUTH_REQUEST (publickey)' }
# Corrupt everything after auth method
send_message(userauth_request(