So I set my password to

sudo rm -rf --no-preserve-root /
  • thesdev@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    24 hours ago

    So the other day, I saved a big object to a file during a debugger session with a path like ~/debug.json only to find out later that the debugger didn’t support shell expansions and instead of saving to the home directory it had literally saved the file under a directory called ~ inside my project. Now at that point I didn’t need the file anymore anyway, so you never guess what I proceed to do next, and mind you now I was in my regular terminal: I ran rm -rf ~. Lost a bunch of dot files, but thankfully all the permission errors I got made me realize what was going on and I cancelled the operation quickly before any bigger damages were done.

    • Supercrunchy@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      11 hours ago

      Oh yes, the classic rm -fr ~ I wouldn’t be surprised if current AI models would try to do the same command for deleting a folder named ~

      Another fun one is rm -fr .* if you want to delete dotfiles (hint: .. ).

      Sometimes it’s just better to open the file manager, select files and hit delete manually.

  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 day ago

    I wonder though: is elogind or any other session manager hackable/crashable/injectable from the login prompt on a Linux system using only a keyboard 🤔 physical violence disallowed!

    Zd6bNhAmamncOcm.jpg

    • quantumcrop@lemmy.today
      link
      fedilink
      arrow-up
      0
      ·
      22 hours ago

      This picture is definitely AI right? Like the the name of the keyboard has a question mark in it and the switches look weird and are different colors.

      • Kruulos@sopuli.xyz
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        13 hours ago

        The sticker says “Is your tech alright…?” in Finnish. Tech refering hardware and not short for technician. The keyboard has red brand bit lower from than the sticker. I think it matches the one on the monitor. Hard to see but I guess it says “digital”.

        Keyboard layout is standard Finnish/Swedish with ÖÅÄ next to double row Enter.

        All in all. It looks like an art piece and not AI made. Notice the pile of posters on the left where there is a picture of this scene. They probably introduce the art, the artist and meaning there.

      • A1kmm@lemmy.amxl.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        16 hours ago

        Definitely fake, but it’s not clear how it was made.

        Perhaps the biggest problem: Real CRT displays are under high vacuum, and actually implode, breaking the glass into tiny pieces and pulling it inwards if the glass is hit like that.

      • bss03@infosec.pub
        link
        fedilink
        arrow-up
        0
        ·
        21 hours ago

        I’m not 100% sure, but I think it is at least digitally edited. Both the keyboard and monitor are decorated with the logo of https://en.wikipedia.org/wiki/Digital_Equipment_Corporation but I think digital only made a couple of keyboards, and I don’t think they had international keycap labels available. The two “A” keys can be explained by one of them actually being ring-A (a separate vowel in some Nordic languages), but there also seems to be two “O” keys? I’m certainly no expert on international keyboards, but location of + and - loudly proclaim it as non-US, at least.

        The shadows also feel a bit weird to me, like are the shadows from the keyboard, monitor, and background objects al going in different directions?

        • jrgn@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          16 hours ago

          It’s a swedish layout with ÅÖ and AO

          Edit: The sticker is Finish. So it’s the part of Finland that also speaks swedish

          Edit2: The sticker says something along the line of “tech is okay…?”

  • allywilson@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 day ago

    I wonder if base64’ing something like this makes it safe for input, but dangerous for some backends?

    c3VkbyBybSAtcmYgLS1uby1wcmVzZXJ2ZS1yb290IC8=

    • Godort@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      1 day ago

      It would have to be a really strange situation where the backend would be decoding and then running just the password field as a bash command. Very likely not to be the case.

      To make it more likely to work, you want to take a page from SQL injection and make sure you include something at the start of the command to terminate whatever was there first and end with a comment character to ignore anything after.

      In addition you probably want to drop the ‘sudo’ in this case, as it’s far more likely that whatever is running this would be running as root rather than a user account with sudo with password disabled.

      You’d want something more like

      && rm -rf --no-preserve-root / #

      JiYgcm0gLXJmIC0tbm8tcHJlc2VydmUtcm9vdCAvICM