| Post Reply | RetroFed Forum Forum Index » linuxmemes |
| Author | Message | ||
|---|---|---|---|
CallMeAl (like Alan)
piefed.world
CallMeAl@piefed.worldJoined: 2025-12-13 |
|
||
| 205 Original | |||
|
gnutrino
programming.dev
gnutrino@programming.dev Joined: 2023-07-23 |
I prefer kmem roulette:
|
||
| 40 | |||
|
auzy1
lemmy.world
auzy1@lemmy.world Joined: 2026-05-03 |
If you're like me and press up to run a previous command from history, you're definitely toasting your system eventually accidentally |
||
| 9 | |||
Gyroplast
pawb.social
Gyroplast@pawb.socialJoined: 2024-06-22 |
Shell footgun. The
Use On an unrelated note, I lost on the first try. |
||
| 46 | |||
|
Laser
feddit.org
Laser@feddit.org Joined: 2024-06-23 |
I prefer kmem roulette: # dd if=/dev/urandom of=/dev/kmem bs=1 count=1 seek=$RANDOM
That's a fun 50/50 |
||
| 15 | |||
|
ViatorOmnium
piefed.social
ViatorOmnium@piefed.social Joined: 2025-06-11 |
|
||
| 21 | |||
|
TwilightKiddy
scribe.disroot.org
TwilightKiddy@scribe.disroot.org Joined: 2026-07-27 |
Shell footgun. The || only looks at the return value of the preceding command, rm -fr /. There's an edge case of the command returning a non-zero error code triggering the statement intended to run if, and only if, the condition is false. [ 0 -eq 0 ] && { echo "I am in your PCs, deleting your p0rn"; false; } || echo "Lucky you?" Use if clauses, people. These test abuses do not make one ...
Nah, we just abuse it even more.
|
||
| 19 | |||
mote
lemmy.ca
mote@lemmy.caJoined: 2026-04-20 |
Al, we need to optimize. Speed and efficiency to prevent Ctrl+C. Write 16MB of zeros to the beginning of the boot device to overwrite the boot blocks (16MB being extra cautious, 8MB is fine) and if you want to double the roulette fun, have it fork in parallel and do the same thing to the EFI partition (if you have one). Extra credit: fork a 3rd time and write 16MB to the end of the disk, nuking the backup GPT structure sitting there. This can all be a fun inline "one-liner" to appeal to cut & pasters. curl pipe bashers. It'll happen so fast there's no stopping it, their only way out now is to get the running system saved off that disk while it's mounted.[1] But your nuke is invisible, how long until they find out trying to reboot? Devious Al, you're just devious. [1] there is a way to recover if you build identical machines, like VMs or VPSes - a tool such as gdisk can pull the table(s) off one to a file, which can be pushed onto another. We've recovered $customer mistakes at $ITjob doing this before, it works. It might not boot properly, but it can contain enough filesystem boundary information to be able to recover a partition manually (rescue). |
||
| 10 | |||
|
pcouy
lemmy.pierre-couy.fr
pcouy@lemmy.pierre-couy.fr Joined: 2023-06-12 |
This is basically Claude Code with less extra steps |
||
| 53 | |||
|
NeatNit
discuss.tchncs.de
NeatNit@discuss.tchncs.de Joined: 2024-01-05 |
Shell footgun. The || only looks at the return value of the preceding command, rm -fr /. There's an edge case of the command returning a non-zero error code triggering the statement intended to run if, and only if, the condition is false. [ 0 -eq 0 ] && { echo "I am in your PCs, deleting your p0rn"; false; } || echo "Lucky you?" Use if clauses, people. These test abuses do not make one ...
Took me a while to understand what you're warning against. Allow me to rephrase, and tell me if I got it wrong. The
OP's code relies on the 1 case, but wrongly assumed that the 2 case will never happen. That's the footgun. |
||
| 16 | |||
|
stuner
lemmy.world
stuner@lemmy.world Joined: 2023-06-14 |
|
||
| 50 | |||
Matt
lemmy.ml
DieserTypMatthias@lemmy.mlJoined: 2024-04-03 |
This is basically Claude Code with less extra steps
And free. |
||
| 27 | |||
|
FauxLiving
lemmy.world
FauxLiving@lemmy.world Joined: 2025-02-10 |
system roulette:
|
||
| 16 | |||
|
TwilightKiddy
scribe.disroot.org
TwilightKiddy@scribe.disroot.org Joined: 2026-07-27 |
Took me a while to understand what you're warning against. Allow me to rephrase, and tell me if I got it wrong. The || will execute what's after it in two cases: The preceding command (in this case the rm) never ran because of an earlier && The preceding command ran and returned nonzero OP's code relies on the 1 case, but wrongly assumed that the 2 case will never happen. That's the footgun.
In this case the left operand for The non-execution of |
||
| 7 | |||
|
luciferofastora
feddit.org
luciferofastora@feddit.org Joined: 2025-02-07 |
If you're like me and press up to run a previous command from history, you're definitely toasting your system eventually accidentally
What could be more fun than hiding a landmine in your "convenience pile"? Every time you don't want to retype a command, you're gambling. Is it worth the risk to save those two keystrokes on |
||
| 1 | |||
|
Trail
lemmy.world
Trail@lemmy.world Joined: 2023-07-11 |
rm -rf / won't actually do anything in most Linux systems. GNU coreutils' rm will only remove the root with --no-preserve-root.
It has that. |
||
| 3 | |||
Digit
lemmy.today
Digit@lemmy.todayJoined: 2026-07-29 |
LMAO! OMIGOSH! I cannot, in good conscience, vote this up, nor down. LOL. Nothing has got me laughing as hard or as fast, for years. I still can't upvote this. LOL. NOOOOOO! LOL. XD |
||
| 0 | |||
|
floquant
lemmy.dbzer0.com
floquant@lemmy.dbzer0.com Joined: 2024-05-31 |
I prefer kmem roulette: # dd if=/dev/urandom of=/dev/kmem bs=1 count=1 seek=$RANDOM
Now do /dev/sda |
||
| 2 | |||
vinyl
lemmy.world
vinyl@lemmy.worldJoined: 2023-07-07 |
LMAO! OMIGOSH! I cannot, in good conscience, vote this up, nor down. LOL. Nothing has got me laughing as hard or as fast, for years. I still can't upvote this. LOL. NOOOOOO! LOL. XD
are you trying to roleplay as a Facebook user |
||
| 12 | |||
Digit
lemmy.today
Digit@lemmy.todayJoined: 2026-07-29 |
are you trying to roleplay as a Facebook user
Facebook user's would get what that is in the OP? Huh. It must have changed from when I would still hang around facebook users. |
||
| 2 | |||
| Post Reply |
Back to top |