Won't post the socket client, you all should probably have one. As the title implies, it creates Gaiaonline accounts without worrying about the captcha. Don't share outside of the LG, don't use on any public programs.PHP Code:
function create_account($Username, $Password, $Email, $DOB)
{
$dob = urlencode($DOB);
// Encode the email
$EncodedEmail = urlencode($Email);
$EncodedEmail = str_replace('.', '%2E', $EncodedEmail);
$html = $this->httpClient->HTTPRequest('GET', 'http://www.gaiaonline.com/gapi/rest/registration/initialize?t=875', null, array(), false);
$Vals = unserialize($html);
$Nonce = $Vals['n'];
// fls
$html = $this->httpClient->HTTPRequest('GET', 'http://www.gaiaonline.com/internal/fls_t.php?fid=1202&cls=reg.gaia.picker&tm=' . time() . rand(200,300), null);
$html = $this->httpClient->HTTPRequest('GET', 'http://www.gaiaonline.com/internal/fls_t.php?fid=1202&cls=reg.gaia.nocaptcha&tm=' . time() . rand(300,400), null);
// Set avatar
$html = $this->httpClient->HTTPRequest('POST', 'http://www.gaiaonline.com/gapi/rest/registration/setavatar?', 'mouth=18349&gender=m&eyes=18535&base=10016&n=' . str_replace('.', '%2E', $Nonce) . '&hair=19129&outfit=21061', array('Referer' => 'http://s.cdn.gaiaonline.com/images/Gaia_Flash/registration/uiRegistration.swf?version=40'));
$Hash = md5($Nonce . '8elly8eansvryhngry');
$URL = 'http://www.gaiaonline.com/gapi/rest/registration/setuserinfo?';
$Post = 'email%5Falert=0&password%5Fconfirm=' . $Password . '&n=' . str_replace('.', '%2E', $Nonce) . '&password=' . $Password . '&accept%5Ftos=1&fb%5Fuid=&email=' . $EncodedEmail . '&hash=' . $Hash . '&username=' . $Username . '&dob=' . $dob . '&fb%5Fsessionkey=&recaptcha%5Fresponse%5Ffield=bypass';
$html = $this->httpClient->HTTPRequest('POST', $URL, $Post, array('Referer' => 'http://s.cdn.gaiaonline.com/images/Gaia_Flash/registration/uiRegistration.swf?version=40'), false);
$Html = $this->httpClient->HTTPRequest('POST', 'http://avatarsave.gaiaonline.com/gapi/rest/registration/createaccount?fb_sessionkey=&fb_uid=&n=' . $Nonce, null);
if($html == 'b:1;') return true;
else return false;
}
Do not use in programs for UG Bronze and below. Longer this stays private, longer it will last. Only use in UG Silver or private programs
---
Edit: also, if you auto verify the accounts you can make some decent spammers (at least PM spammers). Protip: use the GMail dot trick to register all accounts with the same email (example source below). Then, enable your gmail account for POP access, and simply connect and retrieve the latest mails.
Example: generate a different email each time.
I used a publicly available POP3 email class in PHP to retrieve emails. My verification function was then:PHP Code:
$User = explode("@", $Email);
$New = null;
// Gmail dot trick
if(strtolower($User[1]) == 'gmail.com')
{
for($x = 0; $x < strlen($User[0]); $x++)
{
$New .= $User[0][$x];
if($x != (strlen($User[0]) - 1))
for($y = 0; $y < rand(3,6); $y++)
$New .= '.';
}
} else $New = $User[0];
// Encode the email
$EncodedEmail = urlencode($New . '@' . $User[1]);
$EncodedEmail = str_replace('.', '%2E', $EncodedEmail);
PHP Code:
// Verify the account
function Verify($Username)
{
include_once("includes/pop3.php");
$pop3 = new POP3();
$pop3->pUSERPASS('username@gmail.com','password');
if($pop3->error){echo 'ERROR: '.$pop3->error; exit(0); }
$messages = $pop3->pLIST();
$URL = null;
for($x = 1; $x < count($messages); $x++)
{
$Message = $pop3->pRETR(count($messages) - $x + 1);
if(stripos($Message, $Username) <> 0)
{
if(stripos($Message, 'gaiaonline.com/account/activate/') <> 0)
{
$tmp = explode("\n", $Message);
foreach($tmp as $Line)
{
if(stripos($Line, 'gaiaonline.com/account/activate/') <> 0)
{
$URL = str_replace(array(" ", "\n", "\r", "\r\n"), null, $Line);
break;
}
}
}
}
}
if($URL != null) return $URL;
else return 'Error';
$pop3->pQUIT();
}
Results 1 to 7 of 7
- 20 Feb. 2010 12:53am #1
Gaiaonline - Register account w/o captcha
- 21 Feb. 2010 12:37am #2
Thanks, ima use this to teach my buddy php.
(he is one of the other programmers on the programming team for robotics. Its me and him. BTW, ill release the source to you guys if you want it after our competition. And ima try and set up a live feed directly from the camera mounted on the robot itself and have a live feed from the camera on the laptop we are using as the driver station. So you can see both the people driving (most likely me and eric at this point) and where we are and what we are doing on the field)
- 21 Feb. 2010 02:43am #3
Modified http socket class.
PHP Code:<?php
/**
* Class for sending HTTP Requests using raw sockets
*
* This class compiles HTTP Requests and use's raw sockets
* to interact with the given server. Upon recieving data
* it uses RegEx to parse the header information and any
* given cookie data.
*
* @author Joshua Gilman
* @package httpClient
*/
class httpClient
{
public $error = array();
public $last_error = NULL;
public $headers = array();
public $cookie = NULL;
public $cookies = array();
public $Debug = false;
public $header = NULL;
public $content = NULL;
private $socket = NULL;
private $host = NULL;
private $numerical_host = NULL;
private $path = NULL;
private $port = NULL;
protected $newline = "\r\n";
protected $connection = "tcp";
protected $service = "www";
/**
* Sends an HTTP Request and returns the content
*
* This function will send an HTTP Request using the specified
* url as you would a web browser. A type ("GET" or "POST") and
* a valid URL is mandatory. Upon recieving a response it will
* remove and parse the headers and return the content.
*
* @var String $HTTP_TYPE
* @var String $webURL
* @var Mixed $HTTPPostVars
* @var Mixed $headers
*
* @return String The returned HTTP response with stripped header
*/
function Between($string,$start,$end)
{
if (! strpos($string, $start) || ! strpos($string, $end)) {
return false;
}
$strStart = strpos($string,$start) + strlen($start);
$string2=substr($string,$strStart);
$strEnd = strpos($string2,$end);
$strTemp = substr($string2,$strEnd);
$string=str_replace($strTemp,null,$string);
return substr($string,$strStart,$strEnd);
}
public function HTTPRequest($HTTP_Type, $webURL, $HTTPPostVars='', $headers = array(), $full = true)
{
$this->new_socket();
$this->content = "";
list($host, $path) = $this->url_details($webURL);
$this->host = $host;
$this->numerical_host = $this->get_numerical_host();
$this->path = $path;
$this->port = $this->get_port();
$this->connect($this->host, $this->port);
$header = $this->assemble_header($HTTP_Type, $this->host, $this->path, $HTTPPostVars, $headers);
socket_write($this->socket, $header, strlen($header));
$this->read_socket();
$this->parse_header();
$aheader = null;
foreach($this->headers as $ide => $val)
{
$aheader .= $ide.": ".$val."\r\n";
}
#print_r($this->headers);
if (array_key_exists('Content-Encoding', $this->headers) && $this->headers['Content-Encoding'] == "gzip")
{
$this->content = gzinflate(substr($this->content, 10));
}
if($full == true) $this->content=$aheader.$this->content;
if($this->Debug == true)
{
$file = 'C:\server\private\multiBot\incoming.txt';
if(file_exists($file))
{
$val = file_get_contents($file);
$val .= "\r\n\r\n-----\r\n\r\n" . $this->content;
file_put_contents($file, $val);
}
}
return $this->content;
}
/**
* Logs an error and throws an exception
*
* This function uses an error string to log an error
* and throw a new exception. When using this class
* always include it in a try/catch statement.
*
* @var String $error_string
*/
private function new_error($error_string)
{
$this->error[] = $error_string;
$this->last_error = $error_string;
throw new Exception("Socket Error: " . $error_string);
}
/**
* Creates a new TCP socket using some default values
*
* This function creates and sets the class socket to
* be used when sending and reading data from and to
* the socket stream.
*/
private function new_socket()
{
$this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if (!$this->socket)
{
$this->new_error(socket_strerror($this->socket));
}
}
/**
* Returns the default service port for the requested service
*
* This function uses the assigned settings for the service
* and connection type to grab the default port for the settings
*
* @return Integer
*/
private function get_port()
{
return $service_port = getservbyname($this->service, $this->connection);
}
/**
* Returns the IP of the given host name
*
* This function takes a host name and returns the
* numerical IP related to the host name.
*
* @return String
*/
private function get_numerical_host()
{
return gethostbyname($this->host);
}
/**
* Connects the already created class socket
*
* This function connects the socket using the
* already set host and port details. Throws an
* exception when the connection fails.
*/
private function connect()
{
if (!($result = socket_connect($this->socket, $this->numerical_host, $this->port)))
{
$this->new_error(socket_strerror($result));
}
}
/**
* Assembles an HTTP Header
*
* This function is used to create an HTTP Header using
* some minor details. Default values are given to the
* common HTTP values but can be overriden by refferencing
* them in the $headers variable.
*
* @param String $HTTP_Type
* @param String $host
* @param String $path
* @param Mixed $HTTPPostVars
* @param Mixed $headers
*
* @return String
*/
private function assemble_header($HTTP_Type, $host, $path, $HTTPPostVars, $headers)
{
$HTTP_Type = strtoupper($HTTP_Type);
$cookie_str = null;
$header = "{$HTTP_Type} {$path} HTTP/1.1\r\n";
$header .= "Host: " . $host . "\r\n";
$params['User-Agent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
$params['Accept'] = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$params['Accept-Language'] = "en-us,en;q=0.5";
$params['Accept-Encoding'] = "gzip,deflate";
$params['Accept-Charset'] = "ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$params['Keep-Alive'] = "300";
$params['Connection'] = "Close";
if (sizeof($headers) >= 1)
{
$params = array_merge($params, $headers);
}
foreach ($params as $key => $value)
{
$header .= "{$key}: {$value}\r\n";
}
if (!empty($this->cookie))
{
$header .= "Cookie: " . $this->cookie . "\r\n";
} elseif (sizeof($this->cookies > 1)) {
foreach ($this->cookies as $key => $value)
{
$cookie_str .= "$key=$value;";
}
$header .= "Cookie: " . $cookie_str . "\r\n";
}
if ($HTTP_Type == "POST")
{
$postData = $HTTPPostVars;
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($postData) . "\r\n\r\n";
$header .= $postData;
} else {
$header .= "\r\n";
}
if($this->Debug == true)
{
$file = 'C:\server\private\multiBot\outgoing.txt';
if(file_exists($file))
{
$val = file_get_contents($file);
$val .= "\r\n\r\n-----\r\n\r\n" . $header;
file_put_contents($file, $val);
}
}
return $header;
}
/**
* Parses the returned HTTP Header
*
* This function parses the returned HTTP Header into
* logical parts using an array. Each value is parsed
* and loaded into the $headers array
*/
private function parse_header()
{
$parts = explode($this->newline . $this->newline, $this->content);
$this->header = array_shift($parts);
$this->content = implode($parts, $this->newline . $this->newline);
$parts = explode($this->newline, $this->header);
foreach ($parts as $part)
{
if (preg_match("/(.*)\: (.*)/", $part, $matches))
{
$this->headers[$matches[1]] = $matches[2];
}
}
if (strpos($this->header, "Set-Cookie"))
{
$this->parse_cookies();
}
}
/**
* Parses the cookies from the HTTP Header
*
* This function uses RegEx to parse all cookies
* from the HTTP header and load them into an
* associative array with the cookie name as the
* key and the cookie value as the value
*/
private function parse_cookies()
{
$lines = explode($this->newline, $this->header);
foreach ($lines as $line)
{
if (preg_match("/Set-Cookie: (.+?)=(.+?);/", $line, $matches))
{
$this->cookies[$matches[1]] = $matches[2];
}
}
}
/**
* Reads all data from the socket
*
* This reads all the returned data off of
* the socket stream and returns it in one
* string
*
* @return String
*/
private function read_socket()
{
while ($buffer = socket_read($this->socket, 2048))
{
$this->content .= $buffer;
}
socket_close($this->socket);
return $this->content;
}
/**
* Parses a URL into a host and a path
*
* This function uses RegEx to parse the host
* and the path from a URL. Returns the host
* and path in an array.
*
* @param String $url
*
* @return Mixed
*/
private function url_details($url)
{
$url = str_replace("http://", "", $url);
$host = preg_replace("/\/.*/", "", $url);
$path = str_replace($host, "", $url);
return array($host, $path);
}
}
?>
- 22 Feb. 2010 02:48am #4
- 24 Feb. 2010 04:27pm #5
- 25 Feb. 2010 01:55am #6
I think it was just called pop3 at phpclasses.
edit: may aswell just post it.
PHP Code:<?php
class POP3
{
public $host = 'pop.gmail.com';
public $port = 110;
public $timeout = 10;
public $error = null;
private $fd = null;
public function __construct()
{
$this->fd = fsockopen($this->host,$this->port,$errno,$errstr,$this->timeout);
stream_set_blocking($this->fd,true);
if( $errno )
{
echo 'Error: '.$errno.': '.$errstr;
exit(1);
}
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
}
}
private function _write($cmd)
{
fwrite($this->fd,$cmd."\r\n");
}
private function _read($stream=false)
{
$retval = null;
if( ! $stream )
{
$retval = fgets($this->fd,1024);
//$retval = preg_replace("/\r?\n/","\r\n",$retval);
} else {
while( ! feof($this->fd) )
{
$tmp = fgets($this->fd,1024);
//$tmp = preg_replace("/\r?\n/","\r\n",$tmp);
if( chop($tmp) == '.') break;
$retval .= $tmp;
}
}
return $retval;
}
private function _check($msg)
{
$stat = substr($msg,0,strpos($msg,' '));
if($stat == '-ERR') return false;
//if($stat == '+OK') return true;
return true;
}
//login to server
public function pUSERPASS($user, $password)
{
$this->_write('USER '.$user);
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
$this->_write('PASS '.$password);
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
return true;
}
public function pSTAT()
{
$retval = null;
$this->_write('STAT');
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
list(,$retval['number'],$retval['size']) = split(' ',$msg);
return $retval;
}
//list messages on server
public function pLIST()
{
$this->_write('LIST');
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
$msg = explode("\n",$this->_read(true));
for($x = 0; $x < sizeof($msg); $x++ )
{
$tmp = explode(' ',$msg[$x]);
if(isset($tmp[1])) $retval[$tmp[0]] = $tmp[1];
}
unset($retval['']);
return $retval;
}
//retrive a message from server
public function pRETR($num)
{
$this->_write('RETR '.$num);
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
$msg = $this->_read(true);
return $msg;
}
//marks a message deletion from the server
//it is not actually deleted until the QUIT command is issued.
//If you lose the connection to the mail server before issuing
//the QUIT command, the server should not delete any messages
public function pDELE($num)
{
$this->_write('DELE '.$num);
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
$this->_write('QUIT');
return false;
}
}
//This resets (unmarks) any messages previously marked for deletion in this session
//so that the QUIT command will not delete them
public function pRSET()
{
$this->_write('RSET');
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
return false;
}
}
//This deletes any messages marked for deletion, and then logs you off of the mail server.
//This is the last command to use. This does not disconnect you from the ISP, just the mailbox.
public function pQUIT()
{
$this->_write('QUIT');
$msg = $this->_read();
if( ! $this->_check($msg) )
{
$this->error = $msg;
return false;
}
}
public function __destruct()
{
fclose($this->fd);
}
}
?>
- 25 Feb. 2010 03:29am #7