mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Add support for IIS account migration.
This commit is contained in:
parent
e75adafb05
commit
c0d0166184
6 changed files with 89 additions and 19 deletions
14
pass.js
14
pass.js
|
@ -39,4 +39,16 @@ exports.hash = function (pwd, salt, fn) {
|
|||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
exports.iishash = function (type, pwd, salt, fn) {
|
||||
if (type == 0) {
|
||||
fn(null, pwd);
|
||||
} else if (type == 1) {
|
||||
const hash = crypto.createHash('sha1');
|
||||
hash.update(Buffer.concat([new Buffer(salt, 'base64'), new Buffer(pwd, 'utf16le')]));
|
||||
fn(null, hash.digest().toString('base64'));
|
||||
} else {
|
||||
fn('invalid type');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue