cleans up a bunch of spec msftidy issues
parent
41420a97d5
commit
1fa26e2afb
|
@ -11,4 +11,4 @@ FactoryGirl.define do
|
|||
sequence :mdm_web_vuln_description do |n|
|
||||
"Mdm::WebVuln#description #{n}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,4 +6,4 @@ FactoryGirl.modify do
|
|||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -245,4 +245,4 @@ describe Metasploit::Framework::JtR::Cracker do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,4 +35,4 @@ describe Metasploit::Framework::JtR::InvalidWordlist do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -135,4 +135,4 @@ describe Metasploit::Framework::JtR::Wordlist do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,4 +41,4 @@ describe Metasploit::Framework::LoginScanner::DB2 do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -131,4 +131,4 @@ describe Metasploit::Framework::LoginScanner::FTP do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -90,4 +90,4 @@ describe Metasploit::Framework::LoginScanner::MSSQL do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,4 +105,4 @@ describe Metasploit::Framework::LoginScanner::MySQL do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ describe Metasploit::Framework::LoginScanner::POP3 do
|
|||
it_behaves_like 'Metasploit::Framework::LoginScanner::RexSocket'
|
||||
|
||||
context "#attempt_login" do
|
||||
|
||||
|
||||
let(:pub_blank) do
|
||||
Metasploit::Framework::Credential.new(
|
||||
paired: true,
|
||||
|
@ -41,10 +41,10 @@ describe Metasploit::Framework::LoginScanner::POP3 do
|
|||
expect(result.status).to eq(Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
context "Open Connection" do
|
||||
let(:sock) {double('socket')}
|
||||
|
||||
|
||||
before(:each) do
|
||||
sock.stub(:shutdown)
|
||||
sock.stub(:close)
|
||||
|
@ -53,30 +53,30 @@ describe Metasploit::Framework::LoginScanner::POP3 do
|
|||
scanner.stub(:sock).and_return(sock)
|
||||
scanner.should_receive(:select).with([sock],nil,nil,0.4)
|
||||
end
|
||||
|
||||
|
||||
it "Server returns +OK" do
|
||||
expect(sock).to receive(:get_once).exactly(3).times.and_return("+OK")
|
||||
expect(sock).to receive(:put).with("USER public\r\n").once.ordered
|
||||
expect(sock).to receive(:put).with("PASS \r\n").once.ordered
|
||||
|
||||
|
||||
result = scanner.attempt_login(pub_blank)
|
||||
|
||||
expect(result).to be_kind_of(Metasploit::Framework::LoginScanner::Result)
|
||||
expect(result.status).to eq(Metasploit::Model::Login::Status::SUCCESSFUL)
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
it "Server Returns Something Else" do
|
||||
sock.stub(:get_once).and_return("+ERROR")
|
||||
|
||||
|
||||
result = scanner.attempt_login(pub_blank)
|
||||
|
||||
expect(result).to be_kind_of(Metasploit::Framework::LoginScanner::Result)
|
||||
expect(result.status).to eq(Metasploit::Model::Login::Status::INCORRECT)
|
||||
expect(result.proof).to eq("+ERROR")
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -72,4 +72,4 @@ describe Metasploit::Framework::LoginScanner::Postgres do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -42,4 +42,4 @@ describe Metasploit::Framework::LoginScanner::Result do
|
|||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,4 +53,4 @@ describe Metasploit::Framework::LoginScanner::SNMP do
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -75,4 +75,4 @@ describe Metasploit::Framework::LoginScanner::Telnet do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -81,4 +81,4 @@ describe Metasploit::Framework::LoginScanner::VNC do
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,4 +8,4 @@ describe Msf::Simple::Framework do
|
|||
end
|
||||
|
||||
it_should_behave_like 'Msf::Simple::Framework::ModulePaths'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -292,4 +292,4 @@ describe Msf::Exploit::Remote::BrowserExploitServer do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -86,4 +86,4 @@ describe Msf::Handler::ReverseHttp::UriChecksum do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,4 +20,4 @@ describe Msf::OptEnum do
|
|||
subject.valid?('Bar').should == true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,4 +12,4 @@ describe Msf::OptRaw do
|
|||
invalid_values = []
|
||||
|
||||
it_behaves_like "an option", valid_values, invalid_values, 'raw'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,4 +14,4 @@ describe Msf::OptRegexp do
|
|||
]
|
||||
|
||||
it_behaves_like "an option", valid_values, invalid_values, 'regexp'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -530,4 +530,4 @@ describe Msf::PayloadGenerator do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,4 +105,4 @@ describe Msf::DBManager::Export do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1775,7 +1775,7 @@ describe Msf::DBManager do
|
|||
|
||||
# @todo determine how to load a single payload to test payload type outside of msfconsole
|
||||
|
||||
it_should_behave_like 'Msf::DBManager#update_module_details with module',
|
||||
it_should_behave_like 'Msf::DBManager#update_module_details with module',
|
||||
:reference_name => 'windows/escalate/screen_unlock',
|
||||
:type => 'post'
|
||||
end
|
||||
|
|
|
@ -27,4 +27,4 @@ describe Rex::Exploitation::Js::Detect do
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,4 +27,4 @@ describe Rex::Exploitation::Js::Memory do
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,4 +13,4 @@ describe Rex::Exploitation::Js::Utils do
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ lots \t of whitespace
|
|||
# single_line_comment1
|
||||
# single_line_comment2
|
||||
#
|
||||
# single_line_comment3
|
||||
# single_line_comment3
|
||||
if (-not ($NewLogonAccountDomain -cmatch \"NT\\sAUTHORITY\" -or $NewLogonAccountDomain -cmatch \"Window\\sManager\"))
|
||||
{
|
||||
$Key = $AccountName + $AccountDomain + $NewLogonAccountName + $NewLogonAccountDomain + $LogonType + $WorkstationName + $SourceNetworkAddress + $SourcePort
|
||||
|
@ -84,7 +84,7 @@ lots \t of whitespace
|
|||
# single_line_comment1
|
||||
# single_line_comment2
|
||||
#
|
||||
# single_line_comment3
|
||||
# single_line_comment3
|
||||
$some_literal = @\"
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
|
|
@ -82,4 +82,4 @@ describe Rex::Exploitation::RopDb do
|
|||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,43 +33,43 @@ xml_serv = '
|
|||
|
||||
xml_ms = '
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Groups clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}"
|
||||
<Groups clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}"
|
||||
disabled="1">
|
||||
<User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}"
|
||||
name="DbAdmin"
|
||||
image="2"
|
||||
changed="2007-07-06 20:45:20"
|
||||
<User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}"
|
||||
name="DbAdmin"
|
||||
image="2"
|
||||
changed="2007-07-06 20:45:20"
|
||||
uid="{253F4D90-150A-4EFB-BCC8-6E894A9105F7}">
|
||||
<Properties
|
||||
action="U"
|
||||
newName=""
|
||||
fullName="Database Admin"
|
||||
description="Local Database Admin"
|
||||
cpassword="demo"
|
||||
changeLogon="0"
|
||||
noChange="0"
|
||||
neverExpires="0"
|
||||
acctDisabled="1"
|
||||
<Properties
|
||||
action="U"
|
||||
newName=""
|
||||
fullName="Database Admin"
|
||||
description="Local Database Admin"
|
||||
cpassword="demo"
|
||||
changeLogon="0"
|
||||
noChange="0"
|
||||
neverExpires="0"
|
||||
acctDisabled="1"
|
||||
userName="DbAdmin"/>
|
||||
</User>
|
||||
<Group clsid="{6D4A79E4-529C-4481-ABD0-F5BD7EA93BA7}"
|
||||
name="Database Admins"
|
||||
image="2"
|
||||
changed="2007-07-06 20:46:21"
|
||||
<Group clsid="{6D4A79E4-529C-4481-ABD0-F5BD7EA93BA7}"
|
||||
name="Database Admins"
|
||||
image="2"
|
||||
changed="2007-07-06 20:46:21"
|
||||
uid="{C5FB3901-508A-4A9E-9171-60D4FC2B404B}">
|
||||
<Properties
|
||||
action="U"
|
||||
newName=""
|
||||
description="Local Database Admins"
|
||||
userAction="REMOVE"
|
||||
deleteAllUsers="1"
|
||||
deleteAllGroups="1"
|
||||
removeAccounts="0"
|
||||
<Properties
|
||||
action="U"
|
||||
newName=""
|
||||
description="Local Database Admins"
|
||||
userAction="REMOVE"
|
||||
deleteAllUsers="1"
|
||||
deleteAllGroups="1"
|
||||
removeAccounts="0"
|
||||
groupName="Database Admins">
|
||||
<Members>
|
||||
<Member
|
||||
name="domain\sampleuser"
|
||||
action="ADD"
|
||||
<Member
|
||||
name="domain\sampleuser"
|
||||
action="ADD"
|
||||
sid=""/>
|
||||
</Members>
|
||||
</Properties>
|
||||
|
@ -89,12 +89,12 @@ cpassword_bad = "blah"
|
|||
|
||||
describe Rex::Parser::GPP do
|
||||
GPP = Rex::Parser::GPP
|
||||
|
||||
|
||||
##
|
||||
# Decrypt
|
||||
##
|
||||
it "Decrypt returns Local*P4ssword! for normal cpassword" do
|
||||
result = GPP.decrypt(cpassword_normal)
|
||||
result = GPP.decrypt(cpassword_normal)
|
||||
result.should eq("Local*P4ssword!")
|
||||
end
|
||||
|
||||
|
@ -102,7 +102,7 @@ describe Rex::Parser::GPP do
|
|||
result = GPP.decrypt(cpassword_bad)
|
||||
result.should eq("")
|
||||
end
|
||||
|
||||
|
||||
it "Decrypt returns blank for nil cpassword" do
|
||||
result = GPP.decrypt(nil)
|
||||
result.should eq("")
|
||||
|
|
|
@ -16,7 +16,7 @@ comb = REXML::Document.new('<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
|||
describe Rex::Parser::Unattend do
|
||||
|
||||
context "#parse" do
|
||||
it "returns passwords for b64" do
|
||||
it "returns passwords for b64" do
|
||||
results = described_class.parse(b64)
|
||||
results.length.should eq(2)
|
||||
results[0]['password'].should eq(Rex::Text.to_unicode('Temp123'))
|
||||
|
|
|
@ -49,5 +49,5 @@ describe Rex::Post::Meterpreter::ClientCore do
|
|||
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ describe Rex::Proto::PJL::Client do
|
|||
expect { cli.info(nil) }.to raise_error(ArgumentError)
|
||||
end
|
||||
|
||||
it "should receive a response for an INFO request" do
|
||||
it "should receive a response for an INFO request" do
|
||||
cli.info(:id).should eq(default_response)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ require 'spec_helper'
|
|||
|
||||
describe Metasploit::Credential::Core do
|
||||
it_should_behave_like 'Metasploit::Credential::Core::ToCredential'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -72,7 +72,7 @@ describe Msfcli do
|
|||
it "should see a help menu" do
|
||||
out = get_stdout {
|
||||
cli = Msfcli.new([])
|
||||
cli.usage
|
||||
cli.usage
|
||||
}
|
||||
out.should =~ /Usage/
|
||||
end
|
||||
|
|
|
@ -14,4 +14,4 @@ shared_context 'Msf::DBManager' do
|
|||
framework.db.workspace = framework.db.default_workspace
|
||||
db_manager.stub(:active => active)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,19 +3,19 @@ require 'metasploit/framework/credential'
|
|||
shared_examples_for 'Metasploit::Credential::Core::ToCredential' do
|
||||
context "methods" do
|
||||
context ".to_credential" do
|
||||
|
||||
|
||||
subject(:crednetial_core) do
|
||||
FactoryGirl.create(:metasploit_credential_core)
|
||||
end
|
||||
|
||||
|
||||
it { should respond_to :to_credential }
|
||||
|
||||
|
||||
it "should return a Metasploit::Framework::Credential" do
|
||||
expect(
|
||||
crednetial_core.to_credential
|
||||
).to be_a Metasploit::Framework::Credential
|
||||
end
|
||||
|
||||
|
||||
it "should set the parent to the credential object" do
|
||||
expect(
|
||||
crednetial_core.to_credential.parent
|
||||
|
@ -23,4 +23,4 @@ shared_examples_for 'Metasploit::Credential::Core::ToCredential' do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,4 +20,4 @@ shared_examples_for 'Msf::DBManager::Export#extract_module_detail_info module_de
|
|||
child_node.content.should == attribute.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -134,4 +134,4 @@ shared_examples_for 'Msf::DBManager::Migration' do
|
|||
reset_column_information
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ shared_examples_for 'Msf::DBManager#search_modules Mdm::Module::Platform#name or
|
|||
|
||||
context 'with Mdm::Module::Target#name' do
|
||||
let(:name) do
|
||||
# use inspect to quote spaces in string
|
||||
# use inspect to quote spaces in string
|
||||
module_target.name.inspect
|
||||
end
|
||||
|
||||
|
@ -46,4 +46,4 @@ shared_examples_for 'Msf::DBManager#search_modules Mdm::Module::Platform#name or
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,4 +41,4 @@ shared_examples_for 'Msf::DBManager#search_modules Mdm::Module::Ref#name keyword
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -57,4 +57,4 @@ shared_examples_for 'Msf::DBManager#update_all_module_details refresh' do
|
|||
update_all_module_details
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,4 +23,4 @@ shared_examples_for 'Msf::DBManager#update_module_details with module' do |optio
|
|||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -456,4 +456,4 @@ shared_examples_for 'Msf::ModuleManager::Cache' do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -159,4 +159,4 @@ shared_examples_for 'Msf::ModuleManager::Loading' do
|
|||
on_module_load
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -74,4 +74,4 @@ shared_examples_for 'Msf::ModuleManager::ModulePaths' do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -92,4 +92,4 @@ shared_examples_for 'Msf::Simple::Framework::ModulePaths' do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,4 +28,4 @@ describe CPassword do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue