Skip to content

Commit

Permalink
fix dos checker
Browse files Browse the repository at this point in the history
  • Loading branch information
hitman249 committed Feb 28, 2021
1 parent 4513343 commit 3938459
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/src/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,10 @@ export default class Utils {
let buffer = Buffer.alloc(80);
fs.readSync(fs.openSync(path, 'r'), buffer, 0, 80, 0);

let head = buffer.toString('hex', 0, 2);
let sign = buffer.toString('hex', 69, 78);
let head = buffer.toString('hex', 0, 2);
let sign = buffer.toString('hex', 69, 78);
let sign2 = buffer.toString('hex', 2, 5);

return '4d5a' === head && 'b409cd21b8014ccd21' !== sign;
return [ '4d5a', '5a4d' ].includes(head) && 'b409cd21b8014ccd21' !== sign && ![ '900003', '500002' ].includes(sign2);
}
}

0 comments on commit 3938459

Please sign in to comment.