2005-05-23 00:34:16 +00:00
|
|
|
#!/usr/bin/ruby
|
|
|
|
|
2005-05-24 03:58:47 +00:00
|
|
|
require 'Rex/Encoding/Xor/Generic'
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
class DWord < Generic
|
|
|
|
|
2005-05-24 03:58:47 +00:00
|
|
|
def DWord.keysize
|
2005-05-23 00:34:16 +00:00
|
|
|
4
|
|
|
|
end
|
|
|
|
|
2005-05-25 05:31:57 +00:00
|
|
|
end end end end # DWord/Xor/Encoding/Rex
|