Containing facts, figures and a whole bunch of nothing...
I 'C' it's all coming back.
Published on October 4, 2003 By Dark-Star In History
Along time ago I wrote a stupid C program. This program was designed for one purpose; to freak someone out. It was suppose to operate under DOS and use ANSI characters to display what appeared to be the workings of a giant count down clock. What it did at the end of the count down was the users guess. The program would then spit out words like, "Not ready reading drive C". This of course was a good way to make anyone feel somewhat upset. I gave this program to a few friends as a joke. Of course, it was received well, as they knew I would never intentionally due harm to their computer. However, this was not always the case. (One program I wrote added a few nasty lines to your autoexec.bat file and win.ini) Since then, I've learned that this type of behavior is look quite down upon. But it's still something I look back at and say that those days were more about learning something new, rather then doing harm. I guess you grow out of it... or maybe it's the fact that getting in trouble is just as motivating to quit. At any rate, here is a sample program I wrote that counts down and ummm... well.. you’ll see. Don't worry; it's not some horrible program.

It was written in C using Borland C++ version 3.1 (1997). Try it out and 'C'.



The program in action...


What's left over when it's done...




#include < stdio.h >
#include < conio.h >
#include < stdlib.h >
#include < dos.h >
main()
{
textbackground(BLACK);
textcolor(LIGHTGRAY);
clrscr();
unsigned bbb;
unsigned aaa,ccc,ddd,eee,fff,yyy;


aaa = 126; bbb = 196; ccc = 157; ddd = 30; eee = 2; fff = 234;

yyy = 177;


textbackground(RED);
textcolor(WHITE);
cputs(" ");
cputs(" ");
gotoxy(1,1);
printf("WARNING: ALL DATA WILL BE ERASED ON THIS DRIVE IN SECONDS!");
gotoxy(1,2);
printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",bbb,bbb,bbb,bbb,bbb,bbb, bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb, bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb, bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb, bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb,bbb);
printf("High Speed Format Start...");
_setcursortype(_NOCURSOR);
int i;
for(i = 9; i >= 0; i--)
{
gotoxy(51,1);
printf("%i ",i);
int ii;
for(ii = 99; ii >= 0; ii--)
{
delay(10);
gotoxy(38,12);
printf("%i.%i",i,ii);
}
delay(20);
}
_setcursortype(_NORMALCURSOR);
printf("\n\n\n\n\n\n\nDeleting...");
delay(500);
{
char *command = "CD\\";
system(command);

}
{
char *command = "DIR/S/B *.";
system(command);

}
// DIR/S/B *.
textbackground(BLACK);
textcolor(LIGHTGRAY);

bbb = 163;
printf("Done\n\n Volume in drive C is SCREWED\n Volume Serial Number is B812-9334\n Directory of C:\\ \n\nfile not found\n\t\t\t%c%c%c%c%c%c%c bytes free\n\nC:\\",yyy,aaa,bbb,ccc,ddd,eee,fff);
int selection, selection1, selection3;
start: ;
getch();

not_ready: ;
printf("\nNot ready reading drive C");
printf("\nAbort, Retry, Fail?");

selection = getche();
if(selection == 97)
{
printf("\n");
printf("invalid fixed disk CODE:072");
f_disk_error1: ;
goto f_disk_error1;
}

if(selection == 65)
{
printf("\n");
printf("invalid fixed disk CODE:072");
f_disk_error: ;
goto f_disk_error;
}
if(selection == 114)
{
goto not_ready;
}
if(selection == 82)
{
goto not_ready;
}

{
char drive_letter, drive_letter1 ;

loop: ;
printf("\nCurrent drive is no longer valid>");
scanf("%s", &drive_letter);


printf("\nNot ready reading drive %s", drive_letter);


printf("\nCurrent drive is no longer valid>");
scanf("%s", &drive_letter1);


printf("\nNot ready reading drive %s", drive_letter1);
goto loop;
}
}





It's not the most efficient code on earth, (not much of my code ever was back then) but it's just something I thought would be entertaining to look at, or laugh at anyway.

Let me know if you've written code that was designed to freak others out. Thanks for reading!

--George

Comments
on Oct 04, 2003
not code, but still funny:

take a screenshot of someone's desktop. move as many of his desktop icons into some non-desktop folder as possible. try and get him to do something on his computer.

for real noobs, take the taskbar's resizing upper edge and drag it down so it's hidden.
on Oct 04, 2003
Ahh very good. I've connected over the network and moved about a thousand files on to the targeted computers desktop. That's a blast to have to clean up.
on Oct 05, 2003
Back in the days of CP/M code was often text based. I often found myself clearing the screen, which I found pretty unhandy. My machine dud have a RAM-disk and my utilities were copied to it. So, I wrote a little program that attached itself to all executables on the RAM disk which would just clear the screen when the program was finished. It also contained an exclusion list. Although it wasn't intended to be destructive, one might call that a virus. The word or concept wasn't even invented yet.
on Oct 06, 2003
wow, that would have been a very useful feature. If I had that program, I would use it for sure! Auto-"CLS" would certainly be useful back in the day.
on Oct 07, 2003
They show this trick on TechTV...
on Oct 07, 2003
I had something whipped up a few days ago. Very lame and very stupid. If you're interested test it out.

http://cobrabytez.cjb.net/me.htm