1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Fix up the encoding xor to work with both old and new ruby

git-svn-id: file:///home/svn/framework3/trunk@6617 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2009-06-03 02:30:12 +00:00
parent 51f0e8fc53
commit 2b4e0f440b

View File

@ -120,7 +120,7 @@ class Generic
pos = 0
while pos < buf.length
encoded += (buf[pos,1].ord ^ key[pos % len, 1].ord).chr
encoded += (buf[pos,1].unpack("C*")[0] ^ key[pos % len, 1].unpack("C*")[0]).chr
key = _encode_mutate_key(buf, key, pos, len)
pos += 1
end