From c4eb3c38279daf9ab6c8958fdd63b7a4e6941f45 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Sat, 15 Feb 2025 18:35:53 +0100 Subject: [PATCH] add automation for paid4link 3rd step https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/240 --- Bypass_All_Shortlinks.meta.js | 2 +- Bypass_All_Shortlinks.user.js | 25 +++++++++++++++++-- extra_bypasses/extra_bypasses.user.js | 23 ++++++++++++++++- ...ched_Bypass_All_Shortlinks_patched.user.js | 2 +- 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index 7d334e1..9232735 100644 --- a/Bypass_All_Shortlinks.meta.js +++ b/Bypass_All_Shortlinks.meta.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 93.7.17 +// @version 93.7.18 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 4e77936..89dcaea 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 93.7.17 +// @version 93.7.18 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -2871,7 +2871,28 @@ }); } - // paid4link last step - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/222 + // go.paid4link.com 3rd step + function getURLwithSafelinkFromThePageScripts() { + const scripts = document.getElementsByTagName('script'); + for (let script of scripts) { + const content = script.innerHTML; + // we try to match any URL that contains "safelink" and is from the same domain + const matches = content.match(/(https?:\/\/[^'"]+safelink[^'"]+)/g); + if (matches) { + for (let match of matches) { + if (match.includes(window.location.hostname)) { + return match; + } + } + } + } + } + /(aduzz|tutorialsaya|indobo|baristakesehatan|merekrut).com|deltabtc.xyz|bit4me.info/.test(url) ? afterDOMLoaded(function() { + const url = getURLwithSafelinkFromThePageScripts(); + if (url) redirect(url); + }) : null; + + // go.paid4link.com last step - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/222 //const redirectIfCloudflareCaptchaSolved = (selector) => { let intervalId = setInterval(() => { let button = document.querySelector(selector); if (checkCloudflareCaptchaSolved()) { clearInterval(intervalId); redirect(button.href); } }, 1000); }; /link.paid4link.com/.test(url) ? afterDOMLoaded(function() { redirectIfExists('#get-link-button');}) : null; diff --git a/extra_bypasses/extra_bypasses.user.js b/extra_bypasses/extra_bypasses.user.js index b3ade0d..f8fd026 100644 --- a/extra_bypasses/extra_bypasses.user.js +++ b/extra_bypasses/extra_bypasses.user.js @@ -1282,7 +1282,28 @@ }); } - // paid4link last step - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/222 + // go.paid4link.com 3rd step + function getURLwithSafelinkFromThePageScripts() { + const scripts = document.getElementsByTagName('script'); + for (let script of scripts) { + const content = script.innerHTML; + // we try to match any URL that contains "safelink" and is from the same domain + const matches = content.match(/(https?:\/\/[^'"]+safelink[^'"]+)/g); + if (matches) { + for (let match of matches) { + if (match.includes(window.location.hostname)) { + return match; + } + } + } + } + } + /(aduzz|tutorialsaya|indobo|baristakesehatan|merekrut).com|deltabtc.xyz|bit4me.info/.test(url) ? afterDOMLoaded(function() { + const url = getURLwithSafelinkFromThePageScripts(); + if (url) redirect(url); + }) : null; + + // go.paid4link.com last step - https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/222 //const redirectIfCloudflareCaptchaSolved = (selector) => { let intervalId = setInterval(() => { let button = document.querySelector(selector); if (checkCloudflareCaptchaSolved()) { clearInterval(intervalId); redirect(button.href); } }, 1000); }; /link.paid4link.com/.test(url) ? afterDOMLoaded(function() { redirectIfExists('#get-link-button');}) : null; diff --git a/untouched_Bypass_All_Shortlinks_patched.user.js b/untouched_Bypass_All_Shortlinks_patched.user.js index 01755a8..1651284 100644 --- a/untouched_Bypass_All_Shortlinks_patched.user.js +++ b/untouched_Bypass_All_Shortlinks_patched.user.js @@ -37,7 +37,7 @@ // @namespace Violentmonkey Scripts // @run-at document-start // @author Bloggerpemula -// @version 93.7.17 +// @version 93.7.18 // @match *://*/* // @grant GM_setValue // @grant GM_getValue