Showing 16,139 of 22,252 total issues
Method create_library
has 3116 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_library(constant_manager, library_path = 'kernel32')
dll = Library.new(library_path, constant_manager)
dll.add_function( 'GetConsoleWindow', 'LPVOID',[])
Method create_library
has 2604 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_library(constant_manager, library_path = 'user32')
dll = Library.new(library_path, constant_manager)
dll.add_function('ActivateKeyboardLayout', 'DWORD',[
["DWORD","hkl","in"],
Method run
has a Cognitive Complexity of 473 (exceeds 5 allowed). Consider refactoring. Open
def run
max_search = datastore['MAX_SEARCH']
db, dbfile = create_sqlite_db
print_status "Temporary database created: #{dbfile.path}"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_library
has 1849 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_library(constant_manager, library_path = 'advapi32')
dll = Library.new(library_path, constant_manager)
dll.add_function('QueryServiceStatus', 'DWORD', [
['LPVOID', 'hService', 'in'],
File def_kernel32.rb
has 3128 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
Method cmd_wmap_run
has a Cognitive Complexity of 421 (exceeds 5 allowed). Consider refactoring. Open
def cmd_wmap_run(*args)
# Stop everything
self.masstop = false
self.killwhenstop = true
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File def_user32.rb
has 2616 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
File error.rb
has 2530 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf::Post::Windows::Error
SUCCESS = 0x0000
INVALID_FUNCTION = 0x0001
FILE_NOT_FOUND = 0x0002
PATH_NOT_FOUND = 0x0003
File g711.rb
has 2166 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Rex
module Proto
module IAX2
module Codecs
class G711
File core.rb
has 2165 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'msf/core/opt_condition'
require 'optparse'
module Msf
module Ui
File dtc.rb
has 2078 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
class Post
module Hardware
module Automotive
File db.rb
has 1967 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'json'
require 'rexml/document'
require 'metasploit/framework/data_service'
require 'metasploit/framework/data_service/remote/http/core'
File def_advapi32.rb
has 1875 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
File nessus.rb
has 1810 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'nessus_rest'
module Msf
PLUGIN_NAME = 'Nessus'.freeze
PLUGIN_DESCRIPTION = 'Nessus Bridge for Metasploit'.freeze
Method mikrotik_routeros_config_eater
has a Cognitive Complexity of 228 (exceeds 5 allowed). Consider refactoring. Open
def mikrotik_routeros_config_eater(thost, tport, config)
if framework.db.active
credential_data = {
address: thost,
port: tport,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cmd_sessions
has a Cognitive Complexity of 222 (exceeds 5 allowed). Consider refactoring. Open
def cmd_sessions(*args)
begin
method = nil
quiet = false
show_active = false
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File wmap.rb
has 1645 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'English'
require 'rabal/tree'
module Msf
class Plugin::Wmap < Msf::Plugin
Method on_request_uri
has 867 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
if request.uri =~ %r{/apple-touch-icon*}
return
elsif request.uri =~ %r{/favicon*}
return
Method is_match
has a Cognitive Complexity of 207 (exceeds 5 allowed). Consider refactoring. Open
def is_match(params, module_metadata)
return true if params.empty?
param_hash = params
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cisco_ios_config_eater
has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring. Open
def cisco_ios_config_eater(thost, tport, config)
if framework.db.active
credential_data = {
address: thost,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"