• DasFaultier@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    14
    ·
    1 day ago

    Maybe something like find ./ -type f | xargs md5sum, then avoid the one directory where the executable has a different checksum. Heck, even find | ls might suffice.

    • SwingingTheLamp@piefed.zip
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 day ago

      This could be trivially defeated by a program which erases the hard drive unless run using a particular executable name. Then, all twenty entries could simply be hard links to the same executable file on disk, but one of the names would trigger different behavior.

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        15 hours ago

        So then you either cat the executable and hope it’s a shell script, you output the binary with a hex viewer and compare, you modify the executable so it’s in a lower permission group and thus wouldn’t have access to erase the drive, there’s like a hundred ways to solve this.