Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #SingleInstance Ignore
- SendMode "Input"
- SetWorkingDir A_ScriptDir
- SetKeyDelay 0
- SetWinDelay 0
- SetControlDelay 0
- SetTitleMatchMode(2)
- if !A_IsAdmin {
- try {
- Run('*RunAs "' A_ScriptFullPath '"')
- } catch {
- MsgBox "This script requires administrator privileges! Please run it again with the correct privileges.", "Error", 48
- }
- ExitApp()
- }
- OnExit(AppExit)
- <^F9:: {
- RunWait('netsh advfirewall firewall add rule name="123456" dir=out action=block remoteip="192.81.241.171"', , 'Hide')
- ToolTip("NO SAVING MODE ON", 10, 10)
- Sleep 3000
- ToolTip("NO SAVING MODE ON", 10, 10)
- }
- <^F12:: {
- RunWait('netsh advfirewall firewall delete rule name="123456"', , 'Hide')
- ToolTip("NO SAVING MODE OFF", 10, 10)
- Sleep 3000
- ToolTip("")
- }
- AppExit(*) {
- RunWait('netsh advfirewall firewall delete rule name="123456"', , 'Hide')
- }
Advertisement
Add Comment
Please, Sign In to add comment