Skip to content


Exciting Methods for Simple Tasks

Presented by Ryan Curtin on October 23, 2008

Table of Contents




1. Introduction



In being a good sysadmin (or Linux user) it is important to know many useless tools that help maintain your image of being a hacker guru mastermind. The following list of applications should help with this goal.


2. PSDooM

  • Manage processes using Doom
  • http://www.cs.unm.edu/~dlchao/flake/doom/
  • Source was last updated in 2000; getting this application to compile is tough
  • For a version that compiles:
    • Disable musserv
    • Disable hand assembly optimizations
    • Use GCC 3.x not 4.x


3. Lavaps


4. Poor Man’s X Forwarding



So your problem is this. You want to watch a movie and have an .avi on a remote system, but you can’t get X forwarding to there. But why should that stop you!?




First, resize your xterm’s font (possibly using xtermcontrol: xtermcontrol –font=#-1) to the smallest font size possible. Optimally each character should be one pixel large.



Now, SSH to your remote box. This part takes textual precision as if you mistype your password you won’t know.




Use mplayer with the caca (or aalib) output option:

mplayer -vo caca filename.avi




And shazam! You’re now watching video without an X connection.



5. write, figlet, banner, cowsay, and cowthink



So you know a guy. He’s across the room. He just looks stupid. You want to ruin his day, don’t you? The simple way to do this would be with a gun. But why would you want to do that when you could have a lot more fun?




The write utility lets you write text to another user, provided that they have not disabled it in their terminal. It’s actually a useful utility for communicating with someone if all other means fail. But, the potential for abuse is what is interesting here!



So for the purposes of our demonstration here let us assume that our mortal enemy is named chad. He’s logged in over there, we can see the smirk on his face because he thinks he’s cool, using a terminal and all. Our job is to wipe that smirk off his dirty little face.



We’ll use the figlet application to expand some text:



$ figlet MESS WITH THE BEST, DIE LIKE THE REST

 __  __ _____ ____ ____   __        _____ _____ _   _   _____ _   _ _____
|  \/  | ____/ ___/ ___|  \ \      / /_ _|_   _| | | | |_   _| | | | ____|
| |\/| |  _| \___ \___ \   \ \ /\ / / | |  | | | |_| |   | | | |_| |  _|
| |  | | |___ ___) |__) |   \ V  V /  | |  | | |  _  |   | | |  _  | |___
|_|  |_|_____|____/____/     \_/\_/  |___| |_| |_| |_|   |_| |_| |_|_____|

 ____  _____ ____ _____   ____ ___ _____   _     ___ _  _______
| __ )| ____/ ___|_   _| |  _ \_ _| ____| | |   |_ _| |/ / ____|
|  _ \|  _| \___ \ | |   | | | | ||  _|   | |    | || ' /|  _|
| |_) | |___ ___) || |_  | |_| | || |___  | |___ | || . \| |___
|____/|_____|____/ |_( ) |____/___|_____| |_____|___|_|\_\_____|
                     |/
 _____ _   _ _____   ____  _____ ____ _____
|_   _| | | | ____| |  _ \| ____/ ___|_   _|
  | | | |_| |  _|   | |_) |  _| \___ \ | |
  | | |  _  | |___  |  _ (| |___ ___) || |
  |_| |_| |_|_____| |_| \_\_____|____/ |_|
	



Now let’s redirect this input to his terminal, after SSHing into the box he is using.

$ figlet MESS WITH THE BEST, DIE LIKE THE REST | write chad



Before we can give him a chance to retaliate, let’s cat some executables and random gibberish into his terminal.

$ cat `which firefox` | write chad

$ cat /dev/urandom | write chad



He must now realize that he is not safe. But before we’re done we must deliver our ultimatum. Let’s use the cowsay utility, to add insult to injury.



$ cowsay "I hate you."

 _____________
( I hate you. )
 -------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
	



But why stop there? We can combine these commands to produce some severely garbled gibberish with a hidden message:



$ cowsay "I hate you." | cowsay | cowthink | cowsay

 _________________________________________
