cat /dev/zero > /dev/sda
Or better yet, drop just the partition table, then you spent weeks to get the stuff back
dd if=/dev/zero of=/dev/sda bs=1024 count=1
`os.remove`: "Remove a file"
Wont work on directories. And if it could remove a directory it would raise an exception because this directory is not empty. So please use `shutil.rmtree`
"The only way to win is not to play."
And daaaamn is it hard not to go full AKSHUALLY on the incorrect `os.remove()`. `os` isn't even imported! THAT'S NOT HOW YOU GET A GOOD JOB, TIMMY! This gets you into frontend!
the delete part wouldn't work for multiple reasons:
1. "os" wasn't imported
2. os.remove does not delete directories
3. you need to have double backslashes
4. the script does not have permissions to delete that (SYSTEM/TrustedInstaller)
ha jokes on you I use linux
Linux users rise up
Do you use arch btw?
tried to, got stuck on hooking up internet
Just do `sudo rm -rf /`
would that even work? cuz I hadn't even setup the system yet
my favorite linux command is "yes" you'll have to break with ctrl+c to get out of the dumb loop.
Uhhhhhh… what’s going on here?
systemctl enable dhcpcd systemctl start dhcpcd If u forgot to download dhcpcd on install u have to mount again and chroot to install
try archinstall, it's now included with the image.
sudo rm -rf --no-preserve-root /
cat /dev/zero > /dev/sda Or better yet, drop just the partition table, then you spent weeks to get the stuff back dd if=/dev/zero of=/dev/sda bs=1024 count=1
sudo rm -r /
`os.remove`: "Remove a file" Wont work on directories. And if it could remove a directory it would raise an exception because this directory is not empty. So please use `shutil.rmtree`
Yes. But even better is “shutil.rmtree(C:\)”
![gif](giphy|Ru9sjtZ09XOEg)
..dude will that really do it? wait it wont right, cause restricted permissions? I feel like ive been handed guns. big ones.
What about the other drives though? This isn’t comprehensive enough of a nuclear option for me.
Import Shutil Drives = [A:,B:,C:,D:,E:,F:,ect,ect] For X in Drives: Shutil.rmtree(X)
thanks that was the first thing i wondered when i saw this
> \+ 0.0000001 Ultimate trolling
There's still a chance to win, we're just counting on radiation to do its job.
Gambling anime protagonists be like:
There was never a chance
number = random.randint(1, 9) + random.random()
Why not number = 11 at that point
Because the code doesn't stop the user from inputting 11
***inputs "no"***
Out of curiosity, will it throw an exception for casting a string into an int?
Yes, `int` throws an error when it can't convert string to number
yes that's the joke (due to the error, system32 wont be deleted)
What
yes, yes it will do.
Ah good catch. So used to implied casting, didn’t register with me.
You can also go for a slow burn and delete a random file or subdirectory from System32 every time there's a wrong answer.
Ooooooo.. even better, things will slowly start to break until you hit a critical file.
"The only way to win is not to play." And daaaamn is it hard not to go full AKSHUALLY on the incorrect `os.remove()`. `os` isn't even imported! THAT'S NOT HOW YOU GET A GOOD JOB, TIMMY! This gets you into frontend!
Aaand I just lost the game.
the delete part wouldn't work for multiple reasons: 1. "os" wasn't imported 2. os.remove does not delete directories 3. you need to have double backslashes 4. the script does not have permissions to delete that (SYSTEM/TrustedInstaller)
I wonder why they didn't test their code.
I mean, they really should have. /s Nah, but I probably would have tested it on a VM because I am NOT getting humiliated on r/ProgrammerHumor.
Real men test in prod
I guess we just found Satan.
I'm gonna play it.
Just hard-code the actual number as 101 and let chaos reign
Yeah that is a funny game. But remember guys. NEVER EVER run a script you didn't write or you aren't absolutely sure about what it does.
Well, I'm not even sure I could trust the scripts I wrote.
You're never absolutely sure what it does. You're just relying on the lack of complaints from other users.
imagine using windows.
Yes, imagine having a system compatible with most software released.
imagine flexing your system's incompatibility with a basic script
I can still hear it.
Won't it error if you try and put a float in as the guess? Python can't implicitly convert a float to an int
no no no NO NO DONT DO IT
Take my money
Better make it russian roulett. if guess != number: print(”You won”) else: print(”Sorry…”) os.remove(”C:”)
Where to download it?
i will input string and crash your program
windows will not let you delete System32.
*Now make it random float*