shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] script para validar dados de formularios


From: Silvano B. Dias
Subject: Re: [shell-script] script para validar dados de formularios
Date: Thu, 26 Jun 2003 16:41:29 -0300 (BRT)

Sim, este valor sera sempre aleatorio a cada sessao (login).
O que voce vai fazer eh logar uma vez e usar esse valor para as proximas 
paginas.
Voce pode fazer assim (com uma ajudinha do Thobias no sed):

sid=`lynx -mime_header 
"http://www.site.com.br/login.php?usuario=fulano&senha=12345"; | sed -n 
's/^Set-Cookie: \([^;]*\).*/\1/p'`

(tuda na mesma linha)
Depois eh soh usar a variavel sid nas proximas linhas:

lynx "http://www.site.com.br/home.php?${sid}&var1=value1&var2=value2";

Ok?


-------
Silvano B. Dias



On Fri, 27 Jun 2003, marcelo junior wrote:

> olha, ta retornando o seguinte..
> HTTP/1.1 200 OK
> Server: Microsoft-IIS/5.0
> Date: Thu, 26 Jun 2003 19:06:08 GMT
> Connection: Keep-Alive
> Content-Length: 8419
> Content-Type: text/html
> Expires: Sun, 01 Jun 2003 19:06:09 GMT
> Set-Cookie: ASPSESSIONIDASCQACCC=JIODGIBAJEABEMMCHLIFEDMH; path=/
> Cache-control: private
> 
> Como faco para que ele pegue o valor de set-cookie automaticamente ja que ele 
> é um valor aleatorio???
> 
> 
> captei sim.. mais uma vez muito obrigado a todos!!!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]