Bon j'ai regarder quelque tuts sur le forum ai j'ai commencer à coder quelque chose.
LE seul hic c'est que le serveur me return pas mes DEUX set-cookie: seulement 1.
voici mon code
alias tl_login {
sockclose tl
sockopen tl iptorrents.com 80
set %test.login $1
set %test.pwd $2
set %login_tl $+(username=,$1,$chr(38)password=,$2-)
}
on *:sockopen:tl:{
sockwrite -n $sockname POST /takelogin.php HTTP/1.0
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded; charset="utf-8"
sockwrite -n $sockname Content-Length: $len(%login_tl)
sockwrite -n $sockname
sockwrite -n $sockname %login_tl
}
on *:sockread:tl:{
if ($sockerr) {
echo -a Error.
halt
}
else {
var %!
sockread %!
if ( Set-Cookie isin %! ) { set %cookie %! | set %cookie2 $left($gettok(%cookie,2,61),32) }
echo -a IP: %!
unset %!
unset %login_tl
}
}
alias tl_auth {
sockclose tl_auth
sockopen tl_auth iptorrents.com 80
}
on *:sockopen:tl_auth:{
if ($sockerr) {
echo -a Error.
halt
}
else {
sockwrite -n $sockname GET /indexipt.php HTTP/1.1
sockwrite -n $sockname Host: www.iptorrents.com
sockwrite -n $sockname Content-type: text/html
sockwrite -n $sockname Cookie: %test.login $+ ; %cookie2
.sockwrite -n $sockname
}
}
on *:sockread:tl_auth:{
sockread %temp
echo -a TL: %temp
}
quand je me auth sa me return sa
IP: HTTP/1.0 200 OK
IP: Connection: close
IP: X-Powered-By: PHP/5.2.0-8+etch15
IP: Set-Cookie: PHPSESSID=e75bc0d77ee1e26df8aa4801e7e557e5; path=/
IP: Expires: Thu, 19 Nov 1981 08:52:00 GMT
IP: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
IP: Pragma: no-cache
IP: Content-type: text/html
IP: Content-Length: 0
IP: Date: Wed, 23 Sep 2009 03:26:42 GMT
IP: Server: lighttpd/1.4.19
IP:
et quand je veut brower une page et bien sa me return toujours la page de login car mon cookie est pas POST comme du monde je supose...
je crois que le problème vien du captcha :S