fix spelling in spec folder

This commit is contained in:
h00die 2024-01-07 13:42:50 -05:00
parent ee3b8b40b6
commit ec8ee2814a
18 changed files with 37 additions and 37 deletions

View File

@ -54,7 +54,7 @@ RSpec.describe Msf::Exe::SegmentAppender do
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

View File

@ -58,7 +58,7 @@ RSpec.describe Msf::Exe::SegmentInjector do
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

View File

@ -106,7 +106,7 @@ RSpec.describe Msf::Exploit::AutoTarget do
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

View File

@ -217,7 +217,7 @@ RSpec.describe Msf::Exploit::Powershell do
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
@ -228,7 +228,7 @@ RSpec.describe Msf::Exploit::Powershell do
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

View File

@ -783,20 +783,20 @@ RSpec.describe Msf::Exploit::Remote::HTTP::HttpCookie do
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

View File

@ -336,7 +336,7 @@ RSpec.describe Msf::Post::Windows::TaskScheduler do
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)

View File

@ -333,7 +333,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Core do
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)

View File

@ -333,7 +333,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Db::Klist do
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
@ -347,7 +347,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Db::Klist do
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
@ -361,7 +361,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Db::Klist do
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

View File

@ -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]

View File

@ -6,7 +6,7 @@ lng = REXML::Document.new('<?xml version="1.0" encoding="utf-8"?><unattend xmlns
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>')
@ -29,7 +29,7 @@ RSpec.describe Rex::Parser::Unattend do
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|

View File

@ -276,7 +276,7 @@ RSpec.describe Rex::Post::Meterpreter::GroupTlv do
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"
@ -352,7 +352,7 @@ RSpec.describe Rex::Post::Meterpreter::GroupTlv do
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\">"
@ -379,7 +379,7 @@ RSpec.describe Rex::Post::Meterpreter::GroupTlv do
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

View File

@ -193,7 +193,7 @@ RSpec.describe Rex::Proto::Http::ClientRequest do
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,

View File

@ -110,7 +110,7 @@ RSpec.describe Rex::Proto::PJL::Client do
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

View File

@ -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)

View File

@ -59,7 +59,7 @@ RSpec.describe RuboCop::Cop::Layout::ModuleDescriptionIndentation do
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 = {})
@ -110,7 +110,7 @@ RSpec.describe RuboCop::Cop::Layout::ModuleDescriptionIndentation do
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 = {})

View File

@ -15,7 +15,7 @@ module Acceptance::Meterpreter
datastore: {
global: {},
module: {
# Not suported by Windows Meterpreter
# Not supported by Windows Meterpreter
# MeterpreterTryToFork: false,
MeterpreterDebugBuild: true
}

View File

@ -94,13 +94,13 @@ RSpec.shared_context 'Msf::Simple::Framework#modules loading' do
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={})

View File

@ -92,7 +92,7 @@ RSpec.describe Md5LookupUtility do
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
@ -101,7 +101,7 @@ RSpec.describe Md5LookupUtility do
return ini
end
subject(:disclamer) do
subject(:disclaimer) do
Md5LookupUtility::Disclaimer.new
end
@ -110,7 +110,7 @@ RSpec.describe Md5LookupUtility do
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
@ -119,7 +119,7 @@ RSpec.describe Md5LookupUtility do
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
@ -129,14 +129,14 @@ RSpec.describe Md5LookupUtility do
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
@ -145,7 +145,7 @@ RSpec.describe Md5LookupUtility do
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