Chương trình C/C++ hiển thị các file bị ẩn do virus – C/C++ program that shows hidden file by virus

// chuong trinh chuyen doi cac thu muc bi virus bien thanh an (hidden)
// sang dang binh thuong
// Ngay 10/06/2007
// Tac gia: Nguyen Huu Tuan
// De test chuong trinh, copy file .exe vao thu muc nao do
// tao thu muc an bang lenh: attrib +h +r +s <ten thu muc>
// Sau do chay thu chuong trinh
// Chuong trinh duoc dich bang C-Free, DevCpp, Visual C++ 2005

#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>

int main()
{
system(“dir /b /a > list.txt”);
ifstream fi(“list.txt”);
ofstream fo(“done.bat”);
char str[255];
fo << “@echo off” << endl;
while(fi.getline(str,255))
fo << “attrib -a -s -h -r \”” << str << “\”” << endl;
fi.close();
fo.close();
system(“done.bat”);
system(“del done.bat”);
system(“del list.txt”);
return 0;
}

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: