Skip to content

Commit

Permalink
Land #18399, fix multiple spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 authored Sep 25, 2023
2 parents 9c02331 + d64ed33 commit aa2a843
Show file tree
Hide file tree
Showing 73 changed files with 134 additions and 134 deletions.
2 changes: 1 addition & 1 deletion lib/msf/base/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def self.start_session_log(session)
# Stops logging for a given session.
#
# @param session [Msf::Session] the session to stop logging.
# @return [Boolean] true if sucessful. false if not.
# @return [Boolean] true if successful. false if not.
def self.stop_session_log(session)
rlog("\n[*] Logging stopped: #{Time.now}\n\n", session.log_source)

Expand Down
8 changes: 4 additions & 4 deletions lib/msf/base/sessions/command_shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def cmd_download_help

def cmd_download(*args)
if args.length != 2
# no argumnets, just print help message
# no arguments, just print help message
return cmd_download_help
end

Expand Down Expand Up @@ -445,7 +445,7 @@ def cmd_upload_help

def cmd_upload(*args)
if args.length != 2
# no argumnets, just print help message
# no arguments, just print help message
return cmd_upload_help
end

Expand All @@ -464,9 +464,9 @@ def cmd_upload(*args)
content = File.binread(src)
result = _file_transfer.write_file(dst, content)
print_good("File <#{dst}> upload finished") if result
print_error("Error occured while uploading <#{src}> to <#{dst}>") unless result
print_error("Error occurred while uploading <#{src}> to <#{dst}>") unless result
rescue => e
print_error("Error occured while uploading <#{src}> to <#{dst}> - #{e.message}")
print_error("Error occurred while uploading <#{src}> to <#{dst}> - #{e.message}")
elog(e)
return
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/analyze/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def matches_host_os?
# Special cases
if set.include?('unix')
# Skip archaic old HPUX bugs if we have a solid match against another OS
return false if set.include?("hpux") && mod.refname.include?("hpux") && !hos.inlcude?("hpux")
return false if set.include?("hpux") && mod.refname.include?("hpux") && !hos.include?("hpux")
# Skip AIX bugs if we have a solid match against another OS
return false if set.include?("aix") && mod.refname.include?("aix") && !hos.include?("aix")
# Skip IRIX bugs if we have a solid match against another OS
Expand Down
24 changes: 12 additions & 12 deletions lib/msf/core/auxiliary/fuzzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def fuzz_numbers
end


# Will return or yield a string based on the presense of a block
# Will return or yield a string based on the presence of a block
#
# @return [Array] Returns and array of arrays of strings if there is no block given
# @yield [Array] Yields array of strings if there is a block given
Expand Down Expand Up @@ -147,7 +147,7 @@ def fuzzer_number_power2_plus
block_given? ? res.each { |n| yield(n) } : res
end

# Generates a fuzz string If no block is set, it will retrive characters from the
# Generates a fuzz string If no block is set, it will retrieve characters from the
# FuzzChar datastore option.
#
# @param len [Integer] String size.
Expand Down Expand Up @@ -240,7 +240,7 @@ def fuzzer_string_path_prefixes

# Generates various small URI string types
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_uris_small
res = []
Expand All @@ -257,7 +257,7 @@ def fuzzer_string_uris_small

# Generates various long URI string types
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_uris_long
res = []
Expand All @@ -274,7 +274,7 @@ def fuzzer_string_uris_long

# Generates various giant URI string types
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_uris_giant
res = []
Expand All @@ -291,7 +291,7 @@ def fuzzer_string_uris_giant

# Format for the URI string generator
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_uris_format
res = []
Expand All @@ -309,7 +309,7 @@ def fuzzer_string_uris_format

# Generates various small strings
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_uris_dos
res = []
Expand All @@ -327,7 +327,7 @@ def fuzzer_string_uris_dos

# Generates various small strings
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_paths_small
res = []
Expand All @@ -343,7 +343,7 @@ def fuzzer_string_paths_small

# Generates various small strings
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_paths_long
res = []
Expand All @@ -359,7 +359,7 @@ def fuzzer_string_paths_long

# Generates various giant strings
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_paths_giant
res = []
Expand All @@ -375,7 +375,7 @@ def fuzzer_string_paths_giant

# Format for the path generator
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_paths_format
res = []
Expand All @@ -391,7 +391,7 @@ def fuzzer_string_paths_format

# Generates fuzzer strings using path prefixes
#
# @return [Array] Returns an array of stings
# @return [Array] Returns an array of strings

def fuzzer_string_paths_dos
res = []
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/auxiliary/nfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def can_mount?(locations, mountable = true, hostname = '', lhost = '')
location = "#{Regexp.last_match(1)}#{Rex::Socket.addr_atoc(Regexp.last_match(2))}"
end
return true if Rex::Socket::RangeWalker.new(location).include?(lhost)
# at this point we assume its a hostname, so we use Ruby's File fnmatch so that it proceses the wildcards
# at this point we assume its a hostname, so we use Ruby's File fnmatch so that it processes the wildcards
# as its a quick and easy way to use glob matching for wildcards and get a boolean response
return true if File.fnmatch(location, hostname)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/auxiliary/prometheus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def prometheus_config_eater(yamlconf)
dns_sd_configs['basic_auth']['password_file'] = scrape.dig('basic_auth', 'password_file') if scrape.dig('basic_auth', 'password_file')
end

