0% found this document useful (0 votes)
38 views2 pages

Block and Unblock Applications in Firewall

The document contains two functions, FakeLagOn and FakeLagOff, which manipulate Windows Firewall rules to block and unblock specific applications related to BlueStacks and SmartGaGa. FakeLagOn adds firewall rules to block incoming and outgoing traffic for these applications, while FakeLagOff removes those rules. Additionally, both functions trigger a notification indicating the status of the 'Fake Lag' feature.

Uploaded by

rodrigomattos580
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Block and Unblock Applications in Firewall

The document contains two functions, FakeLagOn and FakeLagOff, which manipulate Windows Firewall rules to block and unblock specific applications related to BlueStacks and SmartGaGa. FakeLagOn adds firewall rules to block incoming and outgoing traffic for these applications, while FakeLagOff removes those rules. Additionally, both functions trigger a notification indicating the status of the 'Fake Lag' feature.

Uploaded by

rodrigomattos580
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

void FakeLagOn()

{
WinExec("netsh advfirewall firewall add rule name=\"FF Block In1\" dir=in
action=block program=\"%ProgramFiles%\\BlueStacks_nxt\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In1\" dir=out
action=block program=\"%ProgramFiles%\\Bluestacks_nxt\\[Link]\"", SW_HIDE);

WinExec("netsh advfirewall firewall add rule name=\"FF Block In2\" dir=in


action=block program=\"%ProgramFiles%\\BlueStacks\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In2\" dir=out
action=block program=\"%ProgramFiles%\\Bluestacks\\[Link]\"", SW_HIDE);

WinExec("netsh advfirewall firewall add rule name=\"FF Block In3\" dir=in


action=block program=\"%ProgramFiles%\\BlueStacks_msi2\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In3\" dir=out
action=block program=\"%ProgramFiles%\\Bluestacks_msi2\\[Link]\"",
SW_HIDE);;

WinExec("netsh advfirewall firewall add rule name=\"FF Block In6\" dir=in


action=block program=\"%ProgramFiles%\\BlueStacks_msi5\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In6\" dir=out
action=block program=\"%ProgramFiles%\\BlueStacks_msi5\\[Link]\"",
SW_HIDE);;

WinExec("netsh advfirewall firewall add rule name=\"FF Block In4\" dir=in


action=block program=\"%ProgramData%\\BlueStacks_msi5\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In4\" dir=out
action=block program=\"%ProgramData%\\Bluestacks_msi5\\[Link]\"", SW_HIDE);

WinExec("netsh advfirewall firewall add rule name=\"FF Block In5\" dir=in


action=block program=\"%ProgramFiles(x86)%\\SmartGaGa\\ProjectTitan\\Engine\\
[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall add rule name=\"FF Block In5\" dir=out
action=block program=\"%ProgramFiles(x86)%\\SmartGaGa\\ProjectTitan\\Engine\\
[Link]\"", SW_HIDE);

[Link]("Notification", "Fake Lag : Held",


main_color);

};

void FakeLagOff()
{
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramFiles%\\BlueStacks_nxt\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramFiles%\\BlueStacks\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramFiles%\\BlueStacks_msi2\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramFiles%\\BlueStacks_msi5\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramData%\\BlueStacks_msi5\\[Link]\"", SW_HIDE);
WinExec("netsh advfirewall firewall delete rule name=all
program=\"%ProgramFiles(x86)%\\SmartGaGa\\ProjectTitan\\Engine\\
[Link]\"", SW_HIDE);
[Link]("Notification", "Fake Lag : Released",
main_color);

};

You might also like