Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.warn(`unable to open ${filename} (${e.message})`)
continue
}
await new Promise((resolve, reject) =>
stream
.on('data', chunk => {
Memory.writeByteArray(buf, chunk)
libarchive.writeData(ar, buf, chunk.byteLength)
})
.on('end', resolve)
.on('error', reject))
// delete decrypted file
if (relative in lookup)
fs.unlinkSync(filename)
libarchive.writeFinishEntry(ar)
libarchive.entryFree(entry)
}
libarchive.writeFinish(ar)
console.log('done', pkg)
return transfer(pkg)
},
skipPkdValidationFor(pid) {
recv('flush', () => { }).wait()
sent += chunk.byteLength
console.log(`downloaded ${format(sent)} of ${format(size)}, ${(sent * 100 / size).toFixed(2)}%`)
})
.on('end', resolve)
.on('error', reject))
send({
subject,
event: 'end',
session,
})
console.log('transfer complete')
fs.unlinkSync(filename)
try {
const SOUND = 1007
const playSound = Module.findExportByName('AudioToolbox', 'AudioServicesPlaySystemSound')
new NativeFunction(playSound, 'void', ['int'])(SOUND)
} catch (e) {
}
}