Inspecting memory with Buffer: source file comments

August 27, 2015 ยท View on GitHub

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(); }