Add dep for GetTickCount

GSoC/Meterpreter_Web_Console
Wei Chen 2018-06-29 10:22:07 -05:00
parent 711d859d13
commit 2beaabb11a
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,11 @@ module Metasploit
module CodeFactory
class GetTickCount < Base
def initialize
super
@dep = ['GetTickCount']
end
def stub
[
Proc.new { single_gettickcount },

View File

@ -6,6 +6,12 @@ RSpec.describe Metasploit::Framework::Obfuscation::CRandomizer::CodeFactory::Get
described_class.new
end
describe 'dep' do
it 'depends on GetTickCount' do
expect(subject.dep).to eq(['GetTickCount'])
end
end
describe '#single_gettickcount' do
it 'is a string' do
expect(subject.send(:single_gettickcount).class).to be(String)