Pranking Students, Again

It is that time of year, the pranking of students! Last year I pranked a couple of students during their presentations. You can check last year’s prank by checking this link. This year I wanted to prank more students and increase the level of awesomeness. Challenge accepted!

Since most of the students knew that I pranked last year, I wouldn’t put a camera in the room. There is only one security camera in the class, but it wouldn’t be enough to record all students’ reactions. Luckily, all school computers have a webcam. I just needed to remotely activate the webcams, scare and record them. Sounds easy doesn’t it?

All school computers have DeepFreeze software, therefore all modifications created will later be lost. I wouldn’t be able to create my prank and deploy it into the machines easily. Fortunately, students are running in a guest account and I know the admin password. My basic plan was something like this:

  • Deploy the prank with some command fu
  • Run the Prank Software by PsExec
  • Prank Software waits for exact time, runs the prank
  • Collect the videos.

Here is my early sketch about the prank.

Prank Plan
Prank Plan

Deploying the Prank

I used the batch file below to deploy and run the software on the remote computers.

FOR /F %%i IN (computer.txt) DO call :sub %%i
echo %1
net use \\%1\C$\wamp\bin verysecretpassword /USER:admin
copy C:\RadASM\Masm\Projects\MyApp\*.exe \\%1\C$\wamp\bin\*.exe /Y
psexec \\%1 -u admin -p verysecretpassword -i -d -w C:\wamp\bin\ C:\wamp\bin\Myapp.exe

For anyone who is wondering, veryscretpassword is not a real password of computers (roll eyes)

This batch file basically reads computer.txt file line by line from the current directory, connects each computer and copies ffmpeg.exe(recorder) and MyApp.exe(Main app that I coded). Then it runs MyApp.exe with admin credentials.

Waiting for the launch.

First of all I had to find a perfect time to launch this prank. I needed students to wear headphones, otherwise the prank wouldn’t be effective – since the prank shows a scary picture (Exorcist) and plays a scream audio. Lately students were a little bit naughty in the classroom. Therefore I sent them an email and told them that they were doing some hands-on activities during the lesson. Killing two birds with one stone. Poor kids, they were so scared. (Evil grin) Some of the students even emailed me and apologized for their actions. Anyway, I created a fake hand-out for them, and I asked them to review any hardware review video on YouTube.


MyApp waited for the exact time and when the time was right, it launched ffmpeg. Ffmepg waits for an extra minute to record their previous expressions and one minute later MyApp shows the picture and plays the scream. For an extra precaution and extra evil, I also disabled the keyboard and mouse during the prank. After 1 minute MyApp closed itself and signaled the ffmepg process to close and save the file.


I used the command batch below to connect and get the movies from students’ computers. I recorded by using computer names therefore there was no naming conflict.

FOR /F %%i IN (computer.txt) DO call :sub %%i
echo %1
net use \\%1\C$\wamp\bin verysecretpassword /USER:admin
copy \\%1\C$\wamp\bin\*.avi C:\movies\*.avi


Due to the issues below, my first attempt didn’t go as planned. I am sorry for section 3 students that I couldn’t scare them that much. What were the problems?

Time Issues.

Schools computers don’t have correct time settings. Therefore my first attempt didn’t go as I planned. The Myapp ran earlier, and it spoiled the surprise. I fixed the time problem by using NTP server. The university luckily runs a NTP server, therefore I requested an exact time from the server and used a Sleep function to sleep all programs in the computers.

Audio Issues.

This one was very hard to tackle. Audio playback and recording was hit and miss. I couldn’t find the exact reason for a long time. Finally, I tackled the issue by issuing sleep commands between audio extraction and ffmpeg execution.


Special thanks go to Chhun Ngy Sok, Samphors Say, Porhour Ly and Boramey Rith for editing the videos.

Section 2

Section 1

Section 3


3 thoughts on “Pranking Students, Again

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s