Files
metasploit-gs/spec/lib/rex/exploitation/powershell/psh_methods_spec.rb
T
2014-08-25 23:58:08 -05:00

45 lines
1.3 KiB
Ruby

# -*- coding:binary -*-
require 'spec_helper'
require 'rex/exploitation/powershell'
describe Rex::Exploitation::Powershell::PshMethods do
describe "::download" do
it 'should return some powershell' do
script = Rex::Exploitation::Powershell::PshMethods.download('a','b')
script.should be
script.include?('WebClient').should be_truthy
end
end
describe "::uninstall" do
it 'should return some powershell' do
script = Rex::Exploitation::Powershell::PshMethods.uninstall('a')
script.should be
script.include?('Win32_Product').should be_truthy
end
end
describe "::secure_string" do
it 'should return some powershell' do
script = Rex::Exploitation::Powershell::PshMethods.secure_string('a')
script.should be
script.include?('AsPlainText').should be_truthy
end
end
describe "::who_locked_file" do
it 'should return some powershell' do
script = Rex::Exploitation::Powershell::PshMethods.who_locked_file('a')
script.should be
script.include?('Get-Process').should be_truthy
end
end
describe "::get_last_login" do
it 'should return some powershell' do
script = Rex::Exploitation::Powershell::PshMethods.get_last_login('a')
script.should be
script.include?('Get-QADComputer').should be_truthy
end
end
end