/                                         \
| _______________________________________ |
| __ ( ________________________________ / |
| ) ( _____________ ( I hate you. ) \ | | |
| | ) ( ------------- | | | | \ ^__^ | |  |
| | | \ ) ( (oo)\_______ | | | | (__)\    |
| )\/\ | | | | ) ( ||----w | | | | \ ||   |
| || / ) ( ) (                            |
| -------------------------------- ) ( )  |
| ( \ ^__^ ) ( ) ( \ (oo)\_______ ) ( ) ( |
| (__)\ )\/\ ) ( ) ( ||----w | ) ( ) ( || |
| || )                                    |
|                                         |
| --------------------------------------- |
| --                                      |
|                                         |
| o ^__^                                  |
|                                         |
| o (oo)\_______                          |
|                                         |
| (__)\ )\/\                              |
|                                         |
| ||----w |                               |
|                                         |
\ || ||                                   /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
	



So maybe that’s not so pretty but clearly our nemesis will understand he is being hated upon… by cows.


$ cowsay "I hate you." | cowsay | cowthink | cowsay | write chad




Now, we better run, because he’s actually a lot bigger than he looked and he’s looking around the room. If we had really wanted we could add some figleting to our cow chain. banner is another utility that can be used for that.



One last thing to mention is that if your victim is using vim, and you pipe executables to them, all sorts of weird stuff will happen. Bonus points if you get them to quit without saving their changes in an attempt to try and make it stop.




6. sl



So you are having a tough time remembering how to spell ‘ls’, are you? This utility helps you remember not to accidentally type sl by drawing a train across your screen:

	           (  )   @@        O          @                                       

     (@@@@)
                                                                                      (

    ====        ________                ___________                                   =
_D _|  |_______/        \__I_I_____===__|_________|                               _D _|
 |(_)---  |   H\________/ |   |        =|___ ___|      _______-_||_-____           |(_)
 /     |  |   H  |  |     |   |         ||_| |_||     _|       _)(_     \_____A    /
|      |  |   H  |__--------------------| [___] |   =|        -X||O-          |   |
| ________|___H__/__|_____/[][]~\_______|       |   -|         (--            |   | ___
|/ |   |-----------I_____I [][] []  D   |=======|____|__________||____________|_  |/ |
/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__|____________||____________|___/ =|
/-=|___|=   O=====O=====O=====O|_____/~\___/          |_D__D__D_|| _____D__D_|   |/-=|_
\_/      \__/  \__/  \__/  \__/      \_/               \_/   \\/||~|-+-----------------
	



The program can’t be CTRL+C’ed or CTRL+Z’ed during its teaching sessions. If you feel the teaching sessions aren’t long enough, the modification is simple. In sl.c at line 167:




PASSNUM = (int)(drand48() * 20.0) + 10;





PASSNUM signifies the number of passenger cars in the train. I suggest modifying the 20.0 to 4000.0, allowing trains of length up to 4010 cars. It should be noted that trains of this length produce teaching sessions of approximately three hours. For extra fun you can switch the ls and sl executables on your system.




7. gltail

  • OpenGL-based ‘tail’
  • http://www.fudgie.org/
  • Written in Ruby
  • Provides real-time log information; watch the video on the project’s website
  • Configuring gltail is rather difficult as documentation is somewhat poor; but if you get it working right, it’s really cool!


8. logstalgia

  • Visualization for Apache logfiles
  • Clients on the left side and server on the right, playing "pong" with the opposing side
  • http://code.google.com/p/logstalgia/
  • Videos on the project website gives a better idea


9. Wheel-O-Yum

  • Can’t decide where to eat? Input your food preferences and use the "Wheel of Yum"
  • http://www.wheeloyum.com/
  • Each participating voter must create an account (tedious)
  • Each voter must then input their preferences from the listed choices of restaurants
  • A probability for each restaurant is created based on the votes it received (more votes, more probability)
  • The wheel is then spun and the restaurant decided
  • This utility is best used when you are planning somewhere to eat far in advance


10. Conclusion



There’s a lot of seemingly useless and pointless software out there. But, it should be kept in mind that if it looks cool, it is clearly better than a tool that doesn’t look cool. So clearly the best way to boost your ‘geek cred’ is to use a bunch of utilities that make doing everyday tasks take forever, but make you look really smart.

Posted in Articles.