|
@@ -1,3 +1,4 @@
|
|
|
|
+import { fileHashMap } from "@/constants/constants";
|
|
import { throttle } from "lodash";
|
|
import { throttle } from "lodash";
|
|
import { createLog } from "./logger";
|
|
import { createLog } from "./logger";
|
|
|
|
|
|
@@ -106,9 +107,13 @@ export function checkMainExe() {
|
|
.update(window.nodeRequire("fs").readFileSync(executablePath))
|
|
.update(window.nodeRequire("fs").readFileSync(executablePath))
|
|
.digest("hex");
|
|
.digest("hex");
|
|
console.log("the hash: ", getHash);
|
|
console.log("the hash: ", getHash);
|
|
|
|
+ if (fileHashMap.get(window.location.hostname) === getHash) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// check filepath executablePath md5
|
|
// check filepath executablePath md5
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error);
|
|
console.log(error);
|
|
}
|
|
}
|
|
|
|
+ return false;
|
|
}
|
|
}
|