Compare commits
2 Commits
master
...
guidfindde
Author | SHA1 | Date |
---|---|---|
|
666e1910dd | |
|
c42f7864c8 |
|
@ -1 +0,0 @@
|
|||
BD
|
|
@ -0,0 +1 @@
|
|||
1392bb81-8287-4192-8f6e-7851ef2a22ef
|
|
@ -1,33 +0,0 @@
|
|||
const crypto = require('crypto');
|
||||
const fs = require('fs');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const keyPath = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography';
|
||||
const keyValue = 'MachineGuid';
|
||||
const passPath = 'HKEY_CURRENT_USER\\SOFTWARE\\HwaSmart';
|
||||
const passValue = 'BDAuthorization';
|
||||
|
||||
function cryptMD5(GUID) {
|
||||
let md5 = crypto.createHash('md5');
|
||||
let ciphertext = md5.update(GUID).digest('hex')
|
||||
return ciphertext.slice(0,8)+'-'+ciphertext.slice(8,12)+'-'+ciphertext.slice(12,16)+'-'+ciphertext.slice(16,20)+'-'+ciphertext.slice(20,32);
|
||||
}
|
||||
|
||||
fs.readFile('./KeyWord.txt', 'utf-8', (err, key) => {
|
||||
if (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
console.error('file not exist');
|
||||
return;
|
||||
}
|
||||
console.error(err, 'open');
|
||||
return;
|
||||
}
|
||||
child_process.exec(`REG QUERY ${keyPath} /v ${keyValue}`,function(error,stdout,stderr){
|
||||
console.log('stderr:'+stderr);
|
||||
if(error != null){
|
||||
console.log('exec error:'+error);
|
||||
return
|
||||
}
|
||||
child_process.exec(`reg add ${passPath} /v ${passValue} /t REG_SZ /d ${cryptMD5(stdout.slice(83,119) + key)} /f`);
|
||||
});
|
||||
});
|
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
const child_process = require('child_process');
|
||||
const fs = require('fs');
|
||||
|
||||
const keyPath = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography';
|
||||
|
||||
child_process.exec(`REG QUERY ${keyPath} /v MachineGuid`,function(error,stdout,stderr){
|
||||
console.log('stderr:'+stderr);
|
||||
if(error != null){
|
||||
console.log('exec error:'+error);
|
||||
return
|
||||
}
|
||||
fs.writeFile('./MachineGuid.txt', stdout.slice(83,119), (error) => {
|
||||
if(error){
|
||||
console.log(`创建失败:${error}`);
|
||||
}
|
||||
console.log(`创建成功!`);
|
||||
});
|
||||
});
|
9
使用说明.txt
9
使用说明.txt
|
@ -1,6 +1,5 @@
|
|||
打开文件
|
||||
KeyWord.txt
|
||||
输入加密关键字
|
||||
点击运行文件
|
||||
权限部署.bat
|
||||
即可完成权限部署
|
||||
guidfindder.exe
|
||||
然后即可在文件
|
||||
MachineGuid.txt
|
||||
中查看到电脑的 Guid
|
||||
|
|
Loading…
Reference in New Issue