2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-05-23 00:34:16 +00:00
|
|
|
|
2005-07-09 21:18:49 +00:00
|
|
|
require 'rex/encoding/xor/generic'
|
2005-05-24 03:58:47 +00:00
|
|
|
|
2005-05-23 00:34:16 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
module Rex
|
|
|
|
module Encoding
|
|
|
|
module Xor
|
|
|
|
|
|
|
|
class Word < Generic
|
|
|
|
|
2005-05-24 03:58:47 +00:00
|
|
|
def Word.keysize
|
|
|
|
2
|
2005-05-23 00:34:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end end end end # Word/Xor/Encoding/Rex
|