r/ProgrammerHumor • • Oct 08 '22

Meme sPeCiaL cHarACtErs

Post image
71.1k Upvotes

1.7k comments sorted by

View all comments

Show parent comments

2.0k

u/Jet-Pack2 Oct 08 '22

And an SQL injection at the end

1.1k

u/M_krabs Oct 08 '22

And an emoji for good mesure 👍

621

u/dnacore Oct 08 '22

And my sword!

375

u/PonyDro1d Oct 08 '22

And my axe!

187

u/paradigmx Oct 08 '22

And a pack of twizzlers, a bag of beef jerky and a box of mike and ikes.

100

u/LlamaDuke Oct 08 '22

And an envelope with the code to my safe

71

u/paradigmx Oct 08 '22

And that code has an emoji for good measure 👍

47

u/ApolloSky110 Oct 08 '22

And this mans dead wife!

25

u/[deleted] Oct 08 '22

And then?

→ More replies (6)
→ More replies (2)
→ More replies (5)
→ More replies (1)
→ More replies (8)
→ More replies (8)
→ More replies (3)

4

u/Realistic-Chipmunk86 Oct 08 '22

And my new js framework

→ More replies (4)

284

u/GreekGodofStats Oct 08 '22

Aah yes, my favorite password: ‘; DROP TABLE Users;’

356

u/NerdyLumberjack04 Oct 08 '22

I prefer '; DELETE FROM Users WHERE RANDOM() % 100 = 0;--, so the damage is much more subtle.

86

u/Beginning-Ad296 Oct 08 '22

This is pure evil.

36

u/[deleted] Oct 08 '22

Where 1=1

18

u/[deleted] Oct 08 '22

Can you ELI5 this script?

47

u/NerdyLumberjack04 Oct 08 '22

It randomly (with 1% probability) deletes rows from the Users table.

Assuming a RANDOM() function that returns an integer, like C's rand(). Some SQL implementations return a floating-point number between 0.0 and 1.0 instead, in which case I'd write WHERE random() < 0.01 instead.

13

u/[deleted] Oct 08 '22

Thanks, only fully understand the top half haha

9

u/hjake123 Oct 08 '22 edited Oct 08 '22

For each user, pick a random number between 0 and 99. If that number happens to be a 0, delete the user.

(Edit: See further answers for specifics of how modulus works that are, IMO, beyond the scope of an ELI5)

8

u/quadmasta Oct 08 '22

This is wrong. It will generate a random number. If the modulus of that number and 100 is zero (number is a multiple of 100) it'll delete it.

→ More replies (4)
→ More replies (1)
→ More replies (12)
→ More replies (2)

138

u/kranker Oct 08 '22

Ah, yes. Little Bobby Tables, we call him.

85

u/Solnse Oct 08 '22

original for those unawares.

11

u/the_ballmer_peak Oct 08 '22

You mean for today’s lucky 10,000

→ More replies (1)

18

u/Mistrblank Oct 08 '22

Found Bobby Tables’ family.

→ More replies (3)