alias Priberam {
SockClose Priberam*
SockOpen PriberamGetCookie www.priberam.pt 80
}
on *:SockOpen:Priberam*: {
var %SockSend SockWrite -n $SockName
if ( $SockName == PriberamGetCookie ) {
%SockSend GET /dlpo/dlpo.aspx HTTP/1.1
}
%SockSend Host: www.priberam.pt
%SockSend User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
%SockSend Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
%SockSend Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3
%SockSend Accept-Encoding: gzip,deflate
%SockSend Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
%SockSend Keep-Alive: 300
%SockSend Connection: keep-alive
%SockSend $crlf $crlf
}
on *:SockRead:Priberam*: {
var %SockRead
SockRead %SockRead
if ( %SockRead != $null ) {
echo -s %SockRead
}
if ( %SockRead == $null ) {
echo -s $chr(160)
}
}