cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl command line and login to phpbb forum

From: Oren Amsalem <oren_amsalem1_at_hotmail.com>
Date: Wed, 23 Jul 2008 12:24:33 +0300

I cant mange to log in to forum with curl command line...
I'm really in the dark here..
I'm tring to log in a phpbb forum and i cant manage to make it work.
i used some variation of curl...
the best i got is that it say i use te wrong username and password...
curl -d -k username=no_alone -d password=***** -d redirect= -d login=Log+in http://forumlink/login.php

any help?

I used http live header to get the respond i use when i log-in and this is what i got
********************************************************************************************
http://link/login.php

POST /login.php HTTP/1.1
Host: link.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; he; rv:1.9.0.1) Gecko/2008070208 Firefox/2.0.0.14;MEGAUPLOAD 1.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: he,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1255,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://link/login.php
Cookie: __utma=121132809.116931300.1216799770.1216799770.1216804449.2; __utmz=121132809.1216799770.1.1.utmccn=(referral)|utmcsr=hornywhores.net|utmcct=/rose-ryder-limo-bimbos-2/|utmcmd=referral; __utmc=121132809; phpbb2mysql_t=a%3A2%3A%7Bi%3A5745%3Bi%3A1216799845%3Bi%3A20715%3Bi%3A1216800237%3B%7D; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D; phpbb2mysql_sid=dbbb779f7ae6412c18023ba6d73940a2; __utmb=121132809
Content-Type: application/x-www-form-urlencoded
Content-Length: 56
username=no_alone&password=****&redirect=&login=Log+in
HTTP/1.x 302 Found
Date: Wed, 23 Jul 2008 09:14:04 GMT
Server: Apache
X-Powered-By: PHP/5.2.0-8+etch11
Set-Cookie: phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A4%3A%226781%22%3B%7D; expires=Thu, 23-Jul-2009 09:14:04 GMT; path=/
Set-Cookie: phpbb2mysql_sid=dbbb779f7ae6412c18023ba6d73940a2; path=/
Location: http://link/index.php?sid=dbbb779f7ae6412c18023ba6d73940a2
Content-Length: 0
Keep-Alive: timeout=15, max=299
Connection: Keep-Alive
Content-Type: text/html
***********************************************************************************************

the log-in source look like that...

****************************************
<form action="login.php" method="post" target="_top">
<th height="25" class="thHead" nowrap="nowrap">Please enter your username and password to log in.</th>
<td width="45%" align="right"><span class="gen">Username:</span></td>
 <input type="text" class="post" name="username" size="25" maxlength="40" value="" />
<td align="right"><span class="gen">Password:</span></td>
 <input type="password" class="post" name="password" size="25" maxlength="32" />
********************************

Thanks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-23