DrKain / tidy-url

A node package & userscript that removes tracking or garbage parameters from URLs making them shorter, cleaner and a lot nicer to read.
MIT License
58 stars 18 forks source link

Website: alb.reddit.com #23

Open DrKain opened 2 years ago

DrKain commented 2 years ago

I've had my eye on this domain for a while now because these links are utterly excessive and incredibly annoying. Most decent ad-blockers will block this domain by default, but considering there's a staggering 3,700 character difference between the original link and the result I would like to add support for these links if possible.

Originally I thought this was Base64URL but attempting to decode results in what looks like gibberish. I'm no expert so I'll leave this issue open in case someone else wants to take a look.

Sample (3752 characters):

https://alb.reddit.com/cr?z=gAAAAABjGypn8VAdGHp1MKztT4RzS3IpDhqv3rygXtBqT7_sG7jLFwrvqpiytibJXUNCGy4Z7ldBDOITsJBWEykPtnDWE4dPmm6Jfnrk3KBrPWqBhokLNBAoFPAAYJdazrYL6Dzy_sqXKZ91vjb7rPdaWygCMwevpdeEiybI4D7Mf--Ukzwuatlmv3zCYU3OJ5RZgzg7r2iE6gVrX3V5Lh3LWFe6gOZ-tdr-acquM6j5SL0Uq_GhDMgufTvrHj8AG87Y-yYnOnYpOuHNJd3QvNhf8mi_m09imLIpiekfCDs8pMY8Vxrx0SyJ40mP-Iv5AHNS1hYnbpHBrXjBAAK_M7XwB0WaiJTq7mfy98mD8dl3-63wJWa1xtdgDomXgvmqlgUYDL-mkkXJCpbkb8E3Cuo5f3pLeW1VCCP2Kje6BtryqrDKjOmZo3RlBgQhxzv6p3DNs1lGTpMhcnE2nUskBkIVzr5TwrZmYohvRmTXsQWb8Z6nmjPddqVneY_R-KXLBJIDNogvWYMM44KX1ael6E0RChUWrtoEifyGGOYHrZpSRJM9ISlF-dswIRj70qGmllou4pzAUz2JEkVwfDJrvS2F022nnf5_RQu8nA_gm4uyO8PndX-UkAFP3BSVDir8EFOE_CrEe-WsFsc2HNSeXk6yfjczdOP_uW486X7pNmOsqIIov43ISLd-sYu17cQpgx2_3wiXwGbbiBgIIzlp7SDt8ptRVIZ5CWZg660taXF9tGRkhsWBgVBBr3pJ28B_xY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3pSda6o_Jux1FZG2gyLzTxyObAMQhmvS-ioX3khZ_3qy0oftW_N_X8Aj1ip9UcpXv5_Xd9rlYUrJJT53er8iPFkyGksPhjUslUzxvp2ZUe-G4XrY08GXW93aDxDli0FkDa-FgIZuMp_fKCCwYlTfz0rtRWpmwMRdd5mUmdgYajTETlw7gday0a7ZoxOFAn0nJOqffR2YkXIjV1CV_v7mks7Quqwg-iykYTt1aevsC5kCm7vxL9tyzN4zGEdCOzfDTVSLAstJoZ8Canm7J3RVgI0uEezcng9nviM6Z-DB_NoiOu0cdN9WDtH6hEdFOiq_ebNem6J-u_UdOk4sMqoRyJijpRCM3fmtaCy-e16ZT7iF-UAYDPkv95vusmznBFc56Skk8n0SQ766Kcv7-sYB3wiGNw60DTeVQTD615BaCOHkTrnHtdgrh4RtPX3dDhKm4FQ_QFbcFyGkRQunxiiNwFTE-tRCUmx0dAC4Gu74RLtag7Se3Cp56BzC5Wi8XcUjpZzhWmbrx6sPyRS4ydAM5sru69ne48SaNKKBiMwIR2VSqWux5s3OF9TIx89I_J0-wDv-KddgaZAw6qWmzHZpFS-VNxkETO8t6pTHcMQAVk0QboGNSRsCRRH_ji3jUmlh7esK-BNoARuQ7rDETlEeLrsHYf7CQb1RkvCeu8vxJMholyrWqTbD2Vpy8Q04MZB-AtGgWect2G66Pi8QDioSVGTA82fDwx3mGA-LXFKFyz_CRQup6bMU

Result (80 characters):

https://store.steampowered.com/app/597180/Old_World/?rdt_cid=3751109243376233695

Reclean (52 characters):

https://store.steampowered.com/app/597180/Old_World/
ArshErgon commented 2 years ago

what if we use a URL-Shortener? will it help?

DrKain commented 2 years ago

A URL shortening service would still redirect to the original URL, the objective here is to decode the z parameter to find the target URL. You can see an example of this on the decode page of the wiki.

WileESpaghetti commented 2 years ago

it might be Fernet encryption. I googled gAAAAAB thinking it might be some sort of file type/encoding header a link about someone trying to decrypt a CSV file. (https://stackoverflow.com/questions/57194710/decrypting-a-fernet-csv-encoding-issue-pandas) The data looked pretty similar.

I played around a bit with the decoded URL here: https://asecuritysite.com/encryption/fer and it wasn't nearly as long, but the first part matches pretty closely

DrKain commented 2 years ago

You're probably right, thanks for looking into this @WileESpaghetti. Without the key there's not a lot I can do in the scope of this package but I'll leave this issue open in case something changes in the future.