Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Menu, Tray, Icon, shell32.dll, 138
- #Persistent
- SetTimer, CheckIP, 3000 ; Set a timer that will repeat the label CheckIP every 3 seconds
- sentForDiff := False
- sentForSame := False
- Return
- CheckIP:
- ;GET VPN WAN IP
- UrlDownloadToFile, http://myvps/visitor_ip.php, %A_Temp%\ipcheckvpn
- FileRead, VPNIP, %A_Temp%\ipcheckvpn
- ;GET LOCAL WAN IP
- UrlDownloadToFile, http://myvps/homedomain_ip.php, %A_Temp%\ipcheckwan
- FileRead, WANIP, %A_Temp%\ipcheckwan
- ;COMPARE
- IF (WANIP = VPNIP AND !sentForSame) {
- ; Send Your Email for Same
- Runwait, taskkill /im qbittorrent.exe /f
- Run, c:\swithmail\SwithMail.exe /s /from "myemail@gmail.com" /name "myemail" /pass "password" /server "smtp.gmail.com" /p "587" /SSL /to "mytextemail" /cc "myemailaddress" /sub "VPN TRNT is DOWN" /b "VPN IP: %VPNIP% | WAN IP: %WANIP%"
- sentForSame := True
- sentForDiff := False
- }
- Else IF (WANIP != VPNIP AND !sentForDiff) {
- ; Send Your Email for Different
- Process, Exist, qbittorrent.exe
- {
- If (ErrorLevel = 0) ; If application is NOT running
- {
- Run, "C:\Program Files\qBittorrent\qbittorrent.exe"
- }
- }
- Run, c:\swithmail\SwithMail.exe /s /from "myemail@gmail.com" /name "myemail" /pass "password" /server "smtp.gmail.com" /p "587" /SSL /to "mytextemail" /cc "myemailaddress" /sub "VPN TRNT is UP" /b "VPN IP: %VPNIP% | WAN IP: %WANIP%"
- sentForDiff := True
- sentForSame := False
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement