Thursday, October 16, 2014

Ultimate PC prank. Linux version.

There's so much fuss recently about Shellshock and bash in general.
With all that we seem to forget how many great opportunities bash gives us.

Let's say that you friend left his computer screen unlocked, what would you do? Change wallpaper to David Hasselhoff or language to German?
That's just too easy.

But if you'll do something like that:

function cat() { /bin/cat $@ | /usr/bin/cowsay -n; };

World will become a far better or at least funnier place ;-)

cat /etc/fstab
 _______________________________________________________________________________________________
/                                                                                               \
| #                                                                                             |
| # /etc/fstab                                                                                  |
| # Created by anaconda on Thu Jul 31 15:13:00 2014                                             |
| #                                                                                             |
| # Accessible filesystems, by reference, are maintained under '/dev/disk'                      |
| # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info                   |
| #                                                                                             |
| /dev/mapper/vg_oc7324631563-lv_root /                       ext4    defaults        1 1       |
| UUID=9e5593fd-4eb7-4fc1-b099-75c93591eb36 /boot                   ext4    defaults        1 2 |
| /dev/mapper/vg_oc7324631563-lv_swap swap                    swap    defaults        0 0       |
| tmpfs                   /dev/shm                tmpfs   defaults        0 0                   |
| devpts                  /dev/pts                devpts  gid=5,mode=620  0 0                   |
| sysfs                   /sys                    sysfs   defaults        0 0                   |
\ proc                    /proc                   proc    defaults        0 0                   /
 -----------------------------------------------------------------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


No comments: