Showing 7,361 of 22,177 total issues
Method run
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
print_status('Prefetch Gathering started.')
# Check to see what Windows Version is running.
# Needed for offsets.
Method cmd_testerpresent
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_testerpresent(*args)
bus = ''
id = ''
stop = false
stopid = 0
Method cmd_channel
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_channel(*args)
if args.empty? || args.include?('-h')
cmd_channel_help
return
end
Method cmd_analyze
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_analyze(*args)
unless active?
print_error "Not currently connected to a data service for analysis."
return []
end
Similar blocks of code found in 2 locations. Consider refactoring. Open
def initialize(info={})
super(update_info(info,
'Name' => 'Adobe Flash Player ByteArray With Workers Use After Free',
'Description' => %q{
This module exploits a use-after-free vulnerability in Adobe Flash Player. The
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 101.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def initialize(info={})
super(update_info(info,
'Name' => 'Adobe Flash Player UncompressViaZlibVariant Uninitialized Memory',
'Description' => %q{
This module exploits an uninitialized memory vulnerability in Adobe Flash Player. The
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 101.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method run
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
print_status("Get a valid session cookie...")
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'ossim', 'session', 'login.php')
Method run_host
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
ports = datastore['PORTS']
# if port definition has NN then we require INSTANCES
if ports.include? 'NN' and datastore['INSTANCES'].nil?
Method run_host
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
begin
connect
version, motd = rsync_negotiate
unless version
Method run_service
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_service(port, direct)
@rport = port
@smb_direct = direct
ipc_tree = connect_ipc
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(merge_info(info,
'Name' => 'Linux Command Shell, Reverse TCP Inline',
'Description' => 'Connect back to attacker and spawn a command shell',
'Author' => 'civ',
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Maltrail Unauthenticated Command Injection',
Method install_product
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def install_product(token_info)
xml_product = <<-EOF
<?xml version="1.0" encoding="ISO-8859-1"?>
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'Gitlab-shell Code Execution',
'Description' => %q(
This module takes advantage of the addition of authorized
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'Maple Maplet File Creation and Command Execution',
'Description' => %q{
This module harnesses Maple's ability to create files and execute commands
Method req_teamcity_9
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def req_teamcity_9(script_content)
build_id = Rex::Text.rand_text_numeric(8)
xml_payload = %(
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
Method on_request_uri
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
if (request.uri.match(/\.gif/i))
data = "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==".unpack("m*")[0]
send_response(cli, data, { 'Content-Type' => 'image/gif' })
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'LNK Code Execution Vulnerability',
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Local Privilege Escalation in polkits pkexec',
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Linear eMerge E3-Series Access Controller Command Injection',