Page 1 of 1

Cookies/Sessions

Posted: Wed Jun 15, 2005 4:35 am
by William
Dear All,

I was wondering if it was possible to use PHP and login to another site and it installs cookies/sessions on the php script and lets it stay loggedin to get data. Basicly a way the PHP can parse a page that you have to be loggedin to see it.

Posted: Wed Jun 15, 2005 4:42 am
by Syranide
Of coarse it is possible, however, doing it from scratch is very tedious, I'm not really sure, but I think Curl (cUrl?) is capable of keeping track of sessions, cookies etc for such things.

If Curl is not what you are looking for (or possible solution) then I am most positively certain that such a project already exists on the internet which can accomplish this.

Posted: Wed Jun 15, 2005 4:47 am
by William
Awsome thank you very much, I play online MMORPG's and I wanted to try to make a PHP file that actaully had maby a iframe of some sorte with the site on it. and at the top of my iframe it had tons of features
to do things on the site, any exploits .ect it could do. Basicly like a cheat. Thanks alot :D

Posted: Wed Jun 15, 2005 4:50 am
by Syranide
hehe be careful though, I bet cheating goes under same "law" as exploiting a website/webserver. (if you intend to keep it public)

Posted: Wed Jun 15, 2005 4:51 am
by William
Yeah it does :P, But it will be fun anyways :D, I have been banned from this 1 game so many times :P

Posted: Wed Jun 15, 2005 5:09 am
by malcolmboston
The Hidden Viper wrote:Awsome thank you very much, I play online MMORPG's and I wanted to try to make a PHP file that actaully had maby a iframe of some sorte with the site on it. and at the top of my iframe it had tons of features
to do things on the site, any exploits .ect it could do. Basicly like a cheat. Thanks alot :D
exploits? like what?

you could find yourself in serious trouble, 99.999% of EULA's have this covered, and believe me, they can take you 'to the full extent of the law'

Posted: Wed Jun 15, 2005 5:12 am
by William

Code: Select all

<?php

########################
# ********** Hack v1.0
########################
$domain = "**********.***";
$username = "iamcool";
$password = "bVVStkMnS4";
$params = "uid=" . $username . "&pword=" . $password;

$socket = fsockopen($domain,80);
fputs($socket,"POST login_scripts/login.php HTTP/1.1\r\n");
fputs($socket,"Referer: BH\r\n");
fputs($socket,"Host: Host\r\n");
fputs($socket,"Accept: text/html\r\n");
fputs($socket,"User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n");
fputs($socket,"Content-type: application/x-www-form-urlencoded\r\n");
fputs($socket,"Content-length: " . $params . "\r\n");
fputs($socket,"Connection: Close\r\n");
fputs($socket,"\r\n");
fputs($socket,$variables."\r\n");
 
 
 
while(!feof($socket)){
    $a = fgets($socket,256);
    if ($a){
        echo $a."<br>";
    }
}

?>
Is the script that I have currently instead of curl. It seems to get a bad request. Any ideas?