main #6
7
home.php
7
home.php
|
@ -56,6 +56,13 @@ echo '
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li id="dashboard-TW">
|
||||
<a href="/ipns/'. $_SESSION['player_ipns'].'">
|
||||
<span>
|
||||
TW
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class ErrorsHandler {
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>'. _('Erreur critique') . '</title>
|
||||
<title>'. ('Erreur critique') . '</title>
|
||||
|
||||
<style>
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
class Fred {
|
||||
|
||||
private $gatewayProtocol = 'http';
|
||||
private $gatewayProtocol = 'https';
|
||||
|
||||
private $gatewayDomain = 'libra.copylaradio.com';
|
||||
private $gatewayDomain = 'astroport.copylaradio.com';
|
||||
|
||||
private $gatewayPort = '1234';
|
||||
private $gatewayPort = ''; // :1234
|
||||
|
||||
private $gatewayDelay = 3;
|
||||
private $gatewayDelay = 6;
|
||||
|
||||
public function __construct () {
|
||||
|
||||
|
@ -19,9 +19,9 @@ class Fred {
|
|||
$salt = $prenomNom;
|
||||
$pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday;
|
||||
|
||||
$query = 'salt='. urlencode($salt) .'&pepper='. urlencode($pepper);
|
||||
$query = 'salt='. urlencode($salt) .'&pepper='. urlencode($pepper) .'&getipns=yes';
|
||||
|
||||
$page1 = file_get_contents($this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query);
|
||||
$page1 = file_get_contents($this->gatewayProtocol . '://'. $this->gatewayDomain . $this->gatewayPort . '/?' . $query);
|
||||
|
||||
if (empty($page1)) {
|
||||
|
||||
|
@ -30,18 +30,24 @@ class Fred {
|
|||
|
||||
preg_match("`url='([^']+)'`isU", $page1, $matches);
|
||||
|
||||
$url = $matches[1];
|
||||
$urlipns = $matches[1];
|
||||
|
||||
$page2 = '';
|
||||
$rounds = 0;
|
||||
|
||||
while (empty($page2) and $rounds < 10) {
|
||||
|
||||
sleep($this->gatewayDelay);
|
||||
|
||||
$page2 = file_get_contents($url);
|
||||
$page2 = file_get_contents($urlipns);
|
||||
}
|
||||
|
||||
if (empty($page2)) {
|
||||
|
||||
throw new Exception("J'ai pas pû récupérer la putain de deuxième page.");
|
||||
}
|
||||
|
||||
preg_match("`url='.*/ipns/([^']+)'`isU", $page2, $matches);
|
||||
$ClearText = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($page2))) );
|
||||
preg_match("`url='([^']+)'`isU", $ClearText, $matches);
|
||||
|
||||
$ipnsKey = $matches[1];
|
||||
|
||||
|
@ -56,11 +62,7 @@ class Fred {
|
|||
|
||||
$query = 'salt='. $salt .'&pepper='. $pepper . '&messaging=' . $gchangeName;
|
||||
|
||||
$url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query;
|
||||
|
||||
// echo '<pre>'; var_dump(htmlspecialchars($url)); echo '</pre>';
|
||||
|
||||
$page1 = file_get_contents($url);
|
||||
$page1 = file_get_contents($this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query);
|
||||
|
||||
if (empty($page1)) {
|
||||
|
||||
|
@ -71,9 +73,9 @@ class Fred {
|
|||
|
||||
preg_match("`url='([^']+)'`isU", $page1, $matches);
|
||||
|
||||
$url = $matches[1];
|
||||
$urlmessages = $matches[1];
|
||||
|
||||
// echo '<pre>'; var_dump($url); echo '</pre>';
|
||||
// echo '<pre>'; var_dump($urli); echo '</pre>';
|
||||
|
||||
$page2 = '';
|
||||
$rounds = 0;
|
||||
|
@ -81,7 +83,7 @@ class Fred {
|
|||
while (empty($page2) and $rounds < 10) {
|
||||
|
||||
sleep($this->gatewayDelay);
|
||||
$page2 = file_get_contents($url);
|
||||
$page2 = file_get_contents($urlmessages);
|
||||
}
|
||||
|
||||
if (empty($page2)) {
|
||||
|
@ -103,11 +105,11 @@ class Fred {
|
|||
$salt = $prenomNom;
|
||||
$pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday;
|
||||
|
||||
$query = 'salt='. urlencode($salt) .'&pepper='. urlencode($pepper) . '&g1pub=on';
|
||||
$query = 'salt='. urlencode($salt) .'&pepper='. urlencode($pepper) . '&getg1pub=yes';
|
||||
|
||||
$url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query;
|
||||
$urlj = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query;
|
||||
|
||||
// echo '<pre>'; var_dump(htmlspecialchars($url)); echo '</pre>';
|
||||
// echo '<pre>'; var_dump(htmlspecialchars($urlj)); echo '</pre>';
|
||||
|
||||
$opts = array(
|
||||
'http'=>array(
|
||||
|
@ -119,7 +121,7 @@ class Fred {
|
|||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$page1 = file_get_contents($url, false, $context);
|
||||
$page1 = file_get_contents($urlj, false, $context);
|
||||
|
||||
|
||||
if (empty($page1)) {
|
||||
|
@ -136,37 +138,19 @@ class Fred {
|
|||
// '<pre>' . print_r($matches, true) . '</pre>'
|
||||
// );
|
||||
|
||||
$url = $matches[1];
|
||||
|
||||
// die('<pre>' . var_dump($url, true) . '</pre>');
|
||||
|
||||
$opts2 = array(
|
||||
'http'=>array(
|
||||
'method'=>"GET",
|
||||
'header'=>"Accept-language: fr\r\n",
|
||||
'follow_location' => 0
|
||||
)
|
||||
);
|
||||
|
||||
$context2 = stream_context_create($opts2);
|
||||
$urlg1pub = $matches[1];
|
||||
|
||||
$page2 = '';
|
||||
|
||||
$rounds = 0;
|
||||
|
||||
while (empty($page2) and $rounds < 10) {
|
||||
|
||||
sleep($this->gatewayDelay);
|
||||
|
||||
$page2 = file_get_contents($url, false, $context2);
|
||||
}
|
||||
$page2 = file_get_contents($urlg1pub);
|
||||
|
||||
if (empty($page2)) {
|
||||
|
||||
throw new Exception("J'ai pas pû récupérer la putain de deuxième page.");
|
||||
}
|
||||
|
||||
preg_match("`url='.*/user/([^']+)/'`isU", $page2, $matches);
|
||||
$ClearText = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($page2))) );
|
||||
preg_match("`url='([^']+)'`isU", $ClearText, $matches);
|
||||
|
||||
$gchangeId = $matches[1];
|
||||
|
||||
|
|
|
@ -18,7 +18,10 @@ if (isset($_POST['salt'], $_POST['pepper'])) {
|
|||
try {
|
||||
|
||||
$playerG1Id = $fred->donneMoiSaPutaindeG1Pub($_POST['salt'], $_POST['pepper']);
|
||||
$keygen->generatePubsec($_POST['salt'], $_POST['pepper']);
|
||||
sleep(3);
|
||||
$playerIPNS = $fred->donneMoiLaPutainDeClefIPNS($_POST['salt'], $_POST['pepper']);
|
||||
|
||||
// $keygen->generatePubsec($_POST['salt'], $_POST['pepper']);
|
||||
|
||||
} catch (Exception $errMsg) {
|
||||
|
||||
|
@ -26,6 +29,7 @@ if (isset($_POST['salt'], $_POST['pepper'])) {
|
|||
}
|
||||
|
||||
$_SESSION['player_pubkey'] = $playerG1Id;
|
||||
$_SESSION['player_ipns'] = $playerIPNS;
|
||||
|
||||
$gchange = new Gchange();
|
||||
|
||||
|
|
Loading…
Reference in New Issue