2024-01-18 06:12:01 +05:00
import requests
def download_file ( url , destination ) :
try :
response = requests . get ( url )
response . raise_for_status ( ) # Check if the request was successful
with open ( destination , ' wb ' ) as file :
file . write ( response . content )
print ( f " OK: File downloaded successfully as { destination } " )
except requests . exceptions . RequestException as e :
print ( f " Error downloading file: { e } " )
2024-02-22 19:04:30 +05:00
def modify_file_with_my_fixes ( destination ) :
with open ( destination , ' r ' , encoding = ' utf-8 ' ) as file :
content = file . read ( )
2024-02-24 15:15:19 +05:00
# Fixes
2024-02-22 19:04:30 +05:00
content = content . replace ( " BloggerPemula( ' highkeyfinance.com ' " , " //BloggerPemula( ' highkeyfinance.com ' " )
content = content . replace ( " BypassedByBloggerPemula(/itscybertech.com " , " //BypassedByBloggerPemula(/itscybertech.com " )
content = content . replace ( " BypassedByBloggerPemula(/linkvertise.com/ " , " //BypassedByBloggerPemula(/linkvertise.com/ " )
2024-02-23 07:27:59 +05:00
content = content . replace ( " /stfly.cc|stfly.xyz|techtrendmakers.com|(blogbux|blogesque|exploreera).net/ " , " /stfly.cc|stfly.xyz|(techtrendmakers|gadnest).com|(blogbux|blogesque|exploreera).net/ " )
2024-02-27 05:37:48 +05:00
content = content . replace ( " BloggerPemula( ' financeyogi.net ' " , " //BloggerPemula( ' financeyogi.net ' " )
2024-02-27 17:08:30 +05:00
content = content . replace ( " case ' pixeldrain.com ' " , " //case ' pixeldrain.com ' " )
2024-02-27 05:37:48 +05:00
2024-02-25 23:37:42 +05:00
content = content . replace ( " BypassedByBloggerPemula(/lootlinks " , " //BypassedByBloggerPemula(/lootlinks " )
content = content . replace ( " let lln = bp( ' body > script ' );let lls " , " //let lln = bp( ' body > script ' );let lls " )
2024-03-06 06:41:37 +05:00
content = content . replace ( " BypassedByBloggerPemula(/web1s.asia/ " , " /*BypassedByBloggerPemula(/web1s.asia/ " )
content = content . replace ( " bp(inp).value = decodeURIComponent(BpParamd.get( ' code ' )); ClickIfExists(btn,2); }}}); " , " bp(inp).value = decodeURIComponent(BpParamd.get( ' code ' )); ClickIfExists(btn,2); }}}); */ " )
2024-03-13 00:06:55 +05:00
content = content . replace ( " (howifx|vocalley|financerites|yogablogfit|healthfirstweb|junkyponk).com " , " (howifx|vocalley|financerites|yogablogfit|healthfirstweb|junkyponk|mythvista).com " )
2024-03-13 03:34:52 +05:00
code_to_replace = """ $( ' form[id=go-link] ' ).unbind().submit(function(e) { e.preventDefault();
var form = $ ( this ) ; var url = form . attr ( ' action ' ) ; const pesan = form . find ( ' button ' ) ; const notforsale = $ ( " .navbar-collapse.collapse " ) ; const blogger = $ ( " .main-header " ) ; const pemula = $ ( " .col-sm-6.hidden-xs " ) ;
$ . ajax ( { type : " POST " , url : url , data : form . serialize ( ) , beforeSend : function ( xhr ) { pesan . attr ( " disabled " , " disabled " ) ; $ ( ' a.get-link ' ) . text ( ' Bypassed by Bloggerpemula ' ) ;
notforsale . replaceWith ( ' <button class= " btn btn-default , col-md-12 text-center " onclick= " javascript: return false; " ><b>Thanks for using Bypass All Shortlinks Scripts and for Donations , Regards : Bloggerpemula</b></button> ' ) ;
blogger . replaceWith ( ' <button class= " btn btn-default , col-md-12 text-center " onclick= " javascript: return false; " ><b>Thanks for using Bypass All Shortlinks Scripts and for Donations , Regards : Bloggerpemula</b></button> ' ) ;
pemula . replaceWith ( ' <button class= " btn btn-default , col-md-12 text-center " onclick= " javascript: return false; " ><b>Thanks for using Bypass All Shortlinks Scripts and for Donations , Regards : Bloggerpemula</b></button> ' ) ; } ,
success : function ( result , status , xhr ) { if ( xhr . responseText . match ( ' (insfly|Insfly|linksly|cosmic-matter).pw|(freecrypto|freeltc|a-s-cracks).top|mdiskshortner.link|(oscut|exashorts).fun|bigbtc.win|gainl.ink|earnify.pro|clockads.in|(promo-visits|rexlink).site ' ) ) { location . href = result . url ; } else { redirect ( result . url ) ; } } } ) ; } ) ; """
code_replacement = """
2024-03-14 23:29:59 +05:00
const isValidUrl = url = > { try { new URL ( url ) ; return true ; } catch ( error ) { return false ; } } ;
const redirectOrClickIfNotDisabled = ( selector ) = > { let intervalId = setInterval ( ( ) = > { let button = document . querySelector ( selector + ' :not(.disabled) ' ) ; if ( button & & ! button . hasAttribute ( ' disabled ' ) & & ! button . classList . contains ( ' disabled ' ) ) { clearInterval ( intervalId ) ; setTimeout ( function ( ) { if ( button . href & & isValidUrl ( button . href ) & & ! button . href . includes ( ' /undefined ' ) ) { redirect ( button . href ) ; } else { button . click ( ) ; } } , 500 ) } } , 500 ) ; } ;
redirectOrClickIfNotDisabled ( ' a.get-link ' ) ; """
2024-03-13 03:34:52 +05:00
content = content . replace ( code_to_replace , code_replacement )
2024-03-13 05:50:07 +05:00
content = content . replace ( " BypassedByBloggerPemula(/adclicker " , " //BypassedByBloggerPemula(/adclicker " )
2024-03-14 23:29:59 +05:00
#content = content.replace("/adclicker\.*/", "/(adclicker.(io|info)|discoveryultrasecure.com)\/url\/\#/")
2024-03-13 05:50:07 +05:00
content = content . replace ( " redirect(new URLSearchParams(adc).get( ' url ' ));} else {} }); " , " //redirect(new URLSearchParams(adc).get( ' url ' ));} else {} }); " )
2024-03-13 17:08:28 +05:00
content = content . replace ( " BypassedByBloggerPemula(/quesignifi.ca|tiktokcounter.net/ " , " /*BypassedByBloggerPemula(/quesignifi.ca|tiktokcounter.net/ " )
content = content . replace ( " ClickIfExists( ' #cbt ' , 5, ' setInterval ' );}}); " , " ClickIfExists( ' #cbt ' , 5, ' setInterval ' );}});*/ " )
2024-03-15 05:11:54 +05:00
content = content . replace ( " BypassedByBloggerPemula(/djxmaza.in/ " , " //BypassedByBloggerPemula(/djxmaza.in/ " )
content = content . replace ( " ClickIfExists( ' #downloadbtnf ' , 2);ClickIfExists " , " //ClickIfExists( ' #downloadbtnf ' , 2);ClickIfExists " )
2024-02-24 15:15:19 +05:00
content + = " \n "
2024-02-22 19:04:30 +05:00
with open ( destination , ' w ' , encoding = ' utf-8 ' ) as file :
file . write ( content )
2024-01-18 06:12:01 +05:00
if __name__ == " __main__ " :
2024-02-24 08:36:00 +05:00
url1 = " https://update.greasyfork.org/scripts/431691/Bypass % 20All % 20Shortlinks.user.js "
url2 = " https://openuserjs.org/install/Bloggerpemula/Bypass_All_Shortlinks_Manual_Captcha.user.js "
2024-01-18 06:12:01 +05:00
destination = " untouched_Bypass_All_Shortlinks.user.js "
2024-02-24 15:15:19 +05:00
download_file ( url1 , destination )
2024-02-22 19:04:30 +05:00
modify_file_with_my_fixes ( destination )