Skip to content

Instantly share code, notes, and snippets.

@ChALkeR
Created August 27, 2015 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChALkeR/ac211820feb3eb128ab3 to your computer and use it in GitHub Desktop.
Save ChALkeR/ac211820feb3eb128ab3 to your computer and use it in GitHub Desktop.
Inspecting memory with Buffer: source file comments
var token = 'pass' + 'word!ASD';
//password!ASD
var step = 0;
function inspect() {
var buf = (new Buffer(100)).toString('ascii');
if (buf.indexOf(token) !== -1) {
console.log('Found at step ' + step + ': ' + buf);
}
}
for (step = 0; step < 100000; step++) {
inspect();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment