Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
fixup sending over analyzer to new agent (thanks rep)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbremer committed May 18, 2016
1 parent b41a254 commit 7a470eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/cuckoo/core/guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def analyzer_zipfile(platform, monitor):
zip_file.write(path, archive_name)

zip_file.close()
data = xmlrpclib.Binary(zip_data.getvalue())
zip_data.close()
data = zip_data.getvalue()

if time.time() - t > 10:
log.warning(
Expand Down Expand Up @@ -136,13 +135,13 @@ def upload_analyzer(self, monitor):

log.debug(
"Uploading analyzer to guest (id=%s, ip=%s, monitor=%s, size=%d)",
self.id, self.ip, monitor, len(zip_data.data)
self.id, self.ip, monitor, len(zip_data)
)

# Send the zip containing the analyzer to the agent running inside
# the guest.
try:
self.server.add_analyzer(zip_data)
self.server.add_analyzer(xmlrpclib.Binary(zip_data))
except socket.timeout:
raise CuckooGuestError("{0}: guest communication timeout: unable "
"to upload agent, check networking or try "
Expand Down

0 comments on commit 7a470eb

Please sign in to comment.