Showing 16,065 of 22,177 total issues
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 redis_command
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def redis_command(*commands)
command_string = printable_redis_response(commands.join(' '))
unless (command_response = send_redis_command(*commands))
vprint_error("No response to '#{command_string}'")
return
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 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_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 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_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 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 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 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 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(
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 exe_init_options
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exe_init_options(opts)
opts.merge!(
{
:template_path => datastore['EXE::Path'],
:template => datastore['EXE::Template'],
Method arp
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def arp(target_ip=nil)
return self.arp_cache[target_ip] if self.arp_cache[target_ip]
return self.arp_cache[:gateway] unless should_arp? target_ip
source_ip = Rex::Socket.source_address(target_ip)
raise RuntimeError, "Could not access the capture process." unless self.arp_capture
Method ascii85_encode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ascii85_encode(stream)
eod = "~>"
i = 0
code = ""
input = stream.dup