View Full Version: Fake Program I NEED HELP

C++ Learning Community > C++ Works in Progress > Fake Program I NEED HELP


Title: Fake Program I NEED HELP


Rmstn1580 - December 6, 2005 01:00 AM (GMT)
I need your input! I'm bored as hell and for the past 2 hours I have been listing almost all the files in the system (Not in the subfolders). I need some help on what to put in my fake "Virus Scanner". I need options! So far, all I have is "Program Information", "Scan D" and "Scan C". I could use some ideas please! Nothing too advanced, I'm still kind of a beginner.

tubapro12 - December 6, 2005 03:08 AM (GMT)
making it say its deleting stuff, and if you're using windows, use the "fullscreen" function for extra effect...

CODE

void fullscreen() {
 keybd_event(VK_MENU, 0x38, 0, 0);
 keybd_event(VK_RETURN, 0x1c, 0, 0);
 keybd_event(VK_RETURN, 0x1c, KEYEVENTF_KEYUP, 0);
 keybd_event(VK_MENU, 0x38, KEYEVENTF_KEYUP, 0);
 return;
}


if you don't want to have explore too deeply into the folders try
CODE
cout << "deleting..." << end;
system("tree " + somefoldernameinacstring);


obviously i've thought about this before. ;)

Rmstn1580 - December 6, 2005 03:20 AM (GMT)
Nooo... I'm making a fake virus SCANNER and when it's done scanning it says "Fatal system error!" and "Viruses Found: 1543"


tubapro12 - December 6, 2005 03:26 AM (GMT)
ah....

well then, here's an easier solution. ;)

system("tree C:\");

and for multiple drives (for example a drive E) you can use system("tree E:\");

how you get the drives from the user into the cstring i'll leave to you.

ih8censorship - December 6, 2005 03:26 AM (GMT)
lol make the fake number 1337 instead... :D

Rmstn1580 - December 6, 2005 03:29 AM (GMT)
CODE
system("tree");
???? tubapro12??? I don't get that command.... Deeper explanation please? And no ih8censorship, no 1337.... because I am not a hacker OR a l337 hacker. Sorry :)

KTC - December 7, 2005 02:33 AM (GMT)
QUOTE (Rmstn1580 @ Dec 6 2005, 03:29 AM)
CODE
system("tree");
???? tubapro12??? I don't get that command.... Deeper explanation please?

system( char *) pass the char* string stright to the underlying OS to execute. In windows console, "tree STARTING_LOCATION" will cause it to print out in tree diagram form the directory & all its subdirectory (& its subdirectory etc. etc.)

Try typing it into a Command Prompt and you'll see.

Rmstn1580 - December 7, 2005 03:18 AM (GMT)
Hmm I see. Thanks!

deadimp - December 8, 2005 02:05 AM (GMT)
If you, for some reason, want to be able to scan the directory yourself (so you have access to names and such), you can use the DIR functions found in <dirent.h> and <sys/stat.h> (I think).
For a simple directory scanning funcion, I used struct: DIR, dirent, struct stat; functions: opendir(...), readdir(...), stat(...); and macro: S_ISDIR(...);
Google 'em if you want. I can also post the code for the ScanDir(...) function I made, but it's a total of 128 lines in 2 files (CPP and H).

Rmstn1580 - December 8, 2005 03:09 AM (GMT)
Hmm I see...... Well thanks for the help deadimp




Hosted for free by InvisionFree