Find Real IP Use wget

On 18/07/2012, in Linux, by Specialist

wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’

 

POWERSELL SCRIPT

$realip = (new-object net.webclient).DownloadString(“http://checkip.dyndns.org“)

$realip = $realip.Split(‘:’)[1] $realip = $realip.TrimStart(‘ ‘)

$realip = $realip.Split(‘<‘)[0]

$smtpServer = “smtp.gmail.com”

$smtpPort = 587 $EmailFrom = “gonderen@gmail.com” $EmailTo = “alici@domain.com.tr

$Subject = “Current IP Address”

$Body =  $realip $SMTPServer = “smtp.gmail.com”

$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)

$SMTPClient.EnableSsl = $true

$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“gmail”, “sifre”);

$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

Tagged with:
 

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.

This site uses Akismet to reduce spam. Learn how your comment data is processed.