File kiwi.rb
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rex/post/meterpreter'
module Rex
module Post
module Meterpreter
Class Kiwi
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class Console::CommandDispatcher::Kiwi
Klass = Console::CommandDispatcher::Kiwi
include Console::CommandDispatcher
Method scrape_passwords
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def scrape_passwords(provider, method, args)
if args.include?('-h')
cmd_creds_usage(provider)
return
end
- 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_password_change
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def cmd_password_change(*args)
if args.length == 0 || args.include?('-h')
cmd_password_change_usage
return
end
- 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 scrape_passwords
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
def scrape_passwords(provider, method, args)
if args.include?('-h')
cmd_creds_usage(provider)
return
end
Method cmd_golden_ticket_create
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_golden_ticket_create(*args)
if args.include?("-h")
golden_ticket_create_usage
return
Method cmd_golden_ticket_create
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def cmd_golden_ticket_create(*args)
if args.include?("-h")
golden_ticket_create_usage
return
- 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_password_change
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_password_change(*args)
if args.length == 0 || args.include?('-h')
cmd_password_change_usage
return
end
Method report_creds
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def report_creds(type, user, domain, secret)
if client&.db_record&.id.nil?
wlog('The session is not stored correctly in the database. Something went wrong.')
return
end
Method report_creds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def report_creds(type, user, domain, secret)
if client&.db_record&.id.nil?
wlog('The session is not stored correctly in the database. Something went wrong.')
return
end
- 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_wifi_list_shared
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cmd_wifi_list_shared(*args)
interfaces_dir = client.sys.config.getenv('AllUsersProfile') + '\Microsoft\Wlansvc\Profiles\Interfaces'
files = client.fs.file.search(interfaces_dir, '*.xml', true)
if files.length == 0
- 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"