Showing 7,361 of 22,177 total issues
Method initialize
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(update_info(info,
'Name' => 'HP Network Node Manager I PMD Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in HP Network Node Manager I (NNMi). The
Method initialize
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(
update_info(
info,
{
Method run
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
# Get device prompt
prompt = session.shell_command('')
os_type = 'junos'
Method run
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
file_type = datastore['FILETYPE'].shellescape
exe_path = datastore['EXE_PATH'].shellescape
tmp_path = datastore['TMP_PATH'].gsub('<random>', Rex::Text.rand_text_alpha(8)).shellescape
if datastore['COUNT'] < 1
Method run
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
# sadly OptPath does not work, so we check manually if it exists
if !file_exist?(datastore['FILE'])
print_error('Remote file does not exist!')
return
Method analyze_file
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def analyze_file(filename)
config = client.fs.file.new(filename, 'r')
contents = config.read
config_lines = contents.split("\n")
Method run
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
if sysinfo.nil?
print_error('This module is only available in a windows meterpreter session.')
return
end
Method new_from_data
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def new_from_data(data, from = nil)
unless from
if data.kind_of? Array
data,from = data
else
Method initialize
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(hash, context = {})
self.listen_host = '0.0.0.0' # clients don't already have addresses. Needs to be 0.0.0.0
self.listen_port = 67 # mandatory (bootps)
self.context = context
self.sock = nil
Method session_setup_no_ntlmssp
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def session_setup_no_ntlmssp(user = '', pass = '', domain = '', do_recv = true)
# Requires a challenge key to have been seen during negotiation
raise XCEPT::NTLM1MissingChallenge if not self.challenge_key
Method end_element
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def end_element(name=nil)
block = @block
case name
when "node" # Wrap it up
collect_host_data
Method report_test
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def report_test
return unless in_tag("nodes")
return unless in_tag("node")
return unless @state[:test]
Method cmd_password_change
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_password_change(*args)
if args.length == 0 || args.include?('-h')
cmd_password_change_usage
return
end
Method cmd_save
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_save(*args)
if args.include?('-h') || args.include?('--help')
cmd_save_help
return false
end
Method dump_sessions
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.dump_sessions(framework, opts={})
output = ""
verbose = opts[:verbose] || false
sessions = opts[:sessions] || framework.sessions
show_active = opts[:show_active] || false
Method find_key
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def find_key(buf, badchars, keyChars)
keyFound = nil
bufLen = buf.length
Method import_nuclei_json
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_nuclei_json(args = {}, &block)
wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
JSON.parse(args[:data]).each do |data|
Method handle_nessus
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_nessus(wspace, hobj, port, nasl, plugin_name, severity, data,task=nil)
addr = hobj.address
# The port section looks like:
# http (80/tcp)
Method do_report_failure_or_success
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def do_report_failure_or_success(opts)
return unless opts[:refs]
::ApplicationRecord.connection_pool.with_connection {
mrefs = opts[:refs]
host = opts[:host]
Method splunk_helper_malicious_app
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def splunk_helper_malicious_app(app_name)
# metadata folder
metadata = <<~EOF
[commands]
export = system