mirror of
https://github.com/xenos1337/httptoolkit-patcher.git
synced 2026-07-15 16:20:02 +02:00
Fix macOS hash patching and update dependencies
On macOS, the integrity hash is stored in Info.plist, not embedded in the executable binary. Added patchInfoPlistHash() and platform branching so macOS patches Info.plist while Windows/Linux patch the binary. Also updated dependencies for compatibility: - @electron/asar 4.0.1 → 4.1.0 (named export change) - chalk 4 → 5.6.2 (tagged template → function call syntax) - @types/node 20 → 25 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
bbc7918678
commit
24c8828e71
@@ -1,6 +1,6 @@
|
||||
// @ts-check
|
||||
import { spawn, execSync } from "child_process";
|
||||
import asar from "@electron/asar";
|
||||
import * as asar from "@electron/asar";
|
||||
import chalk from "chalk";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
@@ -126,10 +126,10 @@ async function checkForUpdates() {
|
||||
const latestVersion = latestTag.replace(/^v/, "");
|
||||
|
||||
if (compareVersions(latestVersion, LOCAL_VERSION) > 0) {
|
||||
console.log(chalk.yellowBright`\n╔════════════════════════════════════════════════════════════╗`);
|
||||
console.log(chalk.yellowBright`║` + chalk.white` A new version is available: ` + chalk.greenBright`v${latestVersion}` + chalk.white` (current: ` + chalk.gray`v${LOCAL_VERSION}` + chalk.white`) ` + chalk.yellowBright` ║`);
|
||||
console.log(chalk.yellowBright`║` + chalk.white` Update: ` + chalk.cyanBright`https://github.com/${GITHUB_REPO}` + chalk.white` ` + chalk.yellowBright`║`);
|
||||
console.log(chalk.yellowBright`╚════════════════════════════════════════════════════════════╝\n`);
|
||||
console.log(chalk.yellowBright('\n╔════════════════════════════════════════════════════════════╗'));
|
||||
console.log(chalk.yellowBright('║') + chalk.white(' A new version is available: ') + chalk.greenBright(`v${latestVersion}`) + chalk.white(' (current: ') + chalk.gray(`v${LOCAL_VERSION}`) + chalk.white(') ') + chalk.yellowBright(' ║'));
|
||||
console.log(chalk.yellowBright('║') + chalk.white(' Update: ') + chalk.cyanBright(`https://github.com/${GITHUB_REPO}`) + chalk.white(' ') + chalk.yellowBright('║'));
|
||||
console.log(chalk.yellowBright('╚════════════════════════════════════════════════════════════╝\n'));
|
||||
}
|
||||
} catch (e) {
|
||||
// Silently ignore update check errors (network issues, etc.)
|
||||
@@ -162,11 +162,11 @@ async function findAppPath() {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[!] HTTP Toolkit not found in default locations`);
|
||||
console.log(chalk.yellowBright('[!] HTTP Toolkit not found in default locations'));
|
||||
const userPath = await prompt("Please enter the path to HTTP Toolkit executable/app: ");
|
||||
|
||||
if (!userPath) {
|
||||
console.error(chalk.redBright`[-] No path provided`);
|
||||
console.error(chalk.redBright('[-] No path provided'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ async function findAppPath() {
|
||||
if (!resourcesPath.endsWith("resources")) resourcesPath = path.join(resourcesPath, "resources");
|
||||
|
||||
if (!fs.existsSync(path.join(resourcesPath, "app.asar"))) {
|
||||
console.error(chalk.redBright`[-] app.asar not found at ${resourcesPath}`);
|
||||
console.error(chalk.redBright(`[-] app.asar not found at ${resourcesPath}`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ async function findAppPath() {
|
||||
|
||||
// Request elevated permissions
|
||||
async function requestElevation() {
|
||||
console.log(chalk.yellowBright`[!] Requesting elevated permissions...`);
|
||||
console.log(chalk.yellowBright('[!] Requesting elevated permissions...'));
|
||||
|
||||
// @ts-ignore - pkg adds this property at runtime
|
||||
const isBundled = process.pkg;
|
||||
@@ -201,28 +201,28 @@ async function requestElevation() {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(chalk.greenBright`[+] Spawning PowerShell with script: ${script}`);
|
||||
console.log(chalk.greenBright(`[+] Spawning PowerShell with script: ${script}`));
|
||||
execSync(`powershell -Command "${script}"`, { stdio: "inherit" });
|
||||
console.log(chalk.blueBright`[+] Restarting with administrator privileges...`);
|
||||
console.log(chalk.blueBright('[+] Restarting with administrator privileges...'));
|
||||
process.exit(0);
|
||||
} catch (e) {
|
||||
console.error(chalk.redBright`[-] Failed to elevate permissions: ${e.message}`);
|
||||
console.error(chalk.redBright`[-] Please run as administrator manually`);
|
||||
console.error(chalk.redBright(`[-] Failed to elevate permissions: ${e.message}`));
|
||||
console.error(chalk.redBright('[-] Please run as administrator manually'));
|
||||
process.exit(1);
|
||||
}
|
||||
} else if (isLinux) {
|
||||
// Linux: Cannot auto-elevate with sudo, show instructions instead
|
||||
console.log(chalk.yellowBright`[!] Elevated permissions are required for patching on Linux`);
|
||||
console.log(chalk.yellowBright`[!] Please re-run this script with sudo:`);
|
||||
console.log(chalk.yellowBright('[!] Elevated permissions are required for patching on Linux'));
|
||||
console.log(chalk.yellowBright('[!] Please re-run this script with sudo:'));
|
||||
if (isBundled) {
|
||||
console.log(chalk.blueBright` sudo ${__filename}`);
|
||||
console.log(chalk.blueBright(` sudo ${__filename}`));
|
||||
} else {
|
||||
console.log(chalk.blueBright` sudo node ${__filename}`);
|
||||
console.log(chalk.blueBright(` sudo node ${__filename}`));
|
||||
}
|
||||
process.exit(1);
|
||||
} else {
|
||||
// macOS: Try to elevate with sudo
|
||||
console.log(chalk.blueBright`[+] Restarting with sudo...`);
|
||||
console.log(chalk.blueBright('[+] Restarting with sudo...'));
|
||||
try {
|
||||
let child;
|
||||
if (isBundled) {
|
||||
@@ -236,8 +236,8 @@ async function requestElevation() {
|
||||
}
|
||||
child.on("exit", code => process.exit(code || 0));
|
||||
} catch (e) {
|
||||
console.error(chalk.redBright`[-] Failed to elevate permissions: ${e.message}`);
|
||||
console.error(chalk.redBright`[-] Please run with sudo manually`);
|
||||
console.error(chalk.redBright(`[-] Failed to elevate permissions: ${e.message}`));
|
||||
console.error(chalk.redBright('[-] Please run with sudo manually'));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
@@ -255,61 +255,61 @@ function checkPermissions(filePath) {
|
||||
fs.mkdirSync(testDirPath, { recursive: true });
|
||||
fs.rmdirSync(testDirPath);
|
||||
} catch (dirError) {
|
||||
console.error(chalk.redBright`[-] Cannot create directories in ${path.dirname(filePath)}: ${dirError.message}`);
|
||||
console.error(chalk.redBright(`[-] Cannot create directories in ${path.dirname(filePath)}: ${dirError.message}`));
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log(chalk.greenBright`[+] Permissions check passed for ${filePath}`);
|
||||
console.log(chalk.greenBright(`[+] Permissions check passed for ${filePath}`));
|
||||
return true;
|
||||
} catch (e) {
|
||||
console.error(chalk.redBright`[-] Permissions check failed for ${filePath}: ${e.message}`);
|
||||
console.error(chalk.redBright(`[-] Permissions check failed for ${filePath}: ${e.message}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Kill HTTP Toolkit processes
|
||||
async function killHttpToolkit() {
|
||||
console.log(chalk.yellowBright`[+] Checking for running HTTP Toolkit processes...`);
|
||||
console.log(chalk.yellowBright('[+] Checking for running HTTP Toolkit processes...'));
|
||||
|
||||
try {
|
||||
if (isWin) {
|
||||
// Windows: Use tasklist to find and taskkill to terminate
|
||||
const output = execSync('tasklist /FI "IMAGENAME eq HTTP Toolkit.exe" /FO CSV /NH', { encoding: "utf-8" });
|
||||
if (output.includes("HTTP Toolkit.exe")) {
|
||||
console.log(chalk.yellowBright`[!] HTTP Toolkit is running, attempting to close it...`);
|
||||
console.log(chalk.yellowBright('[!] HTTP Toolkit is running, attempting to close it...'));
|
||||
execSync('taskkill /F /IM "HTTP Toolkit.exe" /T', { stdio: "ignore" });
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit processes terminated`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit processes terminated'));
|
||||
// Wait a moment for the process to fully close
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
} else {
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||
}
|
||||
} else if (isMac) {
|
||||
// macOS: Use pgrep and pkill
|
||||
try {
|
||||
execSync('pgrep -f "HTTP Toolkit"', { stdio: "ignore" });
|
||||
console.log(chalk.yellowBright`[!] HTTP Toolkit is running, attempting to close it...`);
|
||||
console.log(chalk.yellowBright('[!] HTTP Toolkit is running, attempting to close it...'));
|
||||
execSync('pkill -f "HTTP Toolkit"', { stdio: "ignore" });
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit processes terminated`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit processes terminated'));
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
} catch (e) {
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||
}
|
||||
} else {
|
||||
// Linux: Use pgrep and pkill
|
||||
try {
|
||||
execSync('pgrep -f "HTTP Toolkit"', { stdio: "ignore" });
|
||||
console.log(chalk.yellowBright`[!] HTTP Toolkit is running, attempting to close it...`);
|
||||
console.log(chalk.yellowBright('[!] HTTP Toolkit is running, attempting to close it...'));
|
||||
execSync('pkill -f "HTTP Toolkit"', { stdio: "ignore" });
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit processes terminated`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit processes terminated'));
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
} catch (e) {
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(chalk.yellowBright`[!] Could not check/kill processes: ${e.message}`);
|
||||
console.log(chalk.yellowBright`[!] If HTTP Toolkit is running, please close it manually`);
|
||||
console.log(chalk.yellowBright(`[!] Could not check/kill processes: ${e.message}`));
|
||||
console.log(chalk.yellowBright('[!] If HTTP Toolkit is running, please close it manually'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,12 +428,31 @@ function patchExecutableHash(executablePath, originalHash, newHash) {
|
||||
return occurrences;
|
||||
}
|
||||
|
||||
// Replace the asar integrity hash inside the macOS Info.plist
|
||||
function patchInfoPlistHash(resourcesPath, originalHash, newHash) {
|
||||
const basePath = getBinaryBasePath(resourcesPath);
|
||||
const plistPath = path.join(basePath, "Info.plist");
|
||||
|
||||
if (!fs.existsSync(plistPath)) {
|
||||
throw new Error(`Info.plist not found at ${plistPath}`);
|
||||
}
|
||||
|
||||
let content = fs.readFileSync(plistPath, "utf-8");
|
||||
|
||||
if (!content.includes(originalHash)) {
|
||||
throw new Error("Original hash not found in Info.plist");
|
||||
}
|
||||
|
||||
content = content.replaceAll(originalHash, newHash);
|
||||
fs.writeFileSync(plistPath, content, "utf-8");
|
||||
}
|
||||
|
||||
// Unpatch/restore function
|
||||
async function unpatchApp() {
|
||||
console.log(chalk.blueBright`[+] HTTP Toolkit Unpatcher Started`);
|
||||
console.log(chalk.blueBright('[+] HTTP Toolkit Unpatcher Started'));
|
||||
|
||||
const appPath = await findAppPath();
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit found at ${appPath}`);
|
||||
console.log(chalk.greenBright(`[+] HTTP Toolkit found at ${appPath}`));
|
||||
|
||||
await killHttpToolkit();
|
||||
|
||||
@@ -445,53 +464,53 @@ async function unpatchApp() {
|
||||
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
||||
|
||||
if (!hasPermissions) {
|
||||
console.log(chalk.yellowBright`[!] No write permissions for ${appPath}`);
|
||||
console.log(chalk.yellowBright(`[!] No write permissions for ${appPath}`));
|
||||
|
||||
if (isElevated()) {
|
||||
console.error(chalk.redBright`[-] Still no permissions even with elevated privileges`);
|
||||
console.error(chalk.redBright('[-] Still no permissions even with elevated privileges'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[!] Administrator/sudo privileges required for unpatching`);
|
||||
console.log(chalk.yellowBright('[!] Administrator/sudo privileges required for unpatching'));
|
||||
await requestElevation();
|
||||
}
|
||||
|
||||
if (!fs.existsSync(backupPath)) {
|
||||
console.error(chalk.redBright`[-] Backup file not found at ${backupPath}`);
|
||||
console.error(chalk.redBright`[-] Cannot unpatch without backup file`);
|
||||
console.error(chalk.redBright(`[-] Backup file not found at ${backupPath}`));
|
||||
console.error(chalk.redBright('[-] Cannot unpatch without backup file'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[+] Restoring from backup...`);
|
||||
console.log(chalk.yellowBright('[+] Restoring from backup...'));
|
||||
try {
|
||||
fs.copyFileSync(backupPath, asarPath);
|
||||
console.log(chalk.greenBright`[+] Restored app.asar from backup`);
|
||||
console.log(chalk.greenBright('[+] Restored app.asar from backup'));
|
||||
} catch (e) {
|
||||
console.error(chalk.redBright`[-] Failed to restore backup: ${e.message}`);
|
||||
console.error(chalk.redBright(`[-] Failed to restore backup: ${e.message}`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (fs.existsSync(extractPath)) {
|
||||
console.log(chalk.yellowBright`[+] Removing extracted files...`);
|
||||
console.log(chalk.yellowBright('[+] Removing extracted files...'));
|
||||
rm(extractPath);
|
||||
console.log(chalk.greenBright`[+] Cleaned up extracted files`);
|
||||
console.log(chalk.greenBright('[+] Cleaned up extracted files'));
|
||||
}
|
||||
|
||||
const removeBackup = await prompt("Do you want to remove the backup file? (y/n): ");
|
||||
if (removeBackup.toLowerCase() === "y" || removeBackup.toLowerCase() === "yes") {
|
||||
fs.rmSync(backupPath, { force: true });
|
||||
console.log(chalk.greenBright`[+] Backup file removed`);
|
||||
console.log(chalk.greenBright('[+] Backup file removed'));
|
||||
}
|
||||
|
||||
console.log(chalk.greenBright`[+] Successfully unpatched!`);
|
||||
console.log(chalk.greenBright('[+] Successfully unpatched!'));
|
||||
}
|
||||
|
||||
// Main patching function
|
||||
async function patchApp() {
|
||||
console.log(chalk.blueBright`[+] HTTP Toolkit Patcher Started`);
|
||||
console.log(chalk.blueBright('[+] HTTP Toolkit Patcher Started'));
|
||||
|
||||
const appPath = await findAppPath();
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit found at ${appPath}`);
|
||||
console.log(chalk.greenBright(`[+] HTTP Toolkit found at ${appPath}`));
|
||||
|
||||
await killHttpToolkit();
|
||||
|
||||
@@ -501,63 +520,63 @@ async function patchApp() {
|
||||
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
||||
|
||||
if (!hasPermissions) {
|
||||
console.log(chalk.yellowBright`[!] No write permissions for ${appPath}`);
|
||||
console.log(chalk.yellowBright(`[!] No write permissions for ${appPath}`));
|
||||
|
||||
if (isElevated()) {
|
||||
console.error(chalk.redBright`[-] Still no permissions even with elevated privileges`);
|
||||
console.error(chalk.redBright('[-] Still no permissions even with elevated privileges'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[!] Administrator/sudo privileges required for patching`);
|
||||
console.log(chalk.yellowBright('[!] Administrator/sudo privileges required for patching'));
|
||||
await requestElevation();
|
||||
}
|
||||
|
||||
const backupPath = path.join(appPath, "app.asar.bak");
|
||||
if (!fs.existsSync(backupPath)) {
|
||||
console.log(chalk.yellowBright`[+] Creating backup...`);
|
||||
console.log(chalk.yellowBright('[+] Creating backup...'));
|
||||
fs.copyFileSync(asarPath, backupPath);
|
||||
console.log(chalk.greenBright`[+] Backup created at ${backupPath}`);
|
||||
console.log(chalk.greenBright(`[+] Backup created at ${backupPath}`));
|
||||
}
|
||||
|
||||
const extractPath = path.join(appPath, "app.asar_extracted");
|
||||
console.log(chalk.yellowBright`[+] Extracting app.asar...`);
|
||||
console.log(chalk.yellowBright('[+] Extracting app.asar...'));
|
||||
rm(extractPath);
|
||||
asar.extractAll(asarPath, extractPath);
|
||||
console.log(chalk.greenBright`[+] Extracted to ${extractPath}`);
|
||||
console.log(chalk.greenBright(`[+] Extracted to ${extractPath}`));
|
||||
|
||||
const preloadPath = path.join(extractPath, "build", "preload.cjs");
|
||||
if (!fs.existsSync(preloadPath)) {
|
||||
console.error(chalk.redBright`[-] preload.cjs not found in ${path.join(extractPath, "build")}`);
|
||||
console.error(chalk.yellowBright`[!] Please download the latest version of HTTP Toolkit from https://httptoolkit.com/`);
|
||||
console.error(chalk.redBright(`[-] preload.cjs not found in ${path.join(extractPath, "build")}`));
|
||||
console.error(chalk.yellowBright('[!] Please download the latest version of HTTP Toolkit from https://httptoolkit.com/'));
|
||||
rm(extractPath);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(chalk.greenBright`[+] Found preload.cjs`);
|
||||
console.log(chalk.greenBright('[+] Found preload.cjs'));
|
||||
|
||||
console.log(chalk.yellowBright`[+] Reading inject code from local file...`);
|
||||
console.log(chalk.yellowBright('[+] Reading inject code from local file...'));
|
||||
const injectJsPath = path.join(path.dirname(__filename), "inject.js");
|
||||
if (!fs.existsSync(injectJsPath)) {
|
||||
console.error(chalk.redBright`[-] inject.js not found at ${injectJsPath}`);
|
||||
console.error(chalk.redBright(`[-] inject.js not found at ${injectJsPath}`));
|
||||
rm(extractPath);
|
||||
process.exit(1);
|
||||
}
|
||||
const injectCode = fs.readFileSync(injectJsPath, "utf-8");
|
||||
if (!injectCode || !injectCode.includes("PAGE-INJECT")) {
|
||||
console.error(chalk.redBright`[-] Invalid inject.js file`);
|
||||
console.error(chalk.redBright('[-] Invalid inject.js file'));
|
||||
rm(extractPath);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(chalk.greenBright`[+] Inject code loaded successfully`);
|
||||
console.log(chalk.greenBright('[+] Inject code loaded successfully'));
|
||||
|
||||
let preloadContent = fs.readFileSync(preloadPath, "utf-8");
|
||||
|
||||
const electronVarName = preloadContent.includes("electron_1") ? "electron_1" : "electron";
|
||||
console.log(chalk.greenBright`[+] Detected electron variable: ${electronVarName}`);
|
||||
console.log(chalk.greenBright(`[+] Detected electron variable: ${electronVarName}`));
|
||||
|
||||
const preloadPatchCode = `
|
||||
(function loadInjectScript() {
|
||||
const injectCode = ${JSON.stringify(injectCode)};
|
||||
|
||||
|
||||
function injectViaWebFrame() {
|
||||
try {
|
||||
const { webFrame } = ${electronVarName};
|
||||
@@ -570,14 +589,14 @@ async function patchApp() {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!injectViaWebFrame()) {
|
||||
const tryInject = () => {
|
||||
if (!injectViaWebFrame()) {
|
||||
console.error("[PRELOAD] All injection methods failed");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
||||
tryInject();
|
||||
} else {
|
||||
@@ -589,24 +608,24 @@ async function patchApp() {
|
||||
const isPreloadPatched = preloadContent.includes("loadInjectScript");
|
||||
|
||||
if (isPreloadPatched) {
|
||||
console.log(chalk.yellowBright`[!] Files already patched`);
|
||||
console.log(chalk.yellowBright('[!] Files already patched'));
|
||||
const answer = await prompt("Do you want to repatch? (y/n): ");
|
||||
|
||||
if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
|
||||
console.log(chalk.blueBright`[+] Patching cancelled`);
|
||||
console.log(chalk.blueBright('[+] Patching cancelled'));
|
||||
rm(extractPath);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Remove existing patches
|
||||
console.log(chalk.yellowBright`[+] Replacing existing patches...`);
|
||||
console.log(chalk.yellowBright('[+] Replacing existing patches...'));
|
||||
|
||||
// Remove preload patch
|
||||
const preloadPatchRegex = /\n?\(function loadInjectScript\(\) \{[\s\S]*?\}\)\(\);/;
|
||||
preloadContent = preloadContent.replace(preloadPatchRegex, "");
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[+] Applying preload patch...`);
|
||||
console.log(chalk.yellowBright('[+] Applying preload patch...'));
|
||||
const preloadLines = preloadContent.split("\n");
|
||||
let preloadInsertIndex = -1;
|
||||
|
||||
@@ -619,7 +638,7 @@ async function patchApp() {
|
||||
}
|
||||
|
||||
if (preloadInsertIndex === -1) {
|
||||
console.error(chalk.redBright`[-] Could not find insertion point (electron import) in ${path.basename(preloadPath)}`);
|
||||
console.error(chalk.redBright(`[-] Could not find insertion point (electron import) in ${path.basename(preloadPath)}`));
|
||||
rm(extractPath);
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -629,49 +648,54 @@ async function patchApp() {
|
||||
|
||||
// Write patched preload file
|
||||
fs.writeFileSync(preloadPath, preloadContent, "utf-8");
|
||||
console.log(chalk.greenBright`[+] ${path.basename(preloadPath)} patched successfully`);
|
||||
console.log(chalk.greenBright(`[+] ${path.basename(preloadPath)} patched successfully`));
|
||||
|
||||
console.log(chalk.yellowBright`[+] Repackaging app.asar...`);
|
||||
console.log(chalk.yellowBright('[+] Repackaging app.asar...'));
|
||||
await asar.createPackage(extractPath, asarPath);
|
||||
console.log(chalk.greenBright`[+] app.asar repackaged successfully`);
|
||||
console.log(chalk.greenBright('[+] app.asar repackaged successfully'));
|
||||
|
||||
let executablePath;
|
||||
try {
|
||||
executablePath = getExecutablePath(appPath);
|
||||
} catch (e) {
|
||||
rm(extractPath);
|
||||
console.error(chalk.redBright`[-] ${e.message}`);
|
||||
console.error(chalk.redBright(`[-] ${e.message}`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[+] Launching HTTP Toolkit to read integrity hashes...`);
|
||||
console.log(chalk.yellowBright('[+] Launching HTTP Toolkit to read integrity hashes...'));
|
||||
let hashes;
|
||||
try {
|
||||
hashes = await captureIntegrityHashes(executablePath);
|
||||
} catch (e) {
|
||||
rm(extractPath);
|
||||
console.error(chalk.redBright`[-] Failed to capture integrity hashes: ${e.message}`);
|
||||
console.error(chalk.redBright(`[-] Failed to capture integrity hashes: ${e.message}`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.greenBright`[+] Integrity hashes captured`);
|
||||
console.log(chalk.white` Original hash: ${hashes.originalHash}`);
|
||||
console.log(chalk.white` New asar hash: ${hashes.newHash}`);
|
||||
console.log(chalk.greenBright('[+] Integrity hashes captured'));
|
||||
console.log(chalk.white(` Original hash: ${hashes.originalHash}`));
|
||||
console.log(chalk.white(` New asar hash: ${hashes.newHash}`));
|
||||
|
||||
try {
|
||||
const replacements = patchExecutableHash(executablePath, hashes.originalHash, hashes.newHash);
|
||||
console.log(chalk.greenBright`[+] Patched binary hash (${replacements} replacement${replacements === 1 ? "" : "s"})`);
|
||||
if (isMac) {
|
||||
patchInfoPlistHash(appPath, hashes.originalHash, hashes.newHash);
|
||||
console.log(chalk.greenBright('[+] Patched Info.plist hash'));
|
||||
} else {
|
||||
const replacements = patchExecutableHash(executablePath, hashes.originalHash, hashes.newHash);
|
||||
console.log(chalk.greenBright(`[+] Patched binary hash (${replacements} replacement${replacements === 1 ? "" : "s"})`));
|
||||
}
|
||||
} catch (e) {
|
||||
rm(extractPath);
|
||||
console.error(chalk.redBright`[-] Failed to patch binary hash: ${e.message}`);
|
||||
console.error(chalk.redBright(`[-] Failed to patch hash: ${e.message}`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright`[+] Cleaning up temporary files...`);
|
||||
console.log(chalk.yellowBright('[+] Cleaning up temporary files...'));
|
||||
rm(extractPath);
|
||||
console.log(chalk.greenBright`[+] Successfully patched!`);
|
||||
console.log(chalk.greenBright('[+] Successfully patched!'));
|
||||
|
||||
console.log(chalk.blueBright`[+] Opening HTTP Toolkit...`);
|
||||
console.log(chalk.blueBright('[+] Opening HTTP Toolkit...'));
|
||||
try {
|
||||
const child = spawn(executablePath, {
|
||||
stdio: "ignore",
|
||||
@@ -679,10 +703,10 @@ async function patchApp() {
|
||||
detached: true,
|
||||
});
|
||||
child.unref();
|
||||
console.log(chalk.greenBright`[+] HTTP Toolkit launched successfully`);
|
||||
console.log(chalk.greenBright('[+] HTTP Toolkit launched successfully'));
|
||||
} catch (e) {
|
||||
console.error(chalk.yellowBright`[!] Could not auto-start HTTP Toolkit: ${e.message}`);
|
||||
console.log(chalk.blueBright`[+] Please start HTTP Toolkit manually`);
|
||||
console.error(chalk.yellowBright(`[!] Could not auto-start HTTP Toolkit: ${e.message}`));
|
||||
console.log(chalk.blueBright('[+] Please start HTTP Toolkit manually'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,34 +727,34 @@ const commandName = (() => {
|
||||
try {
|
||||
// Check for updates from GitHub
|
||||
await checkForUpdates();
|
||||
|
||||
|
||||
if (command === "unpatch" || command === "restore") {
|
||||
await unpatchApp();
|
||||
} else if (command === "help" || command === "-h" || command === "--help") {
|
||||
console.log(chalk.blueBright`HTTP Toolkit Patcher`);
|
||||
console.log(chalk.white`\nUsage:`);
|
||||
console.log(chalk.white` ${commandName} [command]`);
|
||||
console.log(chalk.white`\nCommands:`);
|
||||
console.log(chalk.white` patch ${chalk.gray`- Patch HTTP Toolkit (default)`}`);
|
||||
console.log(chalk.white` unpatch ${chalk.gray`- Restore original HTTP Toolkit from backup`}`);
|
||||
console.log(chalk.white` restore ${chalk.gray`- Alias for unpatch`}`);
|
||||
console.log(chalk.white` help ${chalk.gray`- Show this help message`}`);
|
||||
console.log(chalk.blueBright('HTTP Toolkit Patcher'));
|
||||
console.log(chalk.white('\nUsage:'));
|
||||
console.log(chalk.white(` ${commandName} [command]`));
|
||||
console.log(chalk.white('\nCommands:'));
|
||||
console.log(chalk.white(` patch ${chalk.gray('- Patch HTTP Toolkit (default)')}`));
|
||||
console.log(chalk.white(` unpatch ${chalk.gray('- Restore original HTTP Toolkit from backup')}`));
|
||||
console.log(chalk.white(` restore ${chalk.gray('- Alias for unpatch')}`));
|
||||
console.log(chalk.white(` help ${chalk.gray('- Show this help message')}`));
|
||||
process.exit(0);
|
||||
} else if (!command || command === "patch") {
|
||||
// Ask for confirmation before patching
|
||||
const answer = await prompt("Do you want to patch HTTP Toolkit? [Y/n]: ");
|
||||
if (answer.toLowerCase() === "n" || answer.toLowerCase() === "no") {
|
||||
console.log(chalk.blueBright`[+] Patching cancelled`);
|
||||
console.log(chalk.blueBright('[+] Patching cancelled'));
|
||||
process.exit(0);
|
||||
}
|
||||
await patchApp();
|
||||
} else {
|
||||
console.error(chalk.redBright`[-] Unknown command: ${command}`);
|
||||
console.log(chalk.yellowBright`[!] Use 'help' to see available commands`);
|
||||
console.error(chalk.redBright(`[-] Unknown command: ${command}`));
|
||||
console.log(chalk.yellowBright('[!] Use \'help\' to see available commands'));
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(chalk.redBright`[-] Error: ${error.message}`);
|
||||
console.error(chalk.redBright(`[-] Error: ${error.message}`));
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
||||
Generated
+79
-214
@@ -1,33 +1,34 @@
|
||||
{
|
||||
"name": "httptoolkit-patcher",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "httptoolkit-patcher",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/asar": "^4.0.1",
|
||||
"chalk": "4"
|
||||
"@electron/asar": "^4.1.0",
|
||||
"chalk": "5.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"httptoolkit-patcher": "index.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.9"
|
||||
"@types/node": "^25.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/asar": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.0.1.tgz",
|
||||
"integrity": "sha512-F4Ykm1jiBGY1WV/o8Q8oFW8Nq0u+S2/vPujzNJtdSJ6C4LHC4CiGLn7c17s7SolZ23gcvCebMncmZtNc+MkxPQ==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.1.0.tgz",
|
||||
"integrity": "sha512-DflfXtTFuTYHcyupbhnCWi+hBFdhsWl878NuA1UmW7YVFlqPlY0SHdREVnigEO3zjS2vh4hp1A4dEl3I6mgd9w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^13.1.0",
|
||||
"glob": "^11.0.1",
|
||||
"minimatch": "^10.0.1"
|
||||
"glob": "^13.0.2",
|
||||
"minimatch": "^10.0.1",
|
||||
"plist": "^3.1.0"
|
||||
},
|
||||
"bin": {
|
||||
"asar": "bin/asar.mjs"
|
||||
@@ -36,95 +37,78 @@
|
||||
"node": ">=22.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
|
||||
"integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.23",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz",
|
||||
"integrity": "sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==",
|
||||
"version": "25.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
"undici-types": "~7.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"node_modules/@xmldom/xmldom": {
|
||||
"version": "0.8.11",
|
||||
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
|
||||
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz",
|
||||
"integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==",
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
||||
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
"node": "18 || 20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
|
||||
"integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
|
||||
"integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
"node": "18 || 20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"version": "5.6.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
|
||||
"integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "13.1.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
|
||||
@@ -134,94 +118,27 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/foreground-child": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
|
||||
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.6",
|
||||
"signal-exit": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",
|
||||
"integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==",
|
||||
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
|
||||
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.3.1",
|
||||
"jackspeak": "^4.1.1",
|
||||
"minimatch": "^10.1.1",
|
||||
"minipass": "^7.1.2",
|
||||
"package-json-from-dist": "^1.0.0",
|
||||
"path-scurry": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/esm/bin.mjs"
|
||||
"minimatch": "^10.2.2",
|
||||
"minipass": "^7.1.3",
|
||||
"path-scurry": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jackspeak": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
|
||||
"integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "11.2.6",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz",
|
||||
"integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==",
|
||||
"version": "11.2.7",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz",
|
||||
"integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
@@ -251,21 +168,6 @@
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/package-json-from-dist": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
|
||||
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
||||
"license": "BlueOak-1.0.0"
|
||||
},
|
||||
"node_modules/path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
||||
@@ -282,71 +184,34 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"node_modules/plist": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
|
||||
"integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
"@xmldom/xmldom": "^0.8.8",
|
||||
"base64-js": "^1.5.1",
|
||||
"xmlbuilder": "^15.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=10.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"node-which": "bin/node-which"
|
||||
},
|
||||
"node_modules/xmlbuilder": {
|
||||
"version": "15.1.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
|
||||
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
"node": ">=8.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/asar": "^4.0.1",
|
||||
"chalk": "4"
|
||||
"@electron/asar": "^4.1.0",
|
||||
"chalk": "5.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.14.9"
|
||||
"@types/node": "^25.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user