commit
c2a979dd3c
|
@ -147,9 +147,9 @@ class Meterpreter < Rex::Post::Meterpreter::Client
|
|||
guid = [SecureRandom.uuid.gsub(/-/, '')].pack('H*')
|
||||
session.core.set_session_guid(guid)
|
||||
session.session_guid = guid
|
||||
# TODO: New statgeless session, do some account in the DB so we can track it later.
|
||||
# TODO: New stageless session, do some account in the DB so we can track it later.
|
||||
else
|
||||
# TODO: This session was either staged or previously known, and so we shold do some accounting here!
|
||||
# TODO: This session was either staged or previously known, and so we should do some accounting here!
|
||||
end
|
||||
|
||||
unless datastore['AutoLoadStdapi'] == false
|
||||
|
|
|
@ -27,27 +27,28 @@ class PacketParser
|
|||
end
|
||||
|
||||
#
|
||||
# Reads data from the wire and parse as much of the packet as possible.
|
||||
# Reads data from the socket and parses as much of the packet as possible.
|
||||
#
|
||||
def recv(sock)
|
||||
bytes_left = self.packet.raw_bytes_required
|
||||
|
||||
if bytes_left > 0
|
||||
raw = sock.read(bytes_left)
|
||||
if raw
|
||||
raw = nil
|
||||
if self.packet.raw_bytes_required > 0
|
||||
while (raw = sock.read(self.packet.raw_bytes_required))
|
||||
self.packet.add_raw(raw)
|
||||
else
|
||||
raise EOFError
|
||||
break if self.packet.raw_bytes_required == 0
|
||||
end
|
||||
end
|
||||
|
||||
if self.packet.raw_bytes_required == 0
|
||||
packet = self.packet
|
||||
reset
|
||||
return packet
|
||||
if self.packet.raw_bytes_required > 0
|
||||
if raw == nil
|
||||
raise EOFError
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
nil
|
||||
packet = self.packet
|
||||
reset
|
||||
packet
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
Loading…
Reference in New Issue