Files
metasploit-gs/msfcli
T
Matt Miller 3fa760bc6a making code smaller is what we do
git-svn-id: file:///home/svn/incoming/trunk@2491 4d416f70-5f16-0410-b530-b9f4589650da
2005-05-17 04:22:42 +00:00

25 lines
664 B
Ruby
Executable File

#!/usr/bin/ruby -I../Framework -I../Modules
require 'Msf/Framework'
require 'Encoders/Generic/IA32/jmp_call_additive'
framework = Msf::Framework.new
framework.add_log_sink(Msf::Logging::Sinks::Flatfile.new('/tmp/msfcli.log'))
#encoder = framework.encoders.instantiate('gen_ia32_jmp_call_additive')
encoder = Msf::Encoders::Generic::IA32::JmpCallAdditive.new
puts "#{encoder.author_to_s}"
puts "#{encoder.arch_to_s}"
begin
encoded = encoder.encode("\xcc\x90\x90\x90ABCDEFGHIJKLMNOPQRSTUVWXYZ", "\x87")
rescue Msf::Encoding::BadcharException => detail
puts "bad char at #{detail.index} #{detail.buf.unpack('H*')[0]}"
exit
end
puts encoded.unpack("H*")[0]