Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-21-2005, 05:12
sgdt
 
Posts: n/a
Have a look at
Code:
HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile
in the keys
Code:
AuthorizedApplications\List
and
Code:
GloballyOpenPorts\List
Using "GetModuleFileName", "RegCreateKey", "RegSetValueEx", and "RegCloseKey", you can add yourself to the Approved list. Do this before creating your socket to avoid your program from being suspended.

I've found that even with your application name in AuthorizedApplications, the program will still be suspended if you do UDP broadcasting, that's why I also mentioned GloballyOpenPorts.

Format of the keys are (for AuthorizedApplications):
Code:
	int nValueLen = wsprintf( szRegValue, "%s:*:Enabled:%s", szFileName, szProgBaseName );
	RegSetValueEx( hKey, szFileName, 0, REG_SZ, (PBYTE) szRegValue, nValueLen );
and (for GloballyOpenPorts):
Code:
	const char* szEnableMe = "1234:UDP:*:Enabled:Happy Program";
	RegSetValueEx( hKey, "1234:UDP", 0, REG_SZ, (PBYTE) szEnableMe, strlen(szEnableMe) );
(where 1234 is the port, and "Happy Program" is the program wanting to use it).

If your program will always be at a specified location, you can even use a .REG file.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP Key Generation Source Code blue_devil Source Code 1 05-29-2023 03:54
Windows debugger that can run code on breakpoint? jonwil Community Tools 5 01-17-2022 21:28
(Q) .NET App Source Code Protection (Silverlight, Windows Phone, Windows 8) delidolunet General Discussion 7 08-02-2013 10:33


All times are GMT +8. The time now is 15:22.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )