none encoder

git-svn-id: file:///home/svn/incoming/trunk@2993 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-10-31 19:15:21 +00:00
parent 8d4d812df2
commit b4b88c7213
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,29 @@
require 'msf/core'
module Msf
module Encoders
module Generic
class None < Msf::Encoder
def initialize
super(
'Name' => 'The "none" Encoder',
'Version' => '$Revision$',
'Description' => %q{
This "encoder" does not transform the payload in any way.
},
'Author' => 'spoonm',
'Arch' => ARCH_ALL)
end
#
# Simply return the buf straight back.
#
def encode_block(state, buf)
buf
end
end
end end end

View File

@ -43,6 +43,10 @@ class Countdown < Msf::Encoder::Xor
return decoder
end
#
# Encodes a one byte block with the current index of the length of the
# payload.
#
def encode_block(state, block)
state.context += 1