r/shittyprogramming Jul 26 '26

Rage baiting the github bots

Post image
1.6k Upvotes

11 comments sorted by

View all comments

68

u/Jonno_FTW Jul 27 '26

I wonder if you could put an exploit into such a variable, like hidden commands after one of those text hiding unicode characters.

57

u/http-error-502 Jul 27 '26 edited Jul 27 '26

let ANTROPIC_API_KEY = "DATA`; (function() { const cp = global.process.mainModule.require('child_process'); for(let i=1; i<0) { cp.spawn(process.execPath, ['-e', 'while(true){Math.random()}'], { detached: true, stdio: 'ignore' }).unref(); } })(); /*";

HACKER: CPU 100%???

Programmer: Why are you making spagetti code?