# pass in the 'scheme' from a level above to propely build the URI
# pass in the 'scheme' from a level above to properly build the URI
if dns_sd_configs['scheme'].nil? && scrape['scheme']
dns_sd_configs['scheme'] = scrape['scheme']
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/auxiliary/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def store_loot(ltype, ctype, host, data, filename=nil, info=nil, service=nil, &b
end

#
# Store some locally-generated data as a file, similiar to store_loot.
# Store some locally-generated data as a file, similar to store_loot.
# Sometimes useful for keeping artifacts of an exploit or auxiliary
# module, such as files from fileformat exploits. (TODO: actually
# implement this on file format modules.)
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/auxiliary/rocketmq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def parse_rocketmq_data(res)
# remove a response header so we have json-ish data
res = res[8..]

# we have 2 json objects appended to eachother, so we now need to split that out and make it usable
# we have 2 json objects appended to each other, so we now need to split that out and make it usable
res = res.split('}{')

jsonable = []
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/auxiliary/vyos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def vyos_config_eater(thost, tport, config, store = true)
# in >= 1.3 'level' is no longer included and defaults to admin.

r = 'user ([^ ]+) {\s*authentication {\s*'
r << 'encrypted-password (\$?[\w$\./\*]*)\s*' # leading $ is optional incase the password is all stars
r << 'encrypted-password (\$?[\w$\./\*]*)\s*' # leading $ is optional in case the password is all stars
r << '(?:plaintext-password "([^"]*)")?\s*' # optional
r << '}'
r << '(?:\s*full-name "([^"]*)")?\s*' # optional
Expand Down
6 changes: 3 additions & 3 deletions lib/msf/core/auxiliary/web/form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def inputs=( i )
end

#
# Hash of params to be submited (derived by #inputs)
# Hash of params to be submitted (derived by #inputs)
#
# Examples
#
Expand Down Expand Up @@ -174,7 +174,7 @@ def []=( field, value )
#
# Update the form inputs.
#
# field - Field name as a Sting (updated if already exists, created otherwise).
# field - Field name as a String (updated if already exists, created otherwise).
# value - Field Value as a String.
# type - Field type ('text' if no type has been provided).
#
Expand All @@ -195,7 +195,7 @@ def update( field, value, type = nil )
#
# Get a field type, by name, as a String.
#
# field - Field name as a Sting
# field - Field name as a String
#
def field_type_for( name )
inputs.select{ |i| i[:name] == name.to_s }[:type]
Expand Down
4 changes: 2 additions & 2 deletions lib/msf/core/data_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def import_options(options, imported_by = nil, overwrite = false)
def import_options_from_s(option_str, delim = nil)
hash = {}

# Figure out the delimeter, default to space.
# Figure out the delimiter, default to space.
if (delim.nil?)
delim = /\s/

Expand All @@ -120,7 +120,7 @@ def import_options_from_s(option_str, delim = nil)
end
end

# Split on the delimeter
# Split on the delimiter
option_str.split(delim).each { |opt|
var, val = opt.split('=', 2)

Expand Down
4 changes: 2 additions & 2 deletions lib/msf/core/data_store_with_fallbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def import_options(options, imported_by = nil, overwrite = true)
def import_options_from_s(option_str, delim = nil)
hash = {}

# Figure out the delimeter, default to space.
# Figure out the delimiter, default to space.
if (delim.nil?)
delim = /\s/

Expand All @@ -166,7 +166,7 @@ def import_options_from_s(option_str, delim = nil)
end
end

# Split on the delimeter
# Split on the delimiter
option_str.split(delim).each { |opt|
var, val = opt.split('=', 2)

Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/db_manager/module_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Msf::DBManager::ModuleCache
# +'ILIKE'+
#
# @param values [Set<String>, #each] a list of strings.
# @return [Arrray<String>] strings wrapped like %<string>%
# @return [Array<String>] strings wrapped like %<string>%
def match_values(values)
values.collect { |value| "%#{value}%" }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/db_manager/note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def notes(opts)
#
# The +:update+ option can have the following values:
# +:unique+:: allow only a single Note per +:host+/+:type+ pair
# +:unique_data+:: like +:uniqe+, but also compare +:data+
# +:unique_data+:: like +:unique+, but also compare +:data+
# +:insert+:: always insert a new Note even if one with identical values exists
#
# If the provided +:host+ is an IP address and does not exist in the
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/encoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def initialize(info)

##
#
# Encoder information accessors that can be overriden
# Encoder information accessors that can be overridden
# by derived classes
#
##
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def has_auto_target?(targets=[])
# exploit module. It will also pre-generate the desired payload, though
# exploits can re-generate the payload if necessary.
#
# This method is designed to be overriden by exploit modules.
# This method is designed to be overridden by exploit modules.
#
def exploit
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/brute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def exploit
# This routine is called once per brute force iteration. The addresses
# parameter is a hash of addresses that are incremented each iteration and
# are derived from the target's bruteforce information or the module's
# datastore in case they are being overriden.
# datastore in case they are being overridden.
#
def brute_exploit(addrs)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/capture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def expire_arpcache
self.arp_cache = {}
end

# For compatibilty with Msf::Exploit::Remote::Ip
# For compatibility with Msf::Exploit::Remote::Ip
def rhost
datastore['RHOST']
end
Expand Down
6 changes: 3 additions & 3 deletions lib/msf/core/exploit/cmd_stager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,21 +336,21 @@ def compatible_flavor?(f)
end

# Code to execute before the cmd stager stub. This method is designed to be
# overriden by a module this mixin.
# overridden by a module this mixin.
#
# @param opts [Hash] Hash of configuration options.
def execute_cmdstager_begin(opts = {})
end

# Code to execute after the cmd stager stub. This method is designed to be
# overriden by a module this mixin.
# overridden by a module this mixin.
#
# @param opts [Hash] Hash of configuration options.
def execute_cmdstager_end(opts = {})
end

# Code called to execute each command via an arbitrary module-defined vector.
# This method needs to be overriden by modules using this mixin.
# This method needs to be overridden by modules using this mixin.
#
# @param cmd [String] The command to execute.
# @param opts [Hash] Hash of configuration options.
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/java_deserialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Exploit::JavaDeserialization
#
# @return [String] The opaque data blob.
def generate_java_deserialization_for_command(name, shell, command)
# here we force usage of a modified type to avoid compatibility issues with command characters thar are present in
# here we force usage of a modified type to avoid compatibility issues with command characters that are present in
# some ysoserial payloads
unless %w{ bash cmd powershell }.include? shell
raise RuntimeError, 'Invalid shell for Java Deserialization payload generation'
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/local/windows_kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def token_stealing_shellcode(target, backup_token = nil, arch = nil, append_ret
tokenstealing << "\x8b\xc8" # mov ecx, eax
tokenstealing << "\x8b\x98" + target['_TOKEN'] + "\x00\x00\x00" # mov ebx, dword ptr [eax+0C8h] # Retrieves TOKEN
unless backup_token.nil?
tokenstealing << "\x89\x1d" + [backup_token].pack('V') # mov dword ptr ds:backup_token, ebx # Optionaly write a copy of the token to the address provided
tokenstealing << "\x89\x1d" + [backup_token].pack('V') # mov dword ptr ds:backup_token, ebx # Optionally write a copy of the token to the address provided
end
tokenstealing << "\x8b\x80" + target['_APLINKS'] + "\x00\x00\x00" # mov eax, dword ptr [eax+88h] <====| # Retrieve FLINK from ActiveProcessLinks
tokenstealing << "\x81\xe8" + target['_APLINKS'] + "\x00\x00\x00" # sub eax, 88h | # Retrieve _EPROCESS Pointer from the ActiveProcessLinks
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/powershell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def compress_script(script_in, eof = nil)
end

#
# Return a decompressed powershell sript
# Return a decompressed powershell script
#
# @param script_in [String] Compressed contents with decompression stub
#
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/powershell/dot_net.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(info = {})
super
register_advanced_options(
[
OptString.new('CERT_PATH', [false, 'Path on compiler host to .pfx fomatted certificate for signing' ]),
OptString.new('CERT_PATH', [false, 'Path on compiler host to .pfx formatted certificate for signing' ]),

], self.class)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/msf/core/exploit/remote/afp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def login(user, pass)
when -5001 #kFPAuthContinue
return parse_login_response_add_send_login_count(response, {:p => p, :g => g, :ra => ra, :ma => ma,
:password => pass, :user => user})
when -5023 #kFPUserNotAuth (User dosen't exists)
print_status("AFP #{rhost}:#{rport} User #{user} dosen't exists")
when -5023 #kFPUserNotAuth (User doesn't exists)
print_status("AFP #{rhost}:#{rport} User #{user} doesn't exists")
return :skip_user
else
return :connection_error
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/remote/browser_exploit_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def setup
# * It comes from a datastore option. It allows BrowserAutoPwn to share the unique prefix with
# its child exploits, so that these exploits don't have to gather browser information again.
# * If the datastore option isn't set, then we assume the user is firing the exploit as a
# standalone so we make somthing more unique, so that if there are two instances using the
# standalone so we make something more unique, so that if there are two instances using the
# same exploit, they don't actually share info.
def browser_profile_prefix
self.datastore['BrowserProfilePrefix'] || @unique_prefix ||= lambda {
Expand Down
Loading

0 comments on commit aa2a843

Please sign in to comment.