Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on error resume next
- ip = ""
- do
- previp = ip
- with createobject("Microsoft.XMLHttp")
- ' http://v4.ipv6-test.com/api/myip.php
- ' http://api.externalip.net/ip
- .open "POST", "http://api.externalip.net/ip", false
- .send("")
- ip = .responsetext
- end with
- if err.number <> 0 then
- err.clear
- ip = ""
- elseif previp <> ip then
- with createobject("CDO.Message")
- .subject = ""
- .from = "<mailfrom>@mail.ru"
- .to = "<mailto>@yandex.ru"
- .textbody = ip
- with .configuration.fields
- .item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
- .item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.ru"
- .item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
- .item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
- .item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "<mailfrom>@mail.ru"
- .item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "<password>"
- .update
- end with
- .send
- end with
- end if
- wscript.sleep 60000
- loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement