## echo -ne

A networking teacher once told us, "Computer networking is not a game of gentlemen".

In one of the corporate trainings, there was an excellent C instructor. He typed complete programs on his terminal which was live on the projector and explained the concepts very nicely. Something else caught my attention. He was using a 7-character password (yes, I counted the keystrokes) to login to the remote Linux machine and the default password given to us for our Linux accounts also had 7-characters. I tried to login with the default password into the instructor's account and I succeeded. So, I got this funny idea. I don't remember what his ID was, but let us assume it was his_id.

I ran who | grep his_id and found that there were two terminals for his_id: pts/7 and pts/40. I ran tty and found that mine was /dev/pts/40. So, the other one must be the instructor's.

I ran echo -n " " > /dev/pts/7 and I found that the cursor blinking on the screen moved ahead. I had successfully redirected a space to his terminal when the instructor was looking at us. Before, he turned back. I ran echo -ne "\b" > /dev/pts/7. That was a backspace which brought the cursor back to its original place.

Then I wrote a small script to automate this process and I redirected all sorts of funny messages on the screen when the instructor looked at us. I remember some of them.

• When will this session be over? Are you guys hungry?
• Do you know who is doing this?
• FATAL: Disk has crashed.
• Hey instructor! Don't turn back.
• Twinkle twinkle little star.
• Laugh!
I also included a 'dance' command to my script that would make some random characters dance from left to right and right to left in a single line.

It took some time for my batchmates to figure out who was doing this. Most of them were hiding their faces and giggling. A couple of times, the instructor became suspicious about why the class was acting funny all of a sudden. He looked back. The lady beside me was so scared that she almost held my hand to pull it away from the keyboard. That could have been a disaster but I redirected the backspaces just in time and I escaped narrowly.

I deleted most of them with backspaces before the instructor turned back. However, I did not delete the FATAL warning. I wanted to see how he would react. When he looked back, he stared at the message, thought for a while and pressed the ENTER key a few times and carried on with the training.

#### pragya said:

hahah...its so funny

#### kartik said:

hehe lolz... you know how to have fun Susam :)

#### Saurabh Khatri said:

it is very funny..which corprate training ..infy kya?