index.js 649 B

123456789101112131415161718
  1. const { execSync } = require('child_process');
  2. const path = require('path');
  3. const getDevicesId = () => execSync(path.join(__dirname, './check.exe getDevicesId')).toString('utf-8').trim()
  4. const regeditKey = (devicesId, code) => execSync(path.join(__dirname, `./check.exe regeditKey ${devicesId} ${code}`)).toString('utf-8').trim()
  5. const validate = () => execSync(path.join(__dirname, './check.exe validate')).toString('utf-8').trim()
  6. const getcode = () => execSync( path.join(__dirname, './check.exe getKey 3521-7131-4413-5051')).toString('utf-8').trim()
  7. module.exports = {
  8. getDevicesId,
  9. regeditKey,
  10. validate
  11. }