Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linguistic fixes of 'does not exists' #14542

Merged
merged 1 commit into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/msf/base/sessions/command_shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def cmd_download(*args)

# Check if src exists
if !file_exists(src)
print_error("The target file does not exists")
print_error("The target file does not exist")
return
end

Expand Down
2 changes: 1 addition & 1 deletion lib/net/dns/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class RCode
RCodeErrorString = ["No errors",
"The name server was unable to interpret the query",
"The name server was unable to process this query due to problem with the name server",
"Domain name referenced in the query does not exists",
"Domain name referenced in the query does not exist",
"The name server does not support the requested kind of query",
"The name server refuses to perform the specified operation for policy reasons",
"",
Expand Down
2 changes: 1 addition & 1 deletion lib/rex/proto/smb/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Constants
CAP_UNIX_EXTENSIONS = 0x800000

# Open Modes
OPEN_MODE_CREAT = 0x10 # Create the file if file does not exists. Otherwise, operation fails.
OPEN_MODE_CREAT = 0x10 # Create the file if file does not exist. Otherwise, operation fails.
OPEN_MODE_EXCL = 0x00 # When used with SMB_O_CREAT, operation fails if file exists. Cannot be used with SMB_O_OPEN.
OPEN_MODE_OPEN = 0x01 # Open the file if the file exists
OPEN_MODE_TRUNC = 0x02 # Truncate the file if the file exists
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/windows/local/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def write_script_to_target(vbs, name)
filepath = temppath + "\\" + filename

unless directory?(temppath)
print_error("#{temppath} does not exists on the target")
print_error("#{temppath} does not exist on the target")
return nil
end

Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/windows/misc/ahsay_backup_fileupload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def exploit
if username == "" or password == ""
fail_with(Failure::NoAccess, 'Please set a username and password')
else
#check if account does not exists?
#check if account does not exist?
if !check_account?
# Create account and check if it is valid
if create_account?
Expand Down
2 changes: 1 addition & 1 deletion modules/post/multi/gather/multi_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(info={})
def run
print_status("Running module against #{sysinfo['Computer']}")
if not ::File.exist?(datastore['RESOURCE'])
raise "Resource File does not exists!"
raise "Resource File does not exist!"
else
::File.open(datastore['RESOURCE'], "rb").each_line do |cmd|
next if cmd.strip.length < 1
Expand Down
2 changes: 1 addition & 1 deletion modules/post/multi/gather/run_console_rc_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(info={})
def run
print_status("Running module against #{sysinfo['Computer']}")
if not ::File.exist?(datastore['RESOURCE'])
raise "Resource File does not exists!"
raise "Resource File does not exist!"
else
::File.open(datastore['RESOURCE'], "rb").each_line do |cmd|
next if cmd.strip.length < 1
Expand Down
2 changes: 1 addition & 1 deletion modules/post/multi/manage/multi_post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run
macro = datastore['MACRO']
entries = []
if not ::File.exist?(macro)
print_error "Resource File does not exists!"
print_error "Resource File does not exist!"
return
else
::File.open(datastore['MACRO'], "rb").each_line do |line|
Expand Down
2 changes: 1 addition & 1 deletion modules/post/windows/gather/wmic_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run
store_wmic_loot(result, cmd)
end
else
raise "Resource File does not exists!"
raise "Resource File does not exist!"
end

elsif datastore['COMMAND']
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/hostsedit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def cleardnscach(session)
when "-l"
checkuac(session)
if not ::File.exist?(val)
raise "File #{val} does not exists!"
raise "File #{val} does not exist!"
else
backuphosts(session,hosts)
::File.open(val, "r").each_line do |line|
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/multi_console_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def usage
when "-r"
script = val
if not ::File.exist?(script)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
commands = []
::File.open(script, "r").each_line do |line|
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/multicommand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def usage
when "-r"
script = val
if not ::File.exist?(script)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
::File.open(script, "r").each_line do |line|
commands << line.chomp
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/multiscript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def usage
when "-r"
script = val
if not ::File.exist?(script)
raise "Script List File does not exists!"
raise "Script List File does not exist!"
else
::File.open(script, "rb").each_line do |line|
commands << line
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/process_memdump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def usage
list = val
resource = ""
if not ::File.exist?(list)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
::File.open(list, "r").each_line do |line|
resource << line
Expand Down
4 changes: 2 additions & 2 deletions scripts/meterpreter/schtasksabuse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def unsupported
when "-s"
script = val
if not ::File.exist?(script)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
::File.open(script, "r").each_line do |line|
commands << line.chomp
Expand All @@ -141,7 +141,7 @@ def unsupported
when "-l"
list = val
if not ::File.exist?(list)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
::File.open(list, "r").each_line do |line|
targets << line.chomp
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/uploadexec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def usage()

def upload(session,file,trgloc = "")
if not ::File.exist?(file)
raise "File to Upload does not exists!"
raise "File to Upload does not exist!"
else
if trgloc == ""
location = session.sys.config.getenv('TEMP')
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/virusscan_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def usage()

def upload(session,file,trgloc)
if not ::File.exist?(file)
raise "File to Upload does not exists!"
raise "File to Upload does not exist!"
else
@location = session.sys.config.getenv('TEMP')
begin
Expand Down
4 changes: 2 additions & 2 deletions scripts/meterpreter/winbf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def passbf(session,passlist,target,user,opt,logfile)
i = 0
if opt == 1
if not ::File.exist?(user)
raise "Usernames List File does not exists!"
raise "Usernames List File does not exist!"
else
user = ::File.open(user, "r")
end
Expand Down Expand Up @@ -171,7 +171,7 @@ def unsupported

passlist = val
if not ::File.exist?(passlist)
raise "Password File does not exists!"
raise "Password File does not exist!"
end
when "-t"
target = val
Expand Down
2 changes: 1 addition & 1 deletion scripts/meterpreter/wmic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def usage

script = val
if not ::File.exist?(script)
raise "Command List File does not exists!"
raise "Command List File does not exist!"
else
::File.open(script, "r").each_line do |line|
next if line.strip.length < 1
Expand Down