Skip to content

Commit

Permalink
Flush GZIP constantly to avoid corrupt data
Browse files Browse the repository at this point in the history
  • Loading branch information
zxlin committed Apr 13, 2021
1 parent c33aee9 commit 193a7b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mitm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ function handleAttackerAuthCallback(err, lxc, authCtx, attacker) {
);

// Make a Gzip handler to automatically compress the file on the fly
let screenWriteGZIP = zlib.createGzip();
let screenWriteGZIP = zlib.createGzip({
flush : zlib.constants.Z_FULL_FLUSH
});
screenWriteGZIP.pipe(screenWriteOutputStream);

/*let year = dateTime.getFullYear(), month = ("0" + dateTime.getMonth()).slice(-2),
Expand Down

0 comments on commit 193a7b4

Please sign in to comment.