Advertisement
Guest User

Untitled

a guest
Aug 24th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. console.time('program');
  2. const fs = require('fs');
  3.  
  4.  
  5. const filePath = "./processhackerfile.txt";
  6. const hackStringsPath = "./hackstrings.txt";
  7.  
  8. var hackStrings = fs.readFileSync(hackStringsPath).toString().split("\n");
  9. console.log(hackStrings.length);
  10. var file = fs.readFileSync(filePath).toString();
  11.  
  12. for(i in hackStrings){
  13.  
  14. var regex = new RegExp(hackStrings[i].toString(), 'i');
  15. var stringSearch = file.match(regex);
  16.  
  17. if(stringSearch != null){
  18. console.log(`Cheat found, string name: ${stringSearch}`);
  19. } else {
  20. console.log('Cheat not found');
  21. }
  22. }
  23.  
  24.  
  25. console.timeEnd('program');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement