Showing 16,065 of 22,177 total issues
Method parse_msv
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_msv(output)
results = {}
lines = output.lines
while lines.length > 0 do
Method map_compile_arch_to_architecture
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def map_compile_arch_to_architecture(compile_arch)
return '' if compile_arch.blank?
compile_arch = compile_arch.downcase.encode(::Encoding::BINARY)
Method cmd_cd
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_cd(*args)
if args.include?('-h') || args.include?('--help') || args.length != 1
cmd_cd_help
return
end
Method write
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def write(data)
begin
@sock.sync = false
if data.nil?
Timeout.timeout @write_timeout do
Method map_compile_os_to_platform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def map_compile_os_to_platform(compile_os)
return Msf::Platform::Unknown.realname if compile_os.blank?
compile_os = compile_os.downcase.encode(::Encoding::BINARY)
Method allowed?
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def allowed?(uri, user_agent)
return true unless @parsed
allowed = true
path = uri.request_uri
Method cmd_loadpath
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_loadpath(*args)
if (args.length == 0 or args.include? "-h")
cmd_loadpath_help
return true
end
Method ysoserial_payload
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.ysoserial_payload(payload_name, command=nil, modified_type: 'none')
payloads_json = load_ysoserial_data(modified_type)
# Extract the specified payload (status, lengthOffset, bufferOffset, bytes)
payload = payloads_json[payload_name]
Method cmd_to_handler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_to_handler(*args)
if args.include?('-r') || args.include?('--reload-libs')
driver.run_single('reload_lib -a')
end
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(framework, console_id, opts={})
# Configure the framework
self.framework = framework
# Configure the ID
Method lookup_proxy_settings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def lookup_proxy_settings
info = {}
return @proxy_settings if @proxy_settings
if datastore['HttpProxyHost'].to_s == ''
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super
register_options(
[
Method setup_handler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def setup_handler
ex = false
comm = select_comm
local_port = bind_port
Method do_encode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def do_encode(state)
# Copy the decoder stub since we may need to modify it
stub = decoder_stub(state).dup
Method module_info_by_path_from_database!
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def module_info_by_path_from_database!(allowed_paths=[""])
self.module_info_by_path = {}
allowed_paths = allowed_paths.map{|x| x + "/"}
Method rpc_list
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rpc_list
res = {}
self.framework.sessions.each do |sess|
i,s = sess
res[s.sid] = {
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 counters_expired?
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def counters_expired?(this_service,credentials)
expired_cred = false
expired_time = false
# Workaround for cases where multiple auth_brute modules are running concurrently and
# someone stomps on the @max_per_service class variable during setup.
Method log_resource
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def log_resource(opts = {})
mode = name
vhash = [target.to_url, mode, opts[:location]]
.map(&:to_s).join('|').hash
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'
)