pseudoberries random thoughts about life, hacking and open source

writeeffect

writeeffect is a C program which takes some text as input and outputs each character after the other with a specified delay in between. This effect makes it look like someone is actually typing the text.

Installation

Compile with:

gcc -Wall writeeffect.c -o writeeffect

Usage

./writeeffect [-sspeed] [-l]

Type ./writeeffect -h for help.

Some fun

Imagine someone, let's call him Bob, is sitting in a remote shell on your computer. Type who to find out which tty he's using:

$ who
joh tty7 2007-10-22 11:05 (:0)
joh pts/0 2007-10-22 11:07 (:0.0)
joh pts/2 2007-10-22 11:42 (:0.0)
joh pts/1 2007-10-22 11:36 (:0.0)
joh pts/3 2007-10-22 14:33 (:0.0)
joh pts/4 2007-10-22 14:47 (:0.0)
bob pts/5 2007-10-22 14:50 (bobcomp.local)

As you can see, bob is sitting on pts/5. We can write directly to his screen by redirecting output to /dev/pts/5. This requires root privileges, so if we want to send him a message, we would do something like:


# echo foo > /dev/pts/5

Not very exciting, until we bring writeeffect into the game!

# ./writeeffect > /dev/pts/5
Boo!
I'm the evil computer and I'm going to delete all your files! MUHAHAHA!

Terrifying, just terrifying! Or, if you're really really really evil:

# ./writeeffect -s20 -l < .../WINDOWS/system32/eula.txt > /dev/pts/5

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.