chore: update package version to 0.2.71 and enhance MITM tools

This commit is contained in:
decolua
2026-02-09 09:58:24 +07:00
parent bd0cebcfff
commit 635d327dbc
5 changed files with 41 additions and 17 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ async function installCert(sudoPassword, certPath) {
}
async function installCertMac(sudoPassword, certPath) {
const command = `sudo -S security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${certPath}"`;
const command = `security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${certPath}"`;
try {
await execWithPassword(command, sudoPassword);
console.log(`✅ Installed certificate to system keychain: ${certPath}`);
@@ -110,7 +110,7 @@ async function uninstallCert(sudoPassword, certPath) {
async function uninstallCertMac(sudoPassword, certPath) {
const fingerprint = getCertFingerprint(certPath).replace(/:/g, "");
const command = `sudo -S security delete-certificate -Z "${fingerprint}" /Library/Keychains/System.keychain`;
const command = `security delete-certificate -Z "${fingerprint}" /Library/Keychains/System.keychain`;
try {
await execWithPassword(command, sudoPassword);
console.log("✅ Uninstalled certificate from system keychain");