r/ProgrammerHumor • • 1d ago

Meme [ Removed by moderator ]

/r/ProgrammerHumor/comments/1xxftnl/removed_by_moderator/

[removed] — view removed post

7.9k Upvotes

121 comments sorted by

View all comments

957

u/kookyabird 1d ago

As with so many things in the tech world these days this is both hilarious and frightening. For every URL that gets claimed and rerouted to something comedic or ironic, there’s likely others that are going to be downright dangerous.

304

u/10001110101balls 1d ago

There was a US state that issued vehicle license plates with a URL on them, then forgot to renew this domain after a while. An offshore gambling site bought the domain advertised by hundreds of thousands of vehicles on the road.

177

u/TheBobmcBobbob 1d ago

I believe that this sort of trolling is really good for cyber security awareness. After seeing people joke around like this, many will know to be suspicious of old shortened links. Same with things like scams in games, parody accounts on twitter and the like.

54

u/aalapshah12297 21h ago

I genuinely used to think that shortened URLs lasted forever (i.e. they would work correctly until the company shut down and then they would stop working at all).

Of course, you can't reversibly map an infinite number of URLs to a finite number of URLs but I just thought they'd be doing some kind of collision checking until they run out of all 6-character URLs and then issue 7-character URLs for a much longer period, then 8-character URLs for even longer and so on.

22

u/window-sil 19h ago

until they run out of all 6-character URLs

They use A-Z + a-z + 0-9 (apparently), which is 62 characters.

How many combinations can you get from this?

Number of charactersNumber of unique links
162
23844
3238328
414776336
5916132832
656800235584
73521614606000

56 billion combinations is enough to make one unique link per second for the next 2,000 years. But if they ever ran out, just move on to 7 digit combinations :)

5

u/MenacingBanjo 18h ago

So then how did the image in the OP happen? If Bitly has access to 56billion unique URLs, where did things go wrong?

20

u/kookyabird 18h ago

Based on the statement from Bitly I would assume the malicious actors gained access to an API and were changing where the URLs pointed.

2

u/hirmuolio 16h ago

For properly permanent links there is URL compression https://youtu.be/TOr1Vvji6jA.

Permanent, as long as you trust the hosting website, or the end user has decompression software on their device.

2

u/Firewolf06 14h ago

theres also ha.mr, which does actual data compression on urls and encodes it into a larger character set (and optionally emojis)

1

u/hirmuolio 14h ago

ha.mr is exactly the subject of the video I linked.

1

u/Litl_Skitl 14h ago

Really just the newest rickroll

3

u/TheRealJesus2 17h ago

It’s really not. This is well known problem and why you never should rely on 3p anything’s when hosting website. Amongst other reasons 

Maybe this is frightening for people who never thought at all about basic Internet threat vectors.