2005-05-23 00:34:16 +00:00
|
|
|
#!/usr/bin/ruby
|
|
|
|
|
2005-07-09 21:18:49 +00:00
|
|
|
require 'rex/encoding/xor/generic'
|
2005-05-24 03:58:47 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Routine for xor encoding a buffer by a 2-byte (intel word) key. The perl
|
|
|
|
# version used to pad this buffer out to a 2-byte boundary, but I can't think
|
|
|
|
# of a good reason to do that anymore, so this doesn't.
|
|
|
|
#
|
|
|
|
|
2005-05-23 00:34:16 +00:00
|
|
|
module Rex
|
|
|
|
module Encoding
|
|
|
|
module Xor
|
|
|
|
|
2005-07-09 21:57:37 +00:00
|
|
|
class Dword < Generic
|
2005-05-23 00:34:16 +00:00
|
|
|
|
2005-07-09 21:57:37 +00:00
|
|
|
def Dword.keysize
|
2005-05-23 00:34:16 +00:00
|
|
|
4
|
|
|
|
end
|
|
|
|
|
2005-07-09 21:57:37 +00:00
|
|
|
end end end end # Dword/Xor/Encoding/Rex
|