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

remove extra padding that messes everything up

git-svn-id: file:///home/svn/framework3/trunk@10577 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Joshua Drake 2010-10-06 21:44:23 +00:00
parent b98732ae0a
commit eee1e52f14

View File

@ -121,11 +121,6 @@ module Net; module SSH; module Transport
# compute the packet length (sans the length field itself)
packet_length = payload.length + padding_length + 1
if packet_length < 16
padding_length += client.cipher.block_size
packet_length = payload.length + padding_length + 1
end
padding = Array.new(padding_length) { rand(256) }.pack("C*")
unencrypted_data = [packet_length, padding_length, payload, padding].pack("NCA*A*")