mirror of
https://github.com/xenos1337/httptoolkit-patcher.git
synced 2026-07-15 16:20:02 +02:00
@@ -364,7 +364,7 @@ async function captureIntegrityHashes(executablePath) {
|
|||||||
child.kill();
|
child.kill();
|
||||||
reject(new Error("Timed out waiting for integrity check output"));
|
reject(new Error("Timed out waiting for integrity check output"));
|
||||||
}
|
}
|
||||||
}, 20000);
|
}, 30000);
|
||||||
|
|
||||||
const handleData = data => {
|
const handleData = data => {
|
||||||
output += data.toString();
|
output += data.toString();
|
||||||
@@ -663,6 +663,26 @@ async function patchApp() {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// macOS: Sign the patched app
|
||||||
|
if (isMac) {
|
||||||
|
const appBundlePath = path.resolve(appPath, '..', '..');
|
||||||
|
console.log(chalk.yellowBright('[+] Signing HTTP Toolkit with ad-hoc signature...'));
|
||||||
|
try {
|
||||||
|
execSync(`codesign --deep --force --sign - "${appBundlePath}"`, {stdio: "pipe"});
|
||||||
|
console.log(chalk.greenBright('[+] HTTP Toolkit signed successfully'));
|
||||||
|
console.log(chalk.yellowBright(` Make sure to whitelist the app in privacy and security settings!`));
|
||||||
|
} catch (e) {
|
||||||
|
rm(extractPath);
|
||||||
|
console.error(chalk.redBright(`[!] Failed to sign HTTP Toolkit: ${e.message}`));
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
execSync(`xattr -d com.apple.quarantine "${appBundlePath}" 2>/dev/null`, {stdio: 'pipe'});
|
||||||
|
} catch (e) {
|
||||||
|
console.log(chalk.redBright('[!] Failed to remove the quarantine attribute'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user