Skip to content

Commit

Permalink
fix spelling in spec folder
Browse files Browse the repository at this point in the history
  • Loading branch information
h00die committed Jan 7, 2024
1 parent ee3b8b4 commit ec8ee28
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion spec/lib/msf/core/exe/segment_appender_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

context 'the generated exe' do
let(:exe) { Metasm::PE.decode(injector.generate_pe) }
it 'should be the propper arch' do
it 'should be the proper arch' do
expect(exe.bitsize).to eq 32
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/msf/core/exe/segment_injector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

context 'the generated exe' do
let(:exe) { Metasm::PE.decode(injector.generate_pe) }
it 'should be the propper arch' do
it 'should be the proper arch' do
expect(exe.bitsize).to eq 32
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/msf/core/exploit/auto_target_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
expect(linux_exploit.filter_by_os_family(windows_xp_host).count).to eq 0
end

it 'should return nil if the os is unkown on the host' do
it 'should return nil if the os is unknown on the host' do
expect(windows_exploit.filter_by_os_family(unknown_host).count).to eq 0
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/msf/core/exploit/powershell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def decompress(code)
subject.datastore['Powershell::persist'] = true
subject.options.validate(subject.datastore)
end
it 'should add a persistance loop' do
it 'should add a persistence loop' do
code = subject.cmd_psh_payload(payload, arch)
expect(decompress(code).include?('while(1){Start-Sleep -s ')).to be_truthy
end
Expand All @@ -228,7 +228,7 @@ def decompress(code)
subject.datastore['Powershell::persist'] = false
subject.options.validate(subject.datastore)
end
it 'shouldnt add a persistance loop' do
it 'shouldnt add a persistence loop' do
code = subject.cmd_psh_payload(payload, arch)
expect(decompress(code).include?('while(1){Start-Sleep -s ')).to be_falsey
end
Expand Down
12 changes: 6 additions & 6 deletions spec/lib/msf/core/exploit/remote/remote/http/http_cookie_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -783,20 +783,20 @@ def random_string(min_len = 1, max_len = 12)
end

it 'will return false if url with http protocol is passed but has no host' do
protcol = 'http://'
protocol = 'http://'

v = cookie.acceptable_from_uri?(protcol)
v = cookie.acceptable_from_uri?(protocol)

expect(URI(protcol).is_a?(::URI::HTTP)).to eq(true)
expect(URI(protocol).is_a?(::URI::HTTP)).to eq(true)
expect(v).to eq(false)
end

it 'will return false if url with https protocol is passed but has no host' do
protcol = 'https://'
protocol = 'https://'

v = cookie.acceptable_from_uri?(protcol)
v = cookie.acceptable_from_uri?(protocol)

expect(URI(protcol).is_a?(::URI::HTTP)).to eq(true)
expect(URI(protocol).is_a?(::URI::HTTP)).to eq(true)
expect(v).to eq(false)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/msf/core/post/windows/task_scheduler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def create_exploit(info = {})
subject.send(:get_system_privs)
end

context 'when the session is alreay in SYSTEM user context' do
context 'when the session is already in SYSTEM user context' do
it 'does not try to get SYSTEM privileges' do
allow(subject).to receive(:is_system?).and_return(true)
expect(subject).to_not receive(:session)
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/msf/ui/console/command_dispatcher/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def set_tabs_test(option)
allow(double).to receive(:sessions).and_return([])
allow_any_instance_of(Msf::Post).to receive(:framework).and_return(double)

# Test for setting uncomplete option
# Test for setting incomplete option
output = core.cmd_set_tabs(option, ["set"])
expect(output).to be_kind_of(Array).or eq(nil)

Expand Down
6 changes: 3 additions & 3 deletions spec/lib/msf/ui/console/command_dispatcher/db/klist_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def as_ccache(data)
end
end

context 'when the -i option is provided with 2 valid ids (comma seperated)' do
context 'when the -i option is provided with 2 valid ids (comma separated)' do
it 'should show both tickets' do
subject.cmd_klist '-i', "#{valid_ccache_id},#{expired_ccache_id}"
expect(table_without_ids(@output.join("\n"))).to match_table <<~TABLE
Expand All @@ -347,7 +347,7 @@ def as_ccache(data)
end
end

context 'when the -i option is provided with 2 valid ids (quoted and space seperated)' do
context 'when the -i option is provided with 2 valid ids (quoted and space separated)' do
it 'should show both tickets' do
subject.cmd_klist '-i', "#{valid_ccache_id} #{expired_ccache_id}"
expect(table_without_ids(@output.join("\n"))).to match_table <<~TABLE
Expand All @@ -361,7 +361,7 @@ def as_ccache(data)
end
end

context 'when the -i option is provided with 2 valid ids (quoted and comma + space seperated)' do
context 'when the -i option is provided with 2 valid ids (quoted and comma + space separated)' do
it 'should show both tickets' do
subject.cmd_klist '-i', "#{valid_ccache_id}, #{expired_ccache_id}"
expect(table_without_ids(@output.join("\n"))).to match_table <<~TABLE
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rex/parser/ini_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RSpec.describe Rex::Parser::Ini do
let(:ini_contents) { <<EOF
# global comment
global settting = blah
global setting = blah
[foo]
a = b
[bar]
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/rex/parser/unattend_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

std = REXML::Document.new('<?xml version="1.0" ?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86"> <WindowsDeploymentServices> <Login> <WillShowUI>OnError</WillShowUI> <Credentials> <Username>username</Username> <Domain>Fabrikam.com</Domain> <Password>my_password</Password> </Credentials> </Login> <ImageSelection> <WillShowUI>OnError</WillShowUI> <InstallImage> <ImageName>Windows Vista with Office</ImageName> <ImageGroup>ImageGroup1</ImageGroup> <Filename>Install.wim</Filename> </InstallImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> </ImageSelection> </WindowsDeploymentServices> <DiskConfiguration> <WillShowUI>OnError</WillShowUI> <Disk> <DiskID>0</DiskID> <WillWipeDisk>false</WillWipeDisk> <ModifyPartitions> <ModifyPartition> <Order>1</Order> <PartitionID>1</PartitionID> <Letter>C</Letter> <Label>TestOS</Label> <Format>NTFS</Format> <Active>true</Active> <Extend>false</Extend> </ModifyPartition> </ModifyPartitions> </Disk> </DiskConfiguration> </component> <component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86"> <SetupUILanguage> <WillShowUI>OnError</WillShowUI> <UILanguage>en-US</UILanguage> </SetupUILanguage> <UILanguage>en-US</UILanguage> </component> </settings></unattend> ')

unsecure = REXML::Document.new('<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize"> <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Identification> <UnsecureJoin>true</UnsecureJoin> </Identification> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ProductKey>XXXX-XXXX-XXXX-XXXX-XXXX</ProductKey> </component> </settings></unattend>')
insecure = REXML::Document.new('<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize"> <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Identification> <UnsecureJoin>true</UnsecureJoin> </Identification> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ProductKey>XXXX-XXXX-XXXX-XXXX-XXXX</ProductKey> </component> </settings></unattend>')

b64 = REXML::Document.new('<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoLogon> <Password> <Value>VABlAG0AcAAxADIAMwBQAGEAcwBzAHcAbwByAGQA</Value> <PlainText>false</PlainText> </Password> <Enabled>true</Enabled> <Username>Administrator</Username> </AutoLogon> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <Order>1</Order> <CommandLine>powershell.exe -command {Set-ExecutionPolicy Unrestricted}</CommandLine> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>2</Order> <CommandLine>powershell.exe -file &quot;c:\Windows\System32\sysprep\2K12-1-rename.ps1&quot;</CommandLine> </SynchronousCommand> </FirstLogonCommands> <OOBE> <HideEULAPage>true</HideEULAPage> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <NetworkLocation>Work</NetworkLocation> <SkipMachineOOBE>true</SkipMachineOOBE> <SkipUserOOBE>true</SkipUserOOBE> </OOBE> <UserAccounts> <AdministratorPassword> <Value>VABlAG0AcAAxADIAMwBBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value> <PlainText>false</PlainText> </AdministratorPassword> </UserAccounts> </component> </settings> <cpi:offlineImage cpi:source="wim:c:/users/administrator/desktop/2k12-install.wim#Windows Server 2012 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>')

Expand All @@ -29,7 +29,7 @@

pos_xmls = [dj, b64, comb, std, lng]

neg_xmls = [unsecure]
neg_xmls = [insecure]

it "returns results for all positive examples" do
pos_xmls.each do |xml|
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/rex/post/meterpreter/packet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
end

context "#add_tlv" do
it "should add to the tlvs array when given basic tlv paramaters" do
it "should add to the tlvs array when given basic tlv parameters" do
group_tlv.add_tlv(Rex::Post::Meterpreter::TLV_TYPE_STRING,"test")
expect(group_tlv.tlvs.first.type).to eq Rex::Post::Meterpreter::TLV_TYPE_STRING
expect(group_tlv.tlvs.first.value).to eq "test"
Expand Down Expand Up @@ -352,7 +352,7 @@


context "#from_r" do
it "should build the TLV group when given the propper raw bytes" do
it "should build the TLV group when given the proper raw bytes" do
group_tlv.reset
group_tlv.from_r( @raw_group)
expect(group_tlv.tlvs[0].inspect).to eq "#<Rex::Post::Meterpreter::Tlv type=STRING meta=STRING value=\"test\">"
Expand All @@ -379,7 +379,7 @@
expect(group_tlv.get_tlvs(Rex::Post::Meterpreter::TLV_TYPE_BOOL)).to eq []
end

it "should return an empty array for a nonexistant TLV type" do
it "should return an empty array for a nonexistent TLV type" do
expect(group_tlv.get_tlvs(55555555)).to eq []
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rex/proto/http/client_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@

subject(:client_request) { Rex::Proto::Http::ClientRequest.new(default_options) }

context "with GET paramaters" do
context "with GET parameters" do
subject(:client_request) {
options_with_params = default_options.merge({
'uri_encode_mode' => encode_mode,
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rex/proto/pjl/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
end

context "#fsdirlist" do
it "should reaise an exception due to an invalid path" do
it "should raise an exception due to an invalid path" do
expect { cli.fsdirlist("BAD") }.to raise_error(ArgumentError)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/rex/proto/sip/response_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: binary -*-

RSpec.describe 'Rex::Proto::SIP::Response parsing' do
describe 'Parses vaild responses correctly' do
describe 'Parses valid responses correctly' do
specify do
resp = 'SIP/1.0 123 Sure, OK'
r = ::Rex::Proto::SIP::Response.parse(resp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def initialize(info = {})
RUBY
end

it 'registers an offense when a multiline description requires a preceeding new line' do
it 'registers an offense when a multiline description requires a preceding new line' do
expect_offense(<<~RUBY)
class DummyModule
def initialize(info = {})
Expand Down Expand Up @@ -110,7 +110,7 @@ def initialize(info = {})
RUBY
end

it 'registers an offense when a multiline description requires a preceeding new line' do
it 'registers an offense when a multiline description requires a preceding new line' do
expect_offense(<<~RUBY)
class DummyModule
def initialize(info = {})
Expand Down
2 changes: 1 addition & 1 deletion spec/support/acceptance/meterpreter/windows_meterpreter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Acceptance::Meterpreter
datastore: {
global: {},
module: {
# Not suported by Windows Meterpreter
# Not supported by Windows Meterpreter
# MeterpreterTryToFork: false,
MeterpreterDebugBuild: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ def expect_to_load_module_ancestor(options={})
expect(loaded).to eq(true), "#{module_type}/#{ancestor_reference_name} failed to load from #{modules_path}"
end

# Expects to laod `:ancestor_reference_names` of `:module_type` from `:modules_path`
# Expects to load `:ancestor_reference_names` of `:module_type` from `:modules_path`
#
# @param options [Hash{Symbol => Array<String>, String}]
# @option options [Array<String>] :ancestor_reference_names the reference names of the module ancestors of
# `:module_type` to load from `:modules_path`.
# @option options [String] :modules_path The path from which to load `:ancestor_reference_names`.
# @option options [Stirng] :module_type The type of `:ancestor_reference_names` to derive their full paths under
# @option options [String] :module_type The type of `:ancestor_reference_names` to derive their full paths under
# `:modules_path`.
# @raise expectation failure if any `:ancestor_reference_names` cannot be loaded.
def expect_to_load_module_ancestors(options={})
Expand Down
14 changes: 7 additions & 7 deletions spec/tools/md5_lookup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def stub_save
def stub_load(with_setting=true)
if with_setting
ini = stub_save
disclamer.save_waiver
disclaimer.save_waiver
else
ini = Rex::Parser::Ini.new(t_path)
end
Expand All @@ -101,7 +101,7 @@ def stub_load(with_setting=true)
return ini
end

subject(:disclamer) do
subject(:disclaimer) do
Md5LookupUtility::Disclaimer.new
end

Expand All @@ -110,7 +110,7 @@ def stub_load(with_setting=true)
it 'returns true' do
agree = "Y\n"
allow($stdin).to receive(:gets).and_return(agree)
get_stdout { expect(disclamer.ack).to be_truthy }
get_stdout { expect(disclaimer.ack).to be_truthy }
end
end
end
Expand All @@ -119,7 +119,7 @@ def stub_load(with_setting=true)
context 'when waiver is true' do
it 'saves the wavier setting' do
ini = stub_save
disclamer.save_waiver
disclaimer.save_waiver
expect(ini[group_name]).to eq({setting_name=>true})
end
end
Expand All @@ -129,14 +129,14 @@ def stub_load(with_setting=true)
context 'when there is a waiver' do
it 'returns true' do
ini = stub_load(true)
expect(disclamer.send(:has_waiver?)).to be_truthy
expect(disclaimer.send(:has_waiver?)).to be_truthy
end
end

context 'when there is no waiver' do
it 'returns false' do
ini = stub_load(false)
expect(disclamer.send(:has_waiver?)).to be_falsey
expect(disclaimer.send(:has_waiver?)).to be_falsey
end
end
end
Expand All @@ -145,7 +145,7 @@ def stub_load(with_setting=true)
context 'when a setting is given' do
it 'saves the setting' do
ini = stub_save
disclamer.send(:save_setting, setting_name, data)
disclaimer.send(:save_setting, setting_name, data)
expect(ini[group_name]).to eq({setting_name=>true})
end
end
Expand Down

0 comments on commit ec8ee28

Please sign in to comment.