donneMoiSaPutaindeG1Pub #3

Open
opened 2022-11-05 16:49:34 +01:00 by qo-op · 0 comments
First-time contributor
    public function donneMoiSaPutaindeG1Pub ($prenomNom, $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday) {


        $salt = $prenomNom;
        $pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday;

        $query = 'salt='. $salt .'&pepper='. $pepper . '&g1pub=on';

        $url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query;

        // echo '<pre>'; var_dump(htmlspecialchars($url)); echo '</pre>';

        $opts = array(
          'http'=>array(
            'method'=>"GET",
            'header'=>"Accept-language: fr\r\n",
            'follow_location' => 0
          )
        );

        $context = stream_context_create($opts);
        $page1 = file_get_contents($url, false, $context)
                 or die('<p>On a fait du sale.</p>');

        // die('<pre>' . htmlspecialchars($page1) . '</pre>');

        preg_match("`url='([^']+)'`isU", $page1, $matches);

        // die(
        //  '<pre>' . htmlspecialchars($page1) . '</pre>' .
        //  '<pre>' . print_r($matches, true) . '</pre>'
        // );

        $url = $matches[1];

        //~ die('<pre>' . var_dump($url, true) . '</pre>');

        $page2 = '';

        $opts2 = array(
          'http'=>array(
            'method'=>"GET",
            'header'=>"Accept-language: fr\r\n",
            'follow_location' => 0
          )
        );

        $context2 = stream_context_create($opts2);

        sleep(3);

        while (empty($page2)) {

            sleep($this->gatewayDelay);

            $page2 = file_get_contents($url, false, $context2) or die('<pre>'. var_dump($page2, true) . '</pre>');
        }

        preg_match("`url='.*/user/([^']+)/'`isU", $page2, $matches);

        $gchangeId = $matches[1];

        return $gchangeId;

    }
}

SERVER PART
https://git.p2p.legal/qo-op/Astroport.ONE/src/branch/master/12345.sh#L242

``` public function donneMoiSaPutaindeG1Pub ($prenomNom, $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday) { $salt = $prenomNom; $pepper = $nomDuChienSuivieDeLaDateDeNaissanceDeJohnnyHallyday; $query = 'salt='. $salt .'&pepper='. $pepper . '&g1pub=on'; $url = $this->gatewayProtocol . '://'. $this->gatewayDomain .':' . $this->gatewayPort . '/?' . $query; // echo '<pre>'; var_dump(htmlspecialchars($url)); echo '</pre>'; $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: fr\r\n", 'follow_location' => 0 ) ); $context = stream_context_create($opts); $page1 = file_get_contents($url, false, $context) or die('<p>On a fait du sale.</p>'); // die('<pre>' . htmlspecialchars($page1) . '</pre>'); preg_match("`url='([^']+)'`isU", $page1, $matches); // die( // '<pre>' . htmlspecialchars($page1) . '</pre>' . // '<pre>' . print_r($matches, true) . '</pre>' // ); $url = $matches[1]; //~ die('<pre>' . var_dump($url, true) . '</pre>'); $page2 = ''; $opts2 = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: fr\r\n", 'follow_location' => 0 ) ); $context2 = stream_context_create($opts2); sleep(3); while (empty($page2)) { sleep($this->gatewayDelay); $page2 = file_get_contents($url, false, $context2) or die('<pre>'. var_dump($page2, true) . '</pre>'); } preg_match("`url='.*/user/([^']+)/'`isU", $page2, $matches); $gchangeId = $matches[1]; return $gchangeId; } } ``` SERVER PART https://git.p2p.legal/qo-op/Astroport.ONE/src/branch/master/12345.sh#L242
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: La_Bureautique/zeg1jeux#3
No description provided.