Skip to content

Commit

Permalink
new tactic
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed Jul 16, 2024
1 parent 372135e commit 210ba7e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions test/get.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,20 @@ describe('get()', () => {

it('should get an 64-bit integer value', { timeout: 360000 }, async () => {
await new Promise<void>(resolve => {
console.log('-'.repeat(80));
const child = spawn(
'reg',
['query', 'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion', '/s'],
{ stdio: 'pipe' }
);
let buffer = '';
child.stdout.on('data', data => {
buffer += data.toString();
const s = data.toString();
if (s.includes('REG_QWORD')) {
console.log(s);
}
});
child.on('close', () => {
const chunks = buffer.split('\n\n');
for (const chunk of chunks) {
if (chunk.includes('REG_QWORD')) {
console.log('-'.repeat(80));
console.log(chunk);
console.log('-'.repeat(80));
}
}
console.log('-'.repeat(80));
resolve();
});
});
Expand Down

0 comments on commit 210ba7e

Please sign in to comment.