diff --git a/index.html b/index.html
new file mode 100644
index 0000000..d869802
--- /dev/null
+++ b/index.html
@@ -0,0 +1,10 @@
+
+
+
+
+ Title
+
+
+ Setup with electron
+
+
\ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..d4c922b
--- /dev/null
+++ b/index.js
@@ -0,0 +1,26 @@
+const { app, BrowserWindow } = require('electron')
+const path = require('path')
+
+app.disableHardwareAcceleration()
+app.commandLine.appendSwitch('disable-http-cache')
+
+function createWindow () {
+ const win = new BrowserWindow({
+ width: 800,
+ height: 600,
+ webPreferences: {
+ nodeIntegration: true,
+ contextIsolation: false,
+ spellcheck: false
+ },
+ autoHideMenuBar: true
+ })
+
+ win.loadFile('index.html')
+}
+
+app.whenReady().then(createWindow)
+
+app.on('window-all-closed', () => {
+ app.quit()
+})
\ No newline at end of file
diff --git a/package.json b/package.json
index f774c7a..5088206 100644
--- a/package.json
+++ b/package.json
@@ -3,13 +3,38 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "start": "electron .",
+ "build": "electron-builder --win portable"
},
"keywords": [],
- "author": "",
- "license": "ISC",
+ "author": "kitbyte",
+ "license": "Apache-2.0",
"description": "",
"dependencies": {
"asar": "^3.2.0"
+ },
+ "devDependencies": {
+ "electron": "^33.2.1",
+ "electron-builder": "^25.1.8"
+ },
+ "build": {
+ "appId": "kitbyte.wemod-patcher",
+ "productName": "WeMod Patcher",
+ "directories": {
+ "output": "dist"
+ },
+ "asar": true,
+ "win": {
+ "target": [{
+ "target": "portable",
+ "arch": ["x64"]
+ }],
+ "artifactName": "${productName}.exe"
+ },
+ "compression": "maximum",
+ "removePackageScripts": true,
+ "removePackageKeywords": true,
+ "extraResources": false,
+ "electronLanguages": ["en-US"]
}
}
diff --git a/unlocker.js b/unlocker.js
index ef5b53e..5914a83 100644
--- a/unlocker.js
+++ b/unlocker.js
@@ -5,7 +5,7 @@ const asar = require('asar');
const patchBySignature = require("./memoryScanner");
-const regex = /getUserAccount\(\)\{.*?return\s+this\.#\w+\.fetch\(\{.*?\}\).*?\}/g;
+const regex = /getUserAccount\(\)\{.*?return\s+this\.#\w+\.fetch\(\{.*?}\).*?}/g;
const asarPatch = "getUserAccount(){return this.#.fetch({endpoint:\"/v3/account\",method:\"GET\",name:\"/v3/account\",collectMetrics:0}).then(response=>{response.subscription={period:\"yearly\",state:\"active\"};response.flags=78;return response;})}"
const signature = "E8 ?? ?? ?? ?? 85 C0 75 ?? F6 C3 01 74 ?? 48 89 F9 E8 ?? ?? ?? ??"
const patchBytes = [0x31]
@@ -150,7 +150,7 @@ if(fs.existsSync(defaultDir)) {
.filter(item => item.isDirectory() && /^app-\w+/.test(item.name))
.map(item => {
const folderPath = path.join(defaultDir, item.name);
- const stats = fs.statSync(folderPath); // Получаем информацию о папке
+ const stats = fs.statSync(folderPath);
return {
name: item.name,
path: folderPath,