Removing unnecessary spaces

bug/bundler_fix
heitor.gouvea@ima.sp.gov.br 2017-09-12 10:00:18 -03:00
parent 7b87915e1f
commit 1c44406e94
13 changed files with 7 additions and 62 deletions

2
msfd
View File

@ -19,8 +19,6 @@ end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'msf/base'

4
msfrpc
View File

@ -17,8 +17,6 @@ end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'rex/parser/arguments'
@ -59,7 +57,6 @@ arguments.parse(ARGV) do |opt, idx, val|
end
end
unless opts['ServerHost']
$stderr.puts "[-] Error: a server IP must be specified (-a)"
$stderr.puts arguments.usage
@ -93,4 +90,3 @@ while(ARGV.shift)
end
Rex::Ui::Text::IrbShell.new(binding).run

View File

@ -17,8 +17,6 @@ end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'rex/parser/arguments'

View File

@ -16,7 +16,6 @@ require 'msf/ui'
require 'msf/base'
require 'msf/core/payload_generator'
class MsfVenomError < StandardError; end
class HelpError < StandardError; end
class UsageError < MsfVenomError; end

View File

@ -79,7 +79,6 @@ class CPassword
end
end
#
# Shows script usage
#
@ -88,7 +87,6 @@ def usage
exit
end
#
# Prints a status message
#
@ -96,7 +94,6 @@ def print_status(msg='')
$stderr.puts "[*] #{msg}"
end
#
# Prints an error message
#
@ -104,7 +101,6 @@ def print_error(msg='')
$stderr.puts "[-] #{msg}"
end
#
# Prints a good message
#
@ -112,7 +108,6 @@ def print_good(msg='')
$stderr.puts "[+] #{msg}"
end
#
# main
#

View File

@ -39,7 +39,6 @@ $args = Rex::Parser::Arguments.new(
"-s" => [ true, "The server challenge (default value 1122334455667788)" ],
"-h" => [ false, "Display this help information" ])
$args.parse(ARGV) { |opt, idx, val|
case opt
when "-n"
@ -81,8 +80,6 @@ if(pass.length != 7)
exit
end
pass = pass.upcase
hash = hash.downcase
@ -123,7 +120,6 @@ end
end
end
puts "[*] Trying four characters (eta: #{etime * cset.length * cset.length * cset.length} seconds)..."
0.upto(cset.length-1) do |c1|
0.upto(cset.length-1) do |c2|

View File

@ -2,7 +2,7 @@
#
# $Id$
#
# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
# have issues with binary salt values and extremely large salt values. The primary
# goal of this tool is to handle IPMI 2.0 HMAC SHA1 hashes.
#
@ -29,7 +29,6 @@ def usage
exit
end
hash_inp = ARGV.shift || usage()
word_inp = ARGV.shift || usage()
@ -51,17 +50,16 @@ hash_fd.each_line do |line|
$stderr.puts "[-] Invalid hash entry, missing field: #{line}"
next
end
unless h_salt =~ /^[a-f0-9]+$/i
unless h_salt =~ /^[a-f0-9]+$/i
$stderr.puts "[-] Invalid hash entry, salt must be in hex: #{line}"
next
end
hashes << [h_id, [h_salt].pack("H*"), [h_hash].pack("H*") ]
end
hash_fd.close
hash_fd.close
stime = Time.now.to_f
count = 0
count = 0
cracked = 0
word_fd.each_line do |line|
@ -75,10 +73,10 @@ word_fd.each_line do |line|
cracked += 1
end
count += 1
if count % 2500000 == 0
$stderr.puts "[*] Found #{cracked} passwords with #{hashes.length} left (#{(count / (Time.now.to_f - stime)).to_i}/s)"
end
end
end
hashes.delete_if {|e| e[3] }
break if hashes.length == 0

View File

@ -70,7 +70,6 @@ $args = Rex::Parser::Arguments.new(
"-d" => [ true, "The domain (machine) name (NETLMv2/NETNTLMv2 type only)" ],
"-h" => [ false, "Display this help information" ])
$args.parse(ARGV) { |opt, idx, val|
case opt
when "-t"
@ -122,7 +121,6 @@ else
end
end
if type == "HALFLM" or type == "LM" or type == "NTLM" then
if srvchal != nil or clichal != nil or user != nil or domain != nil then
$stderr.puts "[*] No challenge, user or domain must be provided with this type"
@ -872,5 +870,3 @@ else
$stderr.puts "type must be of type : HALFLM/LM/NTLM/HALFNETLMv1/NETLMv1/NETNTLMv1/NETNTLM2_SESSION/NETLMv2/NETNTLMv2"
exit
end

View File

@ -37,7 +37,6 @@ require 'rex'
require 'msf/core'
require 'optparse'
#
# Basic prints we can't live without
#
@ -71,7 +70,6 @@ module Md5LookupUtility
# @return [String] The name of the tool
attr_accessor :group_name
def initialize
self.config_file = Msf::Config.config_file
self.group_name = 'MD5Lookup'
@ -93,7 +91,6 @@ module Md5LookupUtility
end
end
# Saves the waiver so the warning won't show again after ack
#
# @return [void]
@ -101,7 +98,6 @@ module Md5LookupUtility
save_setting('waiver', true)
end
# Returns true if we don't have to show the warning again
#
# @return [Boolean]
@ -109,7 +105,6 @@ module Md5LookupUtility
load_setting('waiver') == 'true' ? true : false
end
private
# Saves a setting to Metasploit's config file
@ -124,7 +119,6 @@ module Md5LookupUtility
ini.to_file(self.config_file)
end
# Returns the value of a specific setting
#
# @param key_name [String] The name of the setting
@ -177,7 +171,6 @@ module Md5LookupUtility
)
end
# Returns the found cracked MD5 hash
#
# @param md5_hash [String] The MD5 hash to lookup
@ -192,10 +185,8 @@ module Md5LookupUtility
get_json_result(res)
end
private
# Parses the cracked result from a JSON input
# @param res [Rex::Proto::Http::Response] The Rex HTTP response
# @return [String] Found cracked MD5 hash
@ -217,7 +208,6 @@ module Md5LookupUtility
end
# This class parses the user-supplied options (inputs)
class OptsConsole
@ -275,10 +265,8 @@ module Md5LookupUtility
options
end
private
# Returns the parsed options from ARGV
#
# raise [OptionParser::InvalidOption] Invalid option found
@ -317,7 +305,6 @@ module Md5LookupUtility
return parser, options
end
# Returns the actual database names based on what the user wants
#
# @param list [String] A list of user-supplied database names
@ -339,7 +326,6 @@ module Md5LookupUtility
new_db_list
end
# Returns a list of all of the supported database symbols
#
# @return [Array<Symbol>] Database symbols
@ -357,7 +343,6 @@ module Md5LookupUtility
end
end
# This class decides how this process works
class Driver
@ -379,7 +364,6 @@ module Md5LookupUtility
end
end
# Main function
#
# @return [void]
@ -403,7 +387,6 @@ module Md5LookupUtility
end
end
# Cleans up the output file handler if exists
#
# @return [void]
@ -411,10 +394,8 @@ module Md5LookupUtility
@output_handle.close if @output_handle
end
private
# Saves the MD5 result to file
#
# @param result [Hash] The result that contains the MD5 information
@ -472,7 +453,6 @@ module Md5LookupUtility
end
#
# main
#

View File

@ -15,7 +15,6 @@ def hashit(inp)
hackit(sum)
end
def hackit(sum)
magic = 31695317
res = ((sum * magic) & 0xffffffff).to_s
@ -29,4 +28,3 @@ end
input = ARGV.shift || "flintstone"
$stderr.puts "[*] Hash for password '#{input}' is #{hashit(input)}"

View File

@ -12,7 +12,6 @@
# $Revision$
#
# VxWorks converts the clear-text password into single integer value. This value
# can only be one of about 210,000 possible options. The method below emulates
# what the vxencrypt utility does and was implemented based on publicly indexed
@ -128,7 +127,6 @@ seeds = []
end
seedsets << seeds
seeds = []
8.upto(12) do |slen|
0x23.upto(0x7c) do |cset|
@ -165,7 +163,6 @@ seeds = []
end
seedsets << seeds
# Calculate passwords and their hashes for all possible outputs
1.upto(209656) do |i|
found = false
@ -200,4 +197,3 @@ seedsets << seeds
exit(0)
end
end

View File

@ -19,7 +19,6 @@ require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
if RUBY_PLATFORM == "i386-mingw32"
begin
require 'network_interface'

View File

@ -12,18 +12,17 @@
# mubix
#
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib')))
require 'msfenv'
require 'rex'
require 'optparse'
class OptsConsole
def self.parse(args)
options = {'output' => 'iplist.txt'}
@ -78,7 +77,6 @@ Usage: #{__FILE__} [options]|
end
end
#
# Prints IPs
#
@ -91,7 +89,6 @@ def make_list(in_f, out_f)
end
end
#
# Returns file handles
#
@ -106,7 +103,6 @@ def load_files(in_f, out_f)
return handle_in, handle_out
end
options = OptsConsole.parse(ARGV)
in_f, out_f = load_files(options['input'], options['output'])