Showing 15,831 of 21,886 total issues
Method digest_auth
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def digest_auth(user, password, response)
nonce_count = 1
cnonce = Digest::MD5.hexdigest("%x" % (Time.now.to_i + rand(65535)))
i = (response['www-authenticate'] =~ /^(\w+) (.*)/)
Method get_login_state
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_login_state(username, password)
# Prep the data needed for login
sid = get_last_sid
protocol = ssl ? 'https' : 'http'
peer = "#{host}:#{port}"
Method get_login_state
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_login_state(username, password)
# Prep the data needed for login
sid = get_last_sid
protocol = ssl ? 'https' : 'http'
peer = "#{host}:#{port}"
Method do_login
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def do_login(user, pass)
# prep the data needed for login
protocol = ssl ? 'https' : 'http'
# attempt to get an authentication token
auth_token_res = get_auth_token(user)
Method createJarArchive
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void createJarArchive(File archiveFile, File[] tobeJared) {
try {
byte buffer[] = new byte[BUFFER_SIZE];
// Open archive file
FileOutputStream stream = new FileOutputStream(archiveFile);
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(framework, opts)
super
host = opts['ServerHost'] || DefaultHost
port = opts['ServerPort'] || DefaultPort
Method cmd_aggregator_disconnect
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_aggregator_disconnect(*_args)
if @aggregator && @aggregator.available?
# check if this connection is the default forward
@aggregator.register_default(nil, nil) if @aggregator.default == @aggregator.uuid
Method cmd_nessus_server_properties
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_nessus_server_properties(*args)
search_term = nil
while (arg = args.shift)
case arg
when '-h', '--help'
Method cmd_wmap_targets
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_wmap_targets(*args)
args.push('-h') if args.empty?
while (arg = args.shift)
case arg
Method cmd_nessus_family_list
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def cmd_nessus_family_list(*args)
search_term = nil
while (arg = args.shift)
case arg
when '-h', '--help'
Method checkdep
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def checkdep(session)
tmpout = ""
depmode = ""
# Expand environment %TEMP% variable
tmp = session.sys.config.getenv('TEMP')
Method list_exec
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def list_exec(session,cmdlst)
print_status("Running Command List ...")
tmpout = ""
cmdout = ""
r=''
Method decrypt_user_hash
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def decrypt_user_hash(rid, hbootkey, enchash, pass)
if(enchash.empty?)
case pass
when @sam_lmpass
Method insttlntsrv
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def insttlntsrv()
trgtos = @client.sys.config.sysinfo['OS']
if trgtos =~ /Vista|7|2008/
print_status("Checking if Telnet Service is Installed")
if checkifinst()
Method send_text_to_dingtalk
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def send_text_to_dingtalk(session)
# https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/9e91d73c
uri_parser = URI.parse(dingtalk_webhook)
markdown_text = "## You have a new #{session.type} session!\n\n" \
"**platform** : #{session.platform}\n\n" \
Method store_captured_heartbeats
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def store_captured_heartbeats(c)
if @state[c][:heartbeats].length > 0
begin
path = store_loot(
"openssl.heartbleed.client",
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
super(
'Name' => 'Authentication Capture: SIP',
'Description' => %q{
This module provides a fake SIP service that is designed to
Method process_openssl_encrypted_request
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_openssl_encrypted_request(c, data)
message_type, message_version, protocol_version = data.unpack("Cn@9n")
return if @state[c][:shutdown]
return unless data.length > 5
Method generate_demo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_demo(base_url, cid)
# This is the Demo Form Page <HTML>
html = <<EOS
<html>
<head>
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
super(
'Name' => 'Authentication Capture: MSSQL',
'Description' => %q{
This module provides a fake MSSQL service that