Showing 15,831 of 21,886 total issues
Method handle_ip360_v3_vuln
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_ip360_v3_vuln(wspace,hobj,port,proto,hname,vulnid,vulnname,cves,bids,task=nil)
info = { :workspace => wspace, :host => hobj, :port => port, :proto => proto, :task => task }
if hname != "unknown" and hname[-1,1] != "?"
info[:name] = hname
end
Method create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create(name, aliased_as: nil)
# First, a direct alias check
return create(self.aliases[name], aliased_as: name) if self.aliases[name]
# Check to see if it has a module type prefix. If it does,
Method report_session_event
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def report_session_event(opts)
return if not active
raise ArgumentError.new("Missing required option :session") if opts[:session].nil?
raise ArgumentError.new("Expected an :etype") unless opts[:etype]
session = nil
Method report_artifact
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def report_artifact(opts)
return if not active
artifacts_dir = Report::ARTIFACT_DIR
tmp_path = opts[:file_path]
Method connect
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def connect
handle = nil
if(not @oci8_loaded)
raise RuntimeError, "Could not load the Oracle driver (oci8): #{@oci8_error}"
Method vim_find_vm_by_name
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def vim_find_vm_by_name(name)
vim_setup_references
@dcs.each do |dc|
soap_data = vim_soap_envelope(vim_soap_retrieve_properties('vmFolder', 'Datacenter' , dc['ref']))
res = vim_send_soap_request(soap_data)
Method plugin_integration
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def plugin_integration(sesskey, file_id, plugin_name, type = 'theme')
res = send_request_cgi(
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'admin', 'tool', 'installaddon', 'index.php'),
'keep_cookies' => true,
Method remove_plugin
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def remove_plugin(addon_name, moodle_version, sesskey)
if moodle_version < Rex::Version.new('3.9.0')
send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'admin', 'index.php'),
Method exec_pod
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exec_pod(name, namespace, command, options = {})
options = {
'stdin' => false,
'stdout' => false,
'stderr' => false,
Method wordpress_upload_plugin
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def wordpress_upload_plugin(name, zip, cookie)
nonce = wordpress_helper_get_plugin_upload_nonce(cookie)
if nonce.nil?
vprint_error("Failed to acquire the plugin upload nonce")
return false
Method wexec
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def wexec(disconnect=true)
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")
handle = dcerpc_handle('367abb81-9844-35f1-ad32-98f038001003', '2.0', 'ncacn_np', ["\\svcctl"])
vprint_status("Binding to #{handle} ...")
dcerpc_bind(handle)
Method dns_bruteforce
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def dns_bruteforce(domain, wordlist, threads)
return if wordlist.blank?
threads = 1 if threads <= 0
queue = []
Method encode_payload
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def encode_payload(shellcode)
shellcode = shellcode.dup
encoder_list = get_encoders(shellcode)
if encoder_list.empty?
cli_print "No encoder specified, outputting raw payload"
Method generate_reverse_tcp
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_reverse_tcp(opts={})
# Set up the socket
cmd = "import socket,zlib,base64,struct#{opts[:retry_wait].to_i > 0 ? ',time' : ''}\n"
if opts[:retry_wait].blank? # do not retry at all (old style)
cmd << "s=socket.socket(2,socket.SOCK_STREAM)\n" # socket.AF_INET = 2
Method find_actual_payload
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def find_actual_payload
return if not actual_payload.nil?
# Look for one based on the exploit's compatible set
if(assoc_exploit)
Method generate_migrate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_migrate(opts={})
%Q^
load_ws2_32:
push '32'
push 'ws2_'
Method generate_stage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_stage(opts={})
conf = opts[:datastore] || datastore
conf[:staged] = true
stage_uuid = opts[:uuid] || uuid
key, nonce = retrieve_chacha_creds(stage_uuid)
Method assert_compatible
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.assert_compatible(pe, arch)
unless (arch == ARCH_X86 && pe.ptr_32?) || (arch == ARCH_X64 && pe.ptr_64?)
raise Msf::ValidationError, "Selected PE file is not #{arch}"
end
Method get_vecs_entries
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_vecs_entries(vecs_store)
return nil unless command_exists? vecs_bin
out = cmd_exec("#{vecs_bin} entry list --store #{vecs_store}")
return nil if out.nil?
Method capture_lsa_key
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def capture_lsa_key(bootkey)
vprint_status('Getting PolSecretEncryptionKey...')
pol = registry_getvaldata('HKLM\\SECURITY\\Policy\\PolSecretEncryptionKey', '')
if pol
print_status('XP or below system')