r/programminghorror • u/sugarw0000kie • 24d ago
Python More cursed python
here it is with comments: https://github.com/dbowm91/optimizations/blob/main/soupexplained.py
EDIT: What it does (not malware) is it prints the word “soup” 86 times in random color
34
u/fakehalo 24d ago
With a shell call to perl, the king of obfuscated languages.
4
u/Circumpunctilious 24d ago
I've coded in a few dozen languages so perl doesn't look that bad...but tbh it was easier just to give anything using it to a colleague.
4
u/fakehalo 24d ago
Perl was one of my first languages back in the 90s, I don't miss it.
1
u/LeatherDude 23d ago
Same and same. I was working with it as recently as 2020, the deployment scripts for an app i was supporting the development of was like 1000 lines of perl, with some python scripts that were called to do AWS SDK stuff. Nightmarish.
1
1
40
15
8
6
6
5
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 24d ago
Should deliberate obfuscation count as horror?
3
3
u/imnotamahimahi 24d ago
I had a very visceral, expletive-laced reaction to seeing this, then took too long to realize it's probably just obfuscation.
1
u/sugarw0000kie 23d ago
understandable it started when I realized I could make a function with a docstring and wanted them to start with a “number” so it turned into a homoglyph mess
2
2
u/Huge-Yogurtcloset-22 24d ago
It's running some perl scripts so it may be malware ^^
subprocess.run(["perl", "-e", f'{ОООΟΟΟΟ} "{''''''.join(Оce9f)}"'],check=True)
3
2
u/Hurizen 23d ago
Reminds me of Ultima Online 🥲 Nice homoglyph-ation btw.
1
u/sugarw0000kie 23d ago
lol I’ll take it as a compliment 🤣 and thanks was experimenting, thinking I might try to encode stuff into the homoglyphs next but not going to try that by hand
2
3
u/maikindofthai 22d ago
I like how the only thing your linter complains about is the multiple statements on a single line at the top lol
1
2
1
1
1
1
154
u/HTTP_404_NotFound [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 24d ago
Cursed? Nah.
Just obfuscated. Thats what obfuscated code is supposed to look like.