mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
chore: update package version to 0.2.71 and enhance MITM tools
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user