Skip to content

Commit

Permalink
debug clamd
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Bayr committed Nov 5, 2024
1 parent 3d2acf4 commit 0d28a85
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sddi-urban/clamav/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,18 @@ def instream(self, buff):
self.clamd_socket.send(size + chunk)
chunk = buff.read(max_chunk_size)
print('XXXXXXXXXXX 3')
f = open('/srv/app/data/MB_clamav_instream_01', 'w')
f.writelines("XXXXXXXXXXX 3 chunk\n")
f.writelines(str(len(chunk)))
f.writelines('\n')
f.writelines(chunk)
f.close()

self.clamd_socket.send(struct.pack(b'!L', 0))

print('XXXXXXXXXXX 4')
f = open('/srv/app/data/MB_clamav_instream_01', 'w')
f.writelines("MB_clamav_instream_06\n")
f = open('/srv/app/data/MB_clamav_instream_02', 'w')
f.writelines("XXXXXXXXXXX 4 socket.send")
f.close()

result = self._recv_response()
Expand Down

0 comments on commit 0d28a85

Please sign in to comment.