help about this ... :D [C++]

Hi Guys,

I want make something like virus

make hidden folders and files for me

i write this code but dont work [C++]

help me plz
-----------------------------

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int a;
cout <<"\n Enter 1:";
cin >>a;
if (a==1) {
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("cd..");
system("attrib +h +s /s /d");
system("d:");
system("attrib +h +s /s /d");
cout <<"\n Fuck";
cout <<"\n ";
}
system("PAUSE");
return EXIT_SUCCESS;
}

----------------------------
What?
sry my English language is not good
look i want make something for make hidden folders and files in drive c , d

some one help plz :D
If your doing this on windows, there is an entire api sub set for manipulating files and directories above the native things in c++. You wouldn't use the system command for this. Linux should have a similar api. Doing these things aren't native to c++ they are extensions to it by the operating systems api.
closed account (zb0S216C)
Did you seriously start a thread so you could ask how to make a virus? Honestly, that's just stupid. Besides, viruses are usually malicious and destructive; your code isn't either of them. Not only that, the target's AV will detect the heavy use of system( ) and mark it a untrusted.

A real malicious program would be a root-kit. Either way, Azagaros has the right idea.

Wazzak
Why do you make a silly virus? Hidding all files and folders... If you want to make a virus go another site...
To really hide a file from all programs use a kernel mode driver. There is a working sample in codeproject website which can hide files and folders, also hide running processes from task manager. Don't remember the link right now ...
closed account (1vRz3TCk)
Did you seriously start a thread so you could ask how to make a virus? Honestly, that's just stupid. Besides, viruses are usually malicious and destructive; your code isn't either of them.
For me the important part of being classed as a virus is the way it self replicates. A virus is a specific type of malware and is distinct from worms, Trojan horses, rootkits, spyware and other malware.
@ OP: Due to Lines 10 and 11 this is technically a logic bomb, a poor example of one for sure but that's the closest malware description that this fits. The use of "cd" and "attrib" makes this specific to windows so since you already know the syntax why wouldn't you just use a batch file? The profanity is uncalled for, please refrain from doing this in the future.
Last edited on
Topic archived. No new replies allowed.