diff --git a/android-certificate-unpinning.js b/android-certificate-unpinning.js index d9947d8..eb8bc40 100644 --- a/android-certificate-unpinning.js +++ b/android-certificate-unpinning.js @@ -364,7 +364,7 @@ const getJavaClassIfExists = (clsName) => { setTimeout(function () { Java.perform(function () { - if (DEBUG_MODE) console.debug('=== Disablig all recognized unpinning libraries ==='); + if (DEBUG_MODE) console.log('\n === Disabling all recognized unpinning libraries ==='); const classesToPatch = Object.keys(PINNING_FIXES); @@ -373,7 +373,7 @@ setTimeout(function () { if (!TargetClass) { // We skip patches for any classes that don't seem to be present. This is common // as not all libraries we handle are necessarily used. - if (DEBUG_MODE) console.debug(`[ ] ${targetClassName} *`); + if (DEBUG_MODE) console.log(`[ ] ${targetClassName} *`); return; } @@ -423,7 +423,7 @@ setTimeout(function () { // happen due to methods that only appear in certain library versions or whose signatures // have changed over time. if (targetMethodImplementations.length === 0) { - if (DEBUG_MODE) console.debug(`[ ] ${targetClassName} ${methodDescription}`); + if (DEBUG_MODE) console.log(`[ ] ${targetClassName} ${methodDescription}`); return; } @@ -435,7 +435,7 @@ setTimeout(function () { try { targetMethod.implementation = replacement(targetMethod); - if (DEBUG_MODE) console.debug(`[+] ${patchName}`); + if (DEBUG_MODE) console.log(`[+] ${patchName}`); patchApplied = true; } catch (e) { // In theory, errors like this should never happen - it means the patch is broken @@ -446,7 +446,7 @@ setTimeout(function () { }); if (!patchApplied) { - console.log(`[!] Matched class ${targetClassName} but could not patch any methods`); + console.warn(`[!] Matched class ${targetClassName} but could not patch any methods`); } }); diff --git a/android-proxy-override.js b/android-proxy-override.js index 1ecb503..46627bf 100644 --- a/android-proxy-override.js +++ b/android-proxy-override.js @@ -46,14 +46,11 @@ setTimeout(() => { // Replace the 'select' of every implementation, so they all send traffic to us: proxySelectorClasses.forEach(ProxySelectorCls => { if (DEBUG_MODE) { - console.debug('Rewriting', ProxySelectorCls.toString()); + console.log('Rewriting', ProxySelectorCls.toString()); } ProxySelectorCls.select.implementation = () => getTargetProxyList() }); - console.log( - `Rewrote ${proxySelectorClasses.length} proxy selector classes ` + - `to send traffic to ${PROXY_HOST}:${PROXY_PORT}` - ); + console.log(`== Proxy configuration overridden to ${PROXY_HOST}:${PROXY_PORT} ==`); }); }); \ No newline at end of file diff --git a/android-system-certificate-injection.js b/android-system-certificate-injection.js index 4b5ed77..c372416 100644 --- a/android-system-certificate-injection.js +++ b/android-system-certificate-injection.js @@ -49,5 +49,5 @@ Java.perform(() => { // pinning too! It auto-trusts us in any implementation that uses TrustManagerImpl (Conscrypt) as // the underlying cert checking component. - console.log('System certificate trust injected'); + console.log('== System certificate trust injected =='); }); \ No newline at end of file diff --git a/config.js b/config.js index c3a8648..3619cca 100644 --- a/config.js +++ b/config.js @@ -25,4 +25,5 @@ const PROXY_HOST = '127.0.0.1'; const PROXY_PORT = 8000; // Set to enable extra logging: -const DEBUG_MODE = false; \ No newline at end of file +const DEBUG_MODE = false; +console.log(''); // Add a new line just for clean output & to separate reloads \ No newline at end of file