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
|
// @ts-check
|
||||||
import { spawn, execSync } from "child_process";
|
import { spawn, execSync } from "child_process";
|
||||||
import asar from "@electron/asar";
|
import * as asar from "@electron/asar";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
@@ -126,10 +126,10 @@ async function checkForUpdates() {
|
|||||||
const latestVersion = latestTag.replace(/^v/, "");
|
const latestVersion = latestTag.replace(/^v/, "");
|
||||||
|
|
||||||
if (compareVersions(latestVersion, LOCAL_VERSION) > 0) {
|
if (compareVersions(latestVersion, LOCAL_VERSION) > 0) {
|
||||||
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(' 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('║') + chalk.white(' Update: ') + chalk.cyanBright(`https://github.com/${GITHUB_REPO}`) + chalk.white(' ') + chalk.yellowBright('║'));
|
||||||
console.log(chalk.yellowBright`╚════════════════════════════════════════════════════════════╝\n`);
|
console.log(chalk.yellowBright('╚════════════════════════════════════════════════════════════╝\n'));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Silently ignore update check errors (network issues, etc.)
|
// 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: ");
|
const userPath = await prompt("Please enter the path to HTTP Toolkit executable/app: ");
|
||||||
|
|
||||||
if (!userPath) {
|
if (!userPath) {
|
||||||
console.error(chalk.redBright`[-] No path provided`);
|
console.error(chalk.redBright('[-] No path provided'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ async function findAppPath() {
|
|||||||
if (!resourcesPath.endsWith("resources")) resourcesPath = path.join(resourcesPath, "resources");
|
if (!resourcesPath.endsWith("resources")) resourcesPath = path.join(resourcesPath, "resources");
|
||||||
|
|
||||||
if (!fs.existsSync(path.join(resourcesPath, "app.asar"))) {
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ async function findAppPath() {
|
|||||||
|
|
||||||
// Request elevated permissions
|
// Request elevated permissions
|
||||||
async function requestElevation() {
|
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
|
// @ts-ignore - pkg adds this property at runtime
|
||||||
const isBundled = process.pkg;
|
const isBundled = process.pkg;
|
||||||
@@ -201,28 +201,28 @@ async function requestElevation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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" });
|
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);
|
process.exit(0);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(chalk.redBright`[-] Failed to elevate permissions: ${e.message}`);
|
console.error(chalk.redBright(`[-] Failed to elevate permissions: ${e.message}`));
|
||||||
console.error(chalk.redBright`[-] Please run as administrator manually`);
|
console.error(chalk.redBright('[-] Please run as administrator manually'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else if (isLinux) {
|
} else if (isLinux) {
|
||||||
// Linux: Cannot auto-elevate with sudo, show instructions instead
|
// 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('[!] Elevated permissions are required for patching on Linux'));
|
||||||
console.log(chalk.yellowBright`[!] Please re-run this script with sudo:`);
|
console.log(chalk.yellowBright('[!] Please re-run this script with sudo:'));
|
||||||
if (isBundled) {
|
if (isBundled) {
|
||||||
console.log(chalk.blueBright` sudo ${__filename}`);
|
console.log(chalk.blueBright(` sudo ${__filename}`));
|
||||||
} else {
|
} else {
|
||||||
console.log(chalk.blueBright` sudo node ${__filename}`);
|
console.log(chalk.blueBright(` sudo node ${__filename}`));
|
||||||
}
|
}
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else {
|
||||||
// macOS: Try to elevate with sudo
|
// macOS: Try to elevate with sudo
|
||||||
console.log(chalk.blueBright`[+] Restarting with sudo...`);
|
console.log(chalk.blueBright('[+] Restarting with sudo...'));
|
||||||
try {
|
try {
|
||||||
let child;
|
let child;
|
||||||
if (isBundled) {
|
if (isBundled) {
|
||||||
@@ -236,8 +236,8 @@ async function requestElevation() {
|
|||||||
}
|
}
|
||||||
child.on("exit", code => process.exit(code || 0));
|
child.on("exit", code => process.exit(code || 0));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(chalk.redBright`[-] Failed to elevate permissions: ${e.message}`);
|
console.error(chalk.redBright(`[-] Failed to elevate permissions: ${e.message}`));
|
||||||
console.error(chalk.redBright`[-] Please run with sudo manually`);
|
console.error(chalk.redBright('[-] Please run with sudo manually'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -255,61 +255,61 @@ function checkPermissions(filePath) {
|
|||||||
fs.mkdirSync(testDirPath, { recursive: true });
|
fs.mkdirSync(testDirPath, { recursive: true });
|
||||||
fs.rmdirSync(testDirPath);
|
fs.rmdirSync(testDirPath);
|
||||||
} catch (dirError) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chalk.greenBright`[+] Permissions check passed for ${filePath}`);
|
console.log(chalk.greenBright(`[+] Permissions check passed for ${filePath}`));
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Kill HTTP Toolkit processes
|
// Kill HTTP Toolkit processes
|
||||||
async function killHttpToolkit() {
|
async function killHttpToolkit() {
|
||||||
console.log(chalk.yellowBright`[+] Checking for running HTTP Toolkit processes...`);
|
console.log(chalk.yellowBright('[+] Checking for running HTTP Toolkit processes...'));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (isWin) {
|
if (isWin) {
|
||||||
// Windows: Use tasklist to find and taskkill to terminate
|
// 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" });
|
const output = execSync('tasklist /FI "IMAGENAME eq HTTP Toolkit.exe" /FO CSV /NH', { encoding: "utf-8" });
|
||||||
if (output.includes("HTTP Toolkit.exe")) {
|
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" });
|
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
|
// Wait a moment for the process to fully close
|
||||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||||
} else {
|
} else {
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||||
}
|
}
|
||||||
} else if (isMac) {
|
} else if (isMac) {
|
||||||
// macOS: Use pgrep and pkill
|
// macOS: Use pgrep and pkill
|
||||||
try {
|
try {
|
||||||
execSync('pgrep -f "HTTP Toolkit"', { stdio: "ignore" });
|
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" });
|
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));
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Linux: Use pgrep and pkill
|
// Linux: Use pgrep and pkill
|
||||||
try {
|
try {
|
||||||
execSync('pgrep -f "HTTP Toolkit"', { stdio: "ignore" });
|
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" });
|
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));
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit is not running`);
|
console.log(chalk.greenBright('[+] HTTP Toolkit is not running'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(chalk.yellowBright`[!] Could not check/kill processes: ${e.message}`);
|
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('[!] If HTTP Toolkit is running, please close it manually'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,12 +428,31 @@ function patchExecutableHash(executablePath, originalHash, newHash) {
|
|||||||
return occurrences;
|
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
|
// Unpatch/restore function
|
||||||
async function unpatchApp() {
|
async function unpatchApp() {
|
||||||
console.log(chalk.blueBright`[+] HTTP Toolkit Unpatcher Started`);
|
console.log(chalk.blueBright('[+] HTTP Toolkit Unpatcher Started'));
|
||||||
|
|
||||||
const appPath = await findAppPath();
|
const appPath = await findAppPath();
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit found at ${appPath}`);
|
console.log(chalk.greenBright(`[+] HTTP Toolkit found at ${appPath}`));
|
||||||
|
|
||||||
await killHttpToolkit();
|
await killHttpToolkit();
|
||||||
|
|
||||||
@@ -445,53 +464,53 @@ async function unpatchApp() {
|
|||||||
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
||||||
|
|
||||||
if (!hasPermissions) {
|
if (!hasPermissions) {
|
||||||
console.log(chalk.yellowBright`[!] No write permissions for ${appPath}`);
|
console.log(chalk.yellowBright(`[!] No write permissions for ${appPath}`));
|
||||||
|
|
||||||
if (isElevated()) {
|
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);
|
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();
|
await requestElevation();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(backupPath)) {
|
if (!fs.existsSync(backupPath)) {
|
||||||
console.error(chalk.redBright`[-] Backup file not found at ${backupPath}`);
|
console.error(chalk.redBright(`[-] Backup file not found at ${backupPath}`));
|
||||||
console.error(chalk.redBright`[-] Cannot unpatch without backup file`);
|
console.error(chalk.redBright('[-] Cannot unpatch without backup file'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chalk.yellowBright`[+] Restoring from backup...`);
|
console.log(chalk.yellowBright('[+] Restoring from backup...'));
|
||||||
try {
|
try {
|
||||||
fs.copyFileSync(backupPath, asarPath);
|
fs.copyFileSync(backupPath, asarPath);
|
||||||
console.log(chalk.greenBright`[+] Restored app.asar from backup`);
|
console.log(chalk.greenBright('[+] Restored app.asar from backup'));
|
||||||
} catch (e) {
|
} 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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs.existsSync(extractPath)) {
|
if (fs.existsSync(extractPath)) {
|
||||||
console.log(chalk.yellowBright`[+] Removing extracted files...`);
|
console.log(chalk.yellowBright('[+] Removing extracted files...'));
|
||||||
rm(extractPath);
|
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): ");
|
const removeBackup = await prompt("Do you want to remove the backup file? (y/n): ");
|
||||||
if (removeBackup.toLowerCase() === "y" || removeBackup.toLowerCase() === "yes") {
|
if (removeBackup.toLowerCase() === "y" || removeBackup.toLowerCase() === "yes") {
|
||||||
fs.rmSync(backupPath, { force: true });
|
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
|
// Main patching function
|
||||||
async function patchApp() {
|
async function patchApp() {
|
||||||
console.log(chalk.blueBright`[+] HTTP Toolkit Patcher Started`);
|
console.log(chalk.blueBright('[+] HTTP Toolkit Patcher Started'));
|
||||||
|
|
||||||
const appPath = await findAppPath();
|
const appPath = await findAppPath();
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit found at ${appPath}`);
|
console.log(chalk.greenBright(`[+] HTTP Toolkit found at ${appPath}`));
|
||||||
|
|
||||||
await killHttpToolkit();
|
await killHttpToolkit();
|
||||||
|
|
||||||
@@ -501,63 +520,63 @@ async function patchApp() {
|
|||||||
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
const hasPermissions = checkPermissions(appPath) && checkPermissions(asarPath);
|
||||||
|
|
||||||
if (!hasPermissions) {
|
if (!hasPermissions) {
|
||||||
console.log(chalk.yellowBright`[!] No write permissions for ${appPath}`);
|
console.log(chalk.yellowBright(`[!] No write permissions for ${appPath}`));
|
||||||
|
|
||||||
if (isElevated()) {
|
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);
|
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();
|
await requestElevation();
|
||||||
}
|
}
|
||||||
|
|
||||||
const backupPath = path.join(appPath, "app.asar.bak");
|
const backupPath = path.join(appPath, "app.asar.bak");
|
||||||
if (!fs.existsSync(backupPath)) {
|
if (!fs.existsSync(backupPath)) {
|
||||||
console.log(chalk.yellowBright`[+] Creating backup...`);
|
console.log(chalk.yellowBright('[+] Creating backup...'));
|
||||||
fs.copyFileSync(asarPath, backupPath);
|
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");
|
const extractPath = path.join(appPath, "app.asar_extracted");
|
||||||
console.log(chalk.yellowBright`[+] Extracting app.asar...`);
|
console.log(chalk.yellowBright('[+] Extracting app.asar...'));
|
||||||
rm(extractPath);
|
rm(extractPath);
|
||||||
asar.extractAll(asarPath, 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");
|
const preloadPath = path.join(extractPath, "build", "preload.cjs");
|
||||||
if (!fs.existsSync(preloadPath)) {
|
if (!fs.existsSync(preloadPath)) {
|
||||||
console.error(chalk.redBright`[-] preload.cjs not found in ${path.join(extractPath, "build")}`);
|
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.yellowBright('[!] Please download the latest version of HTTP Toolkit from https://httptoolkit.com/'));
|
||||||
rm(extractPath);
|
rm(extractPath);
|
||||||
process.exit(1);
|
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");
|
const injectJsPath = path.join(path.dirname(__filename), "inject.js");
|
||||||
if (!fs.existsSync(injectJsPath)) {
|
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);
|
rm(extractPath);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
const injectCode = fs.readFileSync(injectJsPath, "utf-8");
|
const injectCode = fs.readFileSync(injectJsPath, "utf-8");
|
||||||
if (!injectCode || !injectCode.includes("PAGE-INJECT")) {
|
if (!injectCode || !injectCode.includes("PAGE-INJECT")) {
|
||||||
console.error(chalk.redBright`[-] Invalid inject.js file`);
|
console.error(chalk.redBright('[-] Invalid inject.js file'));
|
||||||
rm(extractPath);
|
rm(extractPath);
|
||||||
process.exit(1);
|
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");
|
let preloadContent = fs.readFileSync(preloadPath, "utf-8");
|
||||||
|
|
||||||
const electronVarName = preloadContent.includes("electron_1") ? "electron_1" : "electron";
|
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 = `
|
const preloadPatchCode = `
|
||||||
(function loadInjectScript() {
|
(function loadInjectScript() {
|
||||||
const injectCode = ${JSON.stringify(injectCode)};
|
const injectCode = ${JSON.stringify(injectCode)};
|
||||||
|
|
||||||
function injectViaWebFrame() {
|
function injectViaWebFrame() {
|
||||||
try {
|
try {
|
||||||
const { webFrame } = ${electronVarName};
|
const { webFrame } = ${electronVarName};
|
||||||
@@ -570,14 +589,14 @@ async function patchApp() {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!injectViaWebFrame()) {
|
if (!injectViaWebFrame()) {
|
||||||
const tryInject = () => {
|
const tryInject = () => {
|
||||||
if (!injectViaWebFrame()) {
|
if (!injectViaWebFrame()) {
|
||||||
console.error("[PRELOAD] All injection methods failed");
|
console.error("[PRELOAD] All injection methods failed");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
||||||
tryInject();
|
tryInject();
|
||||||
} else {
|
} else {
|
||||||
@@ -589,24 +608,24 @@ async function patchApp() {
|
|||||||
const isPreloadPatched = preloadContent.includes("loadInjectScript");
|
const isPreloadPatched = preloadContent.includes("loadInjectScript");
|
||||||
|
|
||||||
if (isPreloadPatched) {
|
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): ");
|
const answer = await prompt("Do you want to repatch? (y/n): ");
|
||||||
|
|
||||||
if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
|
if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
|
||||||
console.log(chalk.blueBright`[+] Patching cancelled`);
|
console.log(chalk.blueBright('[+] Patching cancelled'));
|
||||||
rm(extractPath);
|
rm(extractPath);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove existing patches
|
// Remove existing patches
|
||||||
console.log(chalk.yellowBright`[+] Replacing existing patches...`);
|
console.log(chalk.yellowBright('[+] Replacing existing patches...'));
|
||||||
|
|
||||||
// Remove preload patch
|
// Remove preload patch
|
||||||
const preloadPatchRegex = /\n?\(function loadInjectScript\(\) \{[\s\S]*?\}\)\(\);/;
|
const preloadPatchRegex = /\n?\(function loadInjectScript\(\) \{[\s\S]*?\}\)\(\);/;
|
||||||
preloadContent = preloadContent.replace(preloadPatchRegex, "");
|
preloadContent = preloadContent.replace(preloadPatchRegex, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chalk.yellowBright`[+] Applying preload patch...`);
|
console.log(chalk.yellowBright('[+] Applying preload patch...'));
|
||||||
const preloadLines = preloadContent.split("\n");
|
const preloadLines = preloadContent.split("\n");
|
||||||
let preloadInsertIndex = -1;
|
let preloadInsertIndex = -1;
|
||||||
|
|
||||||
@@ -619,7 +638,7 @@ async function patchApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (preloadInsertIndex === -1) {
|
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);
|
rm(extractPath);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
@@ -629,49 +648,54 @@ async function patchApp() {
|
|||||||
|
|
||||||
// Write patched preload file
|
// Write patched preload file
|
||||||
fs.writeFileSync(preloadPath, preloadContent, "utf-8");
|
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);
|
await asar.createPackage(extractPath, asarPath);
|
||||||
console.log(chalk.greenBright`[+] app.asar repackaged successfully`);
|
console.log(chalk.greenBright('[+] app.asar repackaged successfully'));
|
||||||
|
|
||||||
let executablePath;
|
let executablePath;
|
||||||
try {
|
try {
|
||||||
executablePath = getExecutablePath(appPath);
|
executablePath = getExecutablePath(appPath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rm(extractPath);
|
rm(extractPath);
|
||||||
console.error(chalk.redBright`[-] ${e.message}`);
|
console.error(chalk.redBright(`[-] ${e.message}`));
|
||||||
process.exit(1);
|
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;
|
let hashes;
|
||||||
try {
|
try {
|
||||||
hashes = await captureIntegrityHashes(executablePath);
|
hashes = await captureIntegrityHashes(executablePath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rm(extractPath);
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chalk.greenBright`[+] Integrity hashes captured`);
|
console.log(chalk.greenBright('[+] Integrity hashes captured'));
|
||||||
console.log(chalk.white` Original hash: ${hashes.originalHash}`);
|
console.log(chalk.white(` Original hash: ${hashes.originalHash}`));
|
||||||
console.log(chalk.white` New asar hash: ${hashes.newHash}`);
|
console.log(chalk.white(` New asar hash: ${hashes.newHash}`));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const replacements = patchExecutableHash(executablePath, hashes.originalHash, hashes.newHash);
|
if (isMac) {
|
||||||
console.log(chalk.greenBright`[+] Patched binary hash (${replacements} replacement${replacements === 1 ? "" : "s"})`);
|
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) {
|
} catch (e) {
|
||||||
rm(extractPath);
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chalk.yellowBright`[+] Cleaning up temporary files...`);
|
console.log(chalk.yellowBright('[+] Cleaning up temporary files...'));
|
||||||
rm(extractPath);
|
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 {
|
try {
|
||||||
const child = spawn(executablePath, {
|
const child = spawn(executablePath, {
|
||||||
stdio: "ignore",
|
stdio: "ignore",
|
||||||
@@ -679,10 +703,10 @@ async function patchApp() {
|
|||||||
detached: true,
|
detached: true,
|
||||||
});
|
});
|
||||||
child.unref();
|
child.unref();
|
||||||
console.log(chalk.greenBright`[+] HTTP Toolkit launched successfully`);
|
console.log(chalk.greenBright('[+] HTTP Toolkit launched successfully'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(chalk.yellowBright`[!] Could not auto-start HTTP Toolkit: ${e.message}`);
|
console.error(chalk.yellowBright(`[!] Could not auto-start HTTP Toolkit: ${e.message}`));
|
||||||
console.log(chalk.blueBright`[+] Please start HTTP Toolkit manually`);
|
console.log(chalk.blueBright('[+] Please start HTTP Toolkit manually'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,34 +727,34 @@ const commandName = (() => {
|
|||||||
try {
|
try {
|
||||||
// Check for updates from GitHub
|
// Check for updates from GitHub
|
||||||
await checkForUpdates();
|
await checkForUpdates();
|
||||||
|
|
||||||
if (command === "unpatch" || command === "restore") {
|
if (command === "unpatch" || command === "restore") {
|
||||||
await unpatchApp();
|
await unpatchApp();
|
||||||
} else if (command === "help" || command === "-h" || command === "--help") {
|
} else if (command === "help" || command === "-h" || command === "--help") {
|
||||||
console.log(chalk.blueBright`HTTP Toolkit Patcher`);
|
console.log(chalk.blueBright('HTTP Toolkit Patcher'));
|
||||||
console.log(chalk.white`\nUsage:`);
|
console.log(chalk.white('\nUsage:'));
|
||||||
console.log(chalk.white` ${commandName} [command]`);
|
console.log(chalk.white(` ${commandName} [command]`));
|
||||||
console.log(chalk.white`\nCommands:`);
|
console.log(chalk.white('\nCommands:'));
|
||||||
console.log(chalk.white` patch ${chalk.gray`- Patch HTTP Toolkit (default)`}`);
|
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(` unpatch ${chalk.gray('- Restore original HTTP Toolkit from backup')}`));
|
||||||
console.log(chalk.white` restore ${chalk.gray`- Alias for unpatch`}`);
|
console.log(chalk.white(` restore ${chalk.gray('- Alias for unpatch')}`));
|
||||||
console.log(chalk.white` help ${chalk.gray`- Show this help message`}`);
|
console.log(chalk.white(` help ${chalk.gray('- Show this help message')}`));
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
} else if (!command || command === "patch") {
|
} else if (!command || command === "patch") {
|
||||||
// Ask for confirmation before patching
|
// Ask for confirmation before patching
|
||||||
const answer = await prompt("Do you want to patch HTTP Toolkit? [Y/n]: ");
|
const answer = await prompt("Do you want to patch HTTP Toolkit? [Y/n]: ");
|
||||||
if (answer.toLowerCase() === "n" || answer.toLowerCase() === "no") {
|
if (answer.toLowerCase() === "n" || answer.toLowerCase() === "no") {
|
||||||
console.log(chalk.blueBright`[+] Patching cancelled`);
|
console.log(chalk.blueBright('[+] Patching cancelled'));
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
await patchApp();
|
await patchApp();
|
||||||
} else {
|
} else {
|
||||||
console.error(chalk.redBright`[-] Unknown command: ${command}`);
|
console.error(chalk.redBright(`[-] Unknown command: ${command}`));
|
||||||
console.log(chalk.yellowBright`[!] Use 'help' to see available commands`);
|
console.log(chalk.yellowBright('[!] Use \'help\' to see available commands'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(chalk.redBright`[-] Error: ${error.message}`);
|
console.error(chalk.redBright(`[-] Error: ${error.message}`));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
Generated
+79
-214
@@ -1,33 +1,34 @@
|
|||||||
{
|
{
|
||||||
"name": "httptoolkit-patcher",
|
"name": "httptoolkit-patcher",
|
||||||
"version": "2.0.10",
|
"version": "2.0.11",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "httptoolkit-patcher",
|
"name": "httptoolkit-patcher",
|
||||||
"version": "2.0.10",
|
"version": "2.0.11",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/asar": "^4.0.1",
|
"@electron/asar": "^4.1.0",
|
||||||
"chalk": "4"
|
"chalk": "5.6.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"httptoolkit-patcher": "index.js"
|
"httptoolkit-patcher": "index.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.14.9"
|
"@types/node": "^25.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/asar": {
|
"node_modules/@electron/asar": {
|
||||||
"version": "4.0.1",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-4.1.0.tgz",
|
||||||
"integrity": "sha512-F4Ykm1jiBGY1WV/o8Q8oFW8Nq0u+S2/vPujzNJtdSJ6C4LHC4CiGLn7c17s7SolZ23gcvCebMncmZtNc+MkxPQ==",
|
"integrity": "sha512-DflfXtTFuTYHcyupbhnCWi+hBFdhsWl878NuA1UmW7YVFlqPlY0SHdREVnigEO3zjS2vh4hp1A4dEl3I6mgd9w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^13.1.0",
|
"commander": "^13.1.0",
|
||||||
"glob": "^11.0.1",
|
"glob": "^13.0.2",
|
||||||
"minimatch": "^10.0.1"
|
"minimatch": "^10.0.1",
|
||||||
|
"plist": "^3.1.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"asar": "bin/asar.mjs"
|
"asar": "bin/asar.mjs"
|
||||||
@@ -36,95 +37,78 @@
|
|||||||
"node": ">=22.12.0"
|
"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": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.19.23",
|
"version": "25.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||||
"integrity": "sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==",
|
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.21.0"
|
"undici-types": "~7.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-styles": {
|
"node_modules/@xmldom/xmldom": {
|
||||||
"version": "4.3.0",
|
"version": "0.8.11",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"color-convert": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=10.0.0"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
"version": "4.0.3",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
||||||
"integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==",
|
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"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": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "5.0.2",
|
"version": "5.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
|
||||||
"integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
|
"integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"balanced-match": "^4.0.2"
|
"balanced-match": "^4.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "18 || 20 || >=22"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chalk": {
|
"node_modules/chalk": {
|
||||||
"version": "4.1.2",
|
"version": "5.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
"integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
"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": {
|
"node_modules/commander": {
|
||||||
"version": "13.1.0",
|
"version": "13.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
|
||||||
@@ -134,94 +118,27 @@
|
|||||||
"node": ">=18"
|
"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": {
|
"node_modules/glob": {
|
||||||
"version": "11.1.0",
|
"version": "13.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
|
||||||
"integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==",
|
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
|
||||||
"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",
|
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.3.1",
|
"minimatch": "^10.2.2",
|
||||||
"jackspeak": "^4.1.1",
|
"minipass": "^7.1.3",
|
||||||
"minimatch": "^10.1.1",
|
"path-scurry": "^2.0.2"
|
||||||
"minipass": "^7.1.2",
|
|
||||||
"package-json-from-dist": "^1.0.0",
|
|
||||||
"path-scurry": "^2.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"glob": "dist/esm/bin.mjs"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "18 || 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"
|
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "11.2.6",
|
"version": "11.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz",
|
||||||
"integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==",
|
"integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20 || >=22"
|
"node": "20 || >=22"
|
||||||
@@ -251,21 +168,6 @@
|
|||||||
"node": ">=16 || 14 >=14.17"
|
"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": {
|
"node_modules/path-scurry": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
||||||
@@ -282,71 +184,34 @@
|
|||||||
"url": "https://github.com/sponsors/isaacs"
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shebang-command": {
|
"node_modules/plist": {
|
||||||
"version": "2.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
|
||||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
"integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"shebang-regex": "^3.0.0"
|
"@xmldom/xmldom": "^0.8.8",
|
||||||
|
"base64-js": "^1.5.1",
|
||||||
|
"xmlbuilder": "^15.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=10.4.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"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_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "6.21.0",
|
"version": "7.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/which": {
|
"node_modules/xmlbuilder": {
|
||||||
"version": "2.0.2",
|
"version": "15.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
|
||||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
|
||||||
"license": "ISC",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"isexe": "^2.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"node-which": "bin/node-which"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8"
|
"node": ">=8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -14,10 +14,10 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/asar": "^4.0.1",
|
"@electron/asar": "^4.1.0",
|
||||||
"chalk": "4"
|
"chalk": "5.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.14.9"
|
"@types/node": "^25.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user