[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Louco para aprender scripts
From: |
Jose Valdir Gama |
Subject: |
Re: Louco para aprender scripts |
Date: |
Wed, 19 Mar 2008 13:29:37 -0300 |
Na verdade é criado um arquivo ipatual só que neste arquivo tem um monte
de codigo e nada de IP por exemplo:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>What Is My IP Address? - IP Address Lookup, Info, Speed Test, and
more</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Keywords" content="IP, my ip, my ip address, ip address,
address, address translation, proxy, firewall, dhcp, network, games, voice
chat, tutorials, find ip address, ip addres, whats ip, ip find, ipconfig,
ipaddress, ifconfig, bandwidth speed test, bandwidth speedtest, bandwidth,
speed, test, speedtest, router, voip">
<meta name="Description" content="What Is My IP Address? Click Here to
Lookup the IP Address of your computer. We are the fastest and easiest way
to determine your IP Address...">
<meta http-equiv="Pragma" content="no-cache">
<link title="" href="default.css" type="text/css" rel="stylesheet">
<script language="JavaScript" src="default.js"
type="text/javascript"></script>
</head>
<body>
<table class="maintable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head" colspan="3">
<h1>WhatIsMyIP.com</h1>
<h3>The fastest and easiest way to determine your IP
address.</h3>
</td>
</tr>
<tr>
<td colspan="3">
<div id="navmenu">
<ul id="menu">
<li><a href="default.asp" title="IP Address" class="current">IP
Address</a></li>
<li><a href="IP-commands.asp" title="IP Command Lines">IP Command
Lines</a></li>
<li><a href="IP-address.asp" title="IP Addresses Explained">IP
Addresses Explained</a></li>
<li><a href="speedtest/index.asp" title="Speed Test">Speed
Test</a></li>
<li><a href="automation/default.asp"
title="Automation">Automation</a></li>
<li><a href="whatsnew.asp" title="What's new on WhatIsMyIP.com">What's
New</a></li>
</ul>
</div>
</td>
</tr>
Valdir
Abraço
2008/3/19, Jose Valdir Gama <address@hidden>:
>
> Amigos estou tentando entender o script abaixo pego na net para localizar
> o IP da Net, mas não está dando certo, verifiquei os arquivos criados
> depois de sido executados o script e não tem nenhum conteudo e recebo o
> e-mail sem informação de do IP.
>
> O que tem de errado no script?
>
> Pegar IP via site: http://whatismyip.com
>
> #!/bin/bash
> cd /tmp
> ARQUIVOIP=`cat /tmp/iparquivo`
> wget http://whatismyip.com/ -q -O ipatual
> cat ipatual | grep "<TITLE" | awk {'print $3'} > /tmp/ipatual.txt
> IPATUAL=`cat /tmp/ipatual.txt`
> # comparar IP atual com iparquivo
> echo $IPATUAL
> echo $ARQUIVOIP
> if [ $IPATUAL != $ARQUIVOIP ]
> then
> echo $IPATUAL
> # enviar e-mail
> DESTINATARIO="address@hidden"
> ASSUNTO="Novo IP de .."
> MENSAGEM="Novo IP $IPATUAL"
> echo "$MENSAGEM" | mail -s "$ASSUNTO" "$DESTINATARIO"
> echo $IPATUAL > /tmp/iparquivo
> fi
>
>
> --
> Sumare- SP
> jgamasystem - Linux a toda Prova
>
--
Sumare- SP
jgamasystem - Linux a toda Prova
[As partes desta mensagem que não continham texto foram removidas]