Showing 15,831 of 21,886 total issues
Method mouse
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def mouse(mouseaction, x=-1, y=-1)
request = Packet.create_request(COMMAND_ID_STDAPI_UI_SEND_MOUSE)
action = 0
case mouseaction
when "move"
Method cmd_rmdir
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_rmdir(*args)
if args.include?('-h') || args.include?('--help')
cmd_rmdir_help
return
end
Method get_processes
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def Process.get_processes
request = Packet.create_request(COMMAND_ID_STDAPI_SYS_PROCESS_GET_PROCESSES)
processes = ProcessList.new
response = client.send_request(request)
Method to_exe_elf
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.to_exe_elf(framework, opts, template, code, big_endian=false)
if elf? code
return code
end
Method normalize_references
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def normalize_references(refs)
normalized = ''
cve_collection = refs.select { |r| r.ctx_id.match(/^cve$/i) }
if cve_collection.empty?
normalized << "* #{NO_CVE_MESSAGE}\n"
Method query
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def query(sql)
write_message(Query.new(sql))
result = Result.new
errors = []
Method show_options
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def show_options(mod) # :nodoc:
mod_opt = Serializer::ReadableText.dump_options(mod, ' ')
print("\nModule options (#{mod.fullname}):\n\n#{mod_opt}\n") if (mod_opt and mod_opt.length > 0)
# If it's an exploit and a payload is defined, create it and
Method cmd_loadpath_tabs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_loadpath_tabs(str, words)
return [] if words.length > 1
# This custom completion might better than Readline's... We'll leave it for now.
#tab_complete_filenames(str,words)
Method cmd_route_tabs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_route_tabs(str, words)
if words.length == 1
return %w{add remove get flush print}
end
Method cmd_resource
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_resource(*args)
if args.empty? || args.include?('-h') || args.include?('--help')
cmd_resource_help
return false
end
Method cmd_shell
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_shell(*args)
if args.length == 1 && (args[0] == '-h' || args[0] == '--help')
# One arg, and args[0] => '-h' '--help'
return cmd_shell_help
end
Method shell_read_until_token
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def shell_read_until_token(token, wanted_idx=0, timeout=10)
return if timeout.to_i == 0
if wanted_idx == 0
parts_needed = 2
Method get_notes
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_notes(xopts)
::ApplicationRecord.connection_pool.with_connection {
opts, wspace = init_db_opts_workspace(xopts)
notes = []
Method _run_payload
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _run_payload(mod, opts)
badchars = opts['BadChars'] || ''
fmt = opts['Format'] || 'raw'
force = opts['ForceEncode'] || false
template = opts['Template'] || nil
Method rpc_services
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rpc_services( xopts)
::ApplicationRecord.connection_pool.with_connection {
opts, wspace = init_db_opts_workspace(xopts)
limit = opts.delete(:limit) || 100
offset = opts.delete(:offset) || 0
Method rpc_hosts
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rpc_hosts(xopts)
::ApplicationRecord.connection_pool.with_connection {
opts, wspace = init_db_opts_workspace(xopts)
conditions = {}
Method export_to_hash
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def export_to_hash(config)
return {} unless config.is_a? String
config = config.gsub(/^\s{2,4}/, '') # replace code indents
config = config.gsub(/\\\s*\n/, '') # replace verbose multiline items as single lines, similar to terse
Method describe_response
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def describe_response(response)
decoded = Resolv::DNS::Message.decode(response)
answers = decoded.answer
if answers.empty? # not sure this will ever happen...
Method create_credential_and_login
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_credential_and_login(opts = {})
return nil unless active_db?
if respond_to?(:[]) && self[:task]
opts[:task_id] ||= self[:task].record.id
Method get_api_docs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.get_api_docs
lambda {
swaggered_classes = [
Msf::WebServices::Documentation::Api::V1::RootApiDoc,
Msf::WebServices::Documentation::Api::V1::AuthApiDoc,