Join us at IRC!
Society leans ever heavily on computers, if you have the power to take out computers you can take out society. - cubeman372
Friday, May 25, 2012
Navigation
Members Online
Total Online: 40
Web Spiders: 15
Guests Online: 36
Members Online: 4

Registered Members: 70214
Newest Member: cyrusx
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Page 1 of 2 1 2 >
Author

Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 09-02-09 19:48
Hi all,

I'm currently messing about with cURL and am having a problem with cookie validation. At the moment i am wanting to display HBH as if i went to it direct. So for this i need a valid cookie and user agent right? Any help with why the following code isn't working (i've starred my specific details out)?


<?php
$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, "http://www.hellboundhackers.org/index.php");
curl_setopt($curl, CURLOPT_COOKIE, "PHPSESSID=************; fusion_user=*****.*****************");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_VERBOSE, 1);

$page = curl_exec($curl);
curl_close($curl);
echo $page;
?>


Author

RE: Some cURL help?

GTADarkDude
Member



Posts: 142
Location: The Netherlands
Joined: 23.02.08
Rank:
God
Posted on 09-02-09 20:32
Well I can't directly see a flaw in the scblockedript or anything... You are a 100% certain you have the CURL library installed correctly? If in doubt, check phpinfo().
Please try with an URL like 'http://www.google.com/' and skip the cookie line and see if it that works.


...
- - - -
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 09-02-09 21:05
Yes, defo installed and if i remove the cookie line it does fetch the page but with "please register etc". With the cookie line in i just get a blank page, no error or anything.
Author

RE: Some cURL help?

SySTeM
-=[TheOutlaw]=-

Posts: 1524
Location: England, UK
Joined: 27.07.05
Rank:
The Overlord
Posted on 09-02-09 21:07
Try adding CURLOPT_FOLLOWLOCATION, TRUE




http://www.elites0ft.com/
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 09-02-09 21:46
Its not the cookie ID and i've tried adding that and still no joy system?
Author

RE: Some cURL help?

SySTeM
-=[TheOutlaw]=-

Posts: 1524
Location: England, UK
Joined: 27.07.05
Rank:
The Overlord
Posted on 09-02-09 21:53

<?php
$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, "http://www.hellboundhackers.org/index.php");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_COOKIE, "PHPSESSID=session; fusion_user=id.hash");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11");
curl_setopt($curl, CURLOPT_VERBOSE, 1);

$page = curl_exec($curl);
curl_close($curl);
echo $page;
?>


That works fine for me.




http://www.elites0ft.com/
Author

RE: Some cURL help?

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 09-02-09 22:25
If he is not running it from his computer then he will surely encounter a cookie problem... Because cookies are ip based...
I have the same problem, and I couldn't do the timed challenges here since I can't do it from my computer because of my slow internet connection...


Awesome!
     
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 09-02-09 22:49
Ahhh how stupid of me, no i have been running the scblockedript from my external web server. Thanks for the help guys, ill get php installed on my local and give it a bash.
Author

RE: Some cURL help?

hacker2k
Member

Posts: 126
Location:
Joined: 11.07.07
Rank:
Active User
Posted on 10-02-09 12:09
MrMayhem wrote:
Ahhh how stupid of me, no i have been running the scblockedript from my external web server. Thanks for the help guys, ill get php installed on my local and give it a bash.


You could do that, or you can make your scblockedript login to the server. Not sure if CURL has a Post request function (don't use it), but if it doesn't, here's the rfc that should help:
http://www.w3.org/Protocols/rfc2616/rfc2616.html
Jon_Stockton@hotmail.com http://jonnycake.kicks-ass.net/index.php
Author

RE: Some cURL help?

root_op
Lord Abortion



Posts: 467
Location: Sweden, Lidköping
Joined: 21.03.07
Rank:
God
Posted on 11-02-09 19:58
Easy, just install XAMPP (LAMPP in Linux), enable curl in apache/bin/php.ini and give it a spin on your local machine.


Seriously, do you even care?
root_op.asok@hotmail.com
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 11-02-09 22:56
Yep did that the other day and got a couple of the timed challenges done now!
Author

RE: Some cURL help?

root_op
Lord Abortion



Posts: 467
Location: Sweden, Lidköping
Joined: 21.03.07
Rank:
God
Posted on 12-02-09 21:14
Awesome! Keep it coming^^


Seriously, do you even care?
root_op.asok@hotmail.com
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 13-02-09 00:11
It's actually quite addictive but frustrating at the same time, best way to learn though. And for anyone that says they cant attempt the timed challenges...I only started learning PHP a couple of weeks ago so there's no excuse!
Author

RE: Some cURL help?

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 13-02-09 00:23
No there is an excuse at least for me...
I'm on a 64kbps down and 8kbps up connection...
So what do you expect?!!!


Awesome!
     
Author

RE: Some cURL help?

MrMayhem
Member



Posts: 35
Location: Here, there and everywhere..
Joined: 13.09.08
Rank:
God
Posted on 13-02-09 00:38
Okay okay that's fair enough! But you know what I mean :ninja:
Author

RE: Some cURL help?

spyware
Member



Posts: 4190
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 13-02-09 08:48
454447415244 wrote:
No there is an excuse at least for me...
I'm on a 64kbps down and 8kbps up connection...
So what do you expect?!!!


Get a remote shell. Or, complain :).




"The chowner of property." - Zeph
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
http://bitsofspy.net
Author

RE: Some cURL help?

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 13-02-09 14:58
Hehe, brute forcing the database would be easier! :p
By the way, why the login form is not anti-bots?!
Anyone can try and brute force any account!


Awesome!
     
Author

RE: Some cURL help?

elmiguel
Member



Posts: 132
Location: Your Computer
Joined: 12.12.07
Rank:
God
Posted on 10-08-09 16:23
I decided to try PHP and cURL. I thought it would be good practice to redo the timed challenges. (note: i have completed all but timed 7, almost done.) But, when I try this scblockedript I get a blank page:



<?php

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, "http://www.hellboundhackers.org/challenges/timed/timed1/index.php");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_COOKIE, "PHPSESSID=session; fusion_user=id.hash;");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)");
curl_setopt($curl, CURLOPT_VERBOSE, 1);

$page = curl_exec($curl);
curl_close($curl);

echo $page;
?>




I also tried using fsockopen(). But, it will not insert the fusion_user. It inserts the cookie: PHPSESSID.



<?php
$url = "/challenges/timed/timed1/index.php";
$fp = fsockopen("www.hellboundhackers.org", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET $url HTTP/1.1\r\n";
$out .= "Host: www.hellboundhackers.org\r\n";
$out .= "Cookie: PHPSESSID=session\r\n";
$out .= "Cookie: fusion_user=id.hash\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 1024);
}
fclose($fp);
}
?>







The philosophy of one century is the common sense of the next. -Fortune Cookie

I would like to thank a few friends that I have made here that helped me and deserve to be mentioned:
System_Meltdown, Futility, nvrlivenvrdie, Mastergamer, TrueHacker, S1L3NTKn1GhT, Reelix, ynori7, Demons Halo, kryptor


<script>alert('XSS');</script>
Author

RE: Some cURL help?

korg
Admin from hell



Posts: 1704
Location: ENDING YOUR ONLINE EXPERIENCE!
Joined: 01.01.06
Rank:
The Master
Posted on 10-08-09 19:15
Use:
$page = curl_exec($curl);
echo $page

Your closing curl before it echoes.



I deal in pain, All life I drain, I dominate, I seal your fate.


Author

RE: Some cURL help?

-Kurt-
Member



Posts: 52
Location: 74.64.93.220
Joined: 29.08.06
Rank:
God
Posted on 10-08-09 19:23
korg wrote:
Use:
$page = curl_exec($curl);
echo $page

Your closing curl before it echoes.

Hm, would that really matter though? As long as the call to curl_exec is made before the connection closes, and the return of that gets stored in $page, it shouldn't matter when $page is used, even after curl_close is called. Unless I'm mistaken.

@OP: elmiguel, you don't need the verbose, followlocation, or useragent options for the timed challenges. So I think your problem is how you're sending cookies. The only cookie you need to send is your fusionid. The PHPSESSID (except for Timed 7) and _csuid cookies are unnecessary, so you might as well not include the PHPSESSID cookie in the cookie option.




Edited by -Kurt- on 10-08-09 19:32
inferne@live.com
Page 1 of 2 1 2 >
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.