Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- if (file_exists('save.txt')) {
- $save = file_get_contents('save.txt', FILE_USE_INCLUDE_PATH);
- }
- // fonction pour parse le html
- function parse($html, $separator1, $separator2){
- $return = explode($separator2, explode($separator1, $html)[1])[0];
- return $return;
- }
- function Flood($pemt, $delai, $repetition, $url , $message, $cookie_coniunctio, $random)
- {
- // Les messages randoms :
- $spam[] = array( ":)", ":-)", ":hap:", ":-)))", ":content:", ":oui:", ":cool:", ":rire:", ":-D", ":rire2:", ":o))", ":ok:", ":sournois:", ":gni:", ":noel:", ":hap:");
- $spam[] = array( "😀", "ðŸ˜", "😂", "😃", "😄", "😅", "😆", "😇", "😈", "😉", "😊", "😋", "😌", "ðŸ˜", "😎", "ðŸ˜", "ðŸ˜", "😑", "😒", "😓", "😔", "😕", "😖", "😗", "😘", "😙", "😚", "😛", "😜", "ðŸ˜", "😞", "😟", "😠", "😡", "😢", "😣", "😤", "😥", "😦", "😧", "😨", "😩", "😪", "😫", "😬", "ðŸ˜", "😮", "😯", "😰", "😱", "😲", "😳", "😴", "😵", "😶", "😷", "😸", "😹", "😺", "😻", "😼", "😽", "😾", "😿", "🙀", "ðŸ™", "🙂", "🙃", "🙄");
- $cookie_coniunctio_arr = explode(";", $cookie_coniunctio);
- for ($j = 0; $j < $repetition; $j++){
- foreach ($cookie_coniunctio_arr as $cookie_coniunctio)
- {
- $options = array(
- 'http'=>array(
- 'method'=> "GET",
- 'header'=> "Cookie: wbCookieNotifier=1; coniunctio=".$cookie_coniunctio."; acceptableAds=0\r\n".
- "Connection: close\r\n"
- ));
- $context = stream_context_create($options);
- // lit le fichier stop.txt, si il contient stop on stop la boucle
- $file = fopen("stop.txt", "w+") or die("erreur");
- $break = fread($file,5);
- echo $break;
- fclose($file);
- if ($break == "stop"){
- file_put_contents('stop.txt', '');
- break 2;
- }
- $html = file_get_contents($url, false, $context); // html de la page jvc (pour récupérer les paramètres)
- // tous les paramètres necessaires :
- $fs_session = parse($html,'fs_session" value="', '"/>');
- $fs_timestamp = parse($html,'fs_timestamp" value="', '"/>');
- $html_fs = explode('value="topic_nouveau_message"/>', $html)[1];
- $html_fs = explode('<div class="row">', $html_fs)[0];
- $fs_name1 = parse($html_fs,'name="', '"');
- $fs_val1 = parse($html_fs,'value="', '"/>');
- $html_fs = explode('"/>', $html_fs)[1];
- $fs_name2 = parse($html_fs,'name="', '"');
- $fs_val2 = parse($html_fs,'value="', '"/>');
- // Préparation cURL
- $cookies = "wbCookieNotifier=1; coniunctio=".$cookie_coniunctio."; acceptableAds=0";
- $content = array(
- 'fs_session' => $fs_session,
- 'fs_timestamp' => $fs_timestamp,
- 'fs_version' => 'topic_nouveau_message',
- $fs_name1 => $fs_val1,
- $fs_name2 => $fs_val2,
- 'g-recaptcha-response' => "",
- 'form_alias_rang' => '1'
- );
- $mh = curl_multi_init();
- for ($i=0; $i < $pemt; $i++){ //nombre de requettes
- if ($random) { // si message random activé
- $content['message_topic'] = $spam[0][mt_rand(0, count($spam[0]) - 1)];
- }
- else{
- $content['message_topic'] = $message;
- }
- $content_arr = http_build_query($content);
- $ch[$i] = curl_init($url);
- curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch[$i], CURLOPT_POST, 1);
- curl_setopt($ch[$i], CURLOPT_COOKIE, $cookies);
- curl_setopt($ch[$i], CURLOPT_POSTFIELDS, $content_arr);
- curl_multi_add_handle($mh, $ch[$i]);
- }
- // poste les messages pile au début de la seconde
- $ms = intval(explode(" ", microtime())[0]);
- while ($ms > 1000){
- usleep(10);
- $ms = intval(explode(" ", microtime())[0]);
- }
- // ----------------------------
- $running = null;
- do {
- curl_multi_exec($mh, $running);
- } while ($running >0);
- unset($ch);
- sleep(2); // sleep entre chaque compte (2 semble être le mieux)
- }
- $temps = $delai - count($cookie_coniunctio_arr); // après plusieurs test, c'est mieux d'attendre plus que 10 sec que juste 10
- sleep($delai);
- }
- echo "<h1> Flood terminé </h1>";
- }
- if (isset($_POST['flood']))
- {
- if (isset($_POST['random'])){
- $random = true; // si mode random activé
- }else{
- $random = false; // si mode random desactivé
- }
- Flood($_POST['pemt'], $_POST['delai'], $_POST['nbRepetitions'], $_POST['url'], $_POST['message_list'], $_POST['coniunctio'], $random);
- }
- if (!empty($_POST['stop']))
- {
- $ret = file_put_contents('stop.txt', 'stop');
- if($ret === false)
- {
- die("Erreur");
- }
- }
- // enregistre le cookie
- if (isset($_POST['save']))
- {
- if(isset($_POST['coniunctio']))
- {
- $data = $_POST['coniunctio'] ;
- $ret = file_put_contents('save.txt', $data);
- if($ret === false)
- {
- die("Erreur, impossible d'enregistrer le cookie");
- }
- else
- {
- echo "Le cookie a bien été enregistré";
- header("refresh: 1;");
- }
- }
- }
- ?>
- <!doctype html>
- <html lang="en">
- <head>
- <style>
- body {
- background-color: #252525;
- font-family: Tahoma,"DejaVu Sans Condensed",Arial,Helvetica,sans-serif;
- font-size: 14px;
- color: #aaa;
- }
- input {
- background: #ccc !important;
- border-color: #323232 !important;
- color: #151515 !important;
- border: 0.0625rem solid #D0D0D9;
- height: 1.75rem;
- width: 30.25rem;
- padding: 0.1875rem;
- }
- ul{
- display: table;
- list-style-type: none;
- padding: 0.125rem 0;
- margin: 0;
- border: 0.0625rem solid #ccc;
- margin-bottom: 1.5rem;
- width: 100%;
- table-layout: fixed;
- border-collapse: separate;
- padding: 0 0.125rem;
- border-spacing: 0 0.125rem;
- margin-top: 0;
- margin-bottom: 10px;
- box-sizing: border-box;
- color: #B8B8B8 !important;
- border-color: #555;
- }
- li {
- background: #2A2A2A;
- display: table-row;
- font-size: 1rem;
- vertical-align: middle;
- line-height: 1rem;
- box-sizing: border-box;
- border-spacing: 0;
- list-style-type: none;
- border-collapse: separate;
- border-spacing: 0 0.125rem;
- color: #B8B8B8 !important;
- }
- .topic-subject {
- width:400px;
- padding-right: 1.25rem;
- font-weight: 700;
- position: relative;
- display: table-cell;
- padding: 0.125rem;
- box-sizing: border-box;
- line-height: 1rem;
- }
- .titre-subject {
- padding-right: 1.25rem;
- font-weight: 700;
- position: relative;
- display: table-cell;
- width:170px;
- padding: 0.125rem;
- box-sizing: border-box;
- line-height: 1rem;
- text-align:right;
- }
- textarea {
- background: #ccc !important;
- width:485px;
- max-width:99%;
- min-width:99%;
- min-height:40px;
- max-height:300px;
- height:200px;
- }
- H2 {
- color:#ddd;
- background:#121212;
- padding:5px;
- }
- .column_right{
- width:90%;
- height: 2.2rem;
- padding:5px;
- margin:auto;
- }
- input#random {
- width:10px;
- }
- [type="checkbox"].CheckStyle:not(:checked),
- [type="checkbox"].CheckStyle:checked {position: absolute;left: -9999px;}
- [type="checkbox"].CheckStyle:not(:checked) + label,
- [type="checkbox"].CheckStyle:checked + label {position: relative;padding-left: 55px;cursor: pointer;}
- [type="checkbox"].CheckStyle:not(:checked) + label:before,
- [type="checkbox"].CheckStyle:checked + label:before,
- [type="checkbox"].CheckStyle:not(:checked) + label:after,
- [type="checkbox"].CheckStyle:checked + label:after {content: "";position: absolute;}
- [type="checkbox"].CheckStyle:not(:checked) + label:before,
- [type="checkbox"].CheckStyle:checked + label:before {border: 1px solid #777;left:0; top: -3px;width: 45px; height: 20px;background: #DDDDDD;border-radius: 15px;-webkit-transition: background-color .2s;-moz-transition: background-color .2s;-ms-transition: background-color .2s;transition: background-color .2s;}
- [type="checkbox"].CheckStyle:not(:checked) + label:after,
- [type="checkbox"].CheckStyle:checked + label:after {border: 1px solid #777;width: 10px; height: 10px;-webkit-transition: all .2s;-moz-transition: all .2s;-ms-transition: all .2s;transition: all .2s;border-radius: 50%;background: #461B1B;top: 2px; left: 5px;}
- [type="checkbox"].CheckStyle:checked + label:before {background:#34495E; }
- [type="checkbox"].CheckStyle:checked + label:after {background: #39D2B4;top: 2px; left: 30px;}
- [type="checkbox"].CheckStyle:checked + label .ui,
- [type="checkbox"].CheckStyle:not(:checked) + label .ui:before,
- [type="checkbox"].CheckStyle:checked + label .ui:after {position: absolute;left: 6px;width: 45px;border-radius: 15px;font-size: 14px;font-weight: bold;line-height: 22px;-webkit-transition: all .2s;-moz-transition: all .2s;-ms-transition: all .2s;transition: all .2s;}
- [type="checkbox"].CheckStyle:not(:checked) + label .ui:before {top:-4px;content: "✖";left: 28px}
- [type="checkbox"].CheckStyle:checked + label .ui:after {top:-4px;content: "✓";color: #39D2B4;}
- </style>
- <meta charset="UTF-8">
- <title>JVFlood</title>
- </head>
- <body>
- <div style="margin: 0 auto;padding: 1.25rem 1.25rem 0 1.25rem;width: 720px">
- <H2> <center>JVFLOOD </center></H2>
- <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" >
- <ul class="topic-list topic-list-admin">
- <li>
- <span class="titre-subject">Cookie :</span>
- <span class="topic-subject">
- <input id="coniunctio" placeholder="coniunctio" style="margin:auto!important;width:99%;" name="coniunctio" value="<?php echo (isset($save))?$save:'';?>"</input>
- </span>
- <span class="column_right">
- <input class="column_right" type="submit" name="save" value="Sauvegarder">
- </span>
- </li>
- <li>
- <span class="titre-subject">URL du topic:</span>
- <span class="topic-subject">
- <input id="url" style="margin:auto!important;width:99%;" name="url" value="" placeholder="http://www.jeuxvideo.com/forums/..."></input>
- </span>
- </li>
- <li>
- <span class="titre-subject">Message :</span>
- <span class="topic-subject">
- <textarea id="message_list" style="margin:auto!important;width:99%;" name="message_list"></textarea>
- </span>
- </li>
- <li>
- <span class="titre-subject">Message random :</span>
- <span class="topic-subject" style="padding-top:10px;padding-bottom:5px;";>
- <input name="random" id="random" class="CheckStyle" type="checkbox" value="random"/><label name="ReponseCheck" for="random"><span class="ui"></span></label>
- </span>
- </li>
- <li>
- <span class="titre-subject">Répétition :</span>
- <span class="topic-subject">
- <input type = "number"min="1" max="10000" id="nbRepetitions" style="margin:auto!important;width:99%;" name="nbRepetitions" value="10" onchange="UpdateTimer()"></input>
- </span>
- <script>
- function UpdateTimer()
- {
- var duration = document.getElementById("nbRepetitions").value * document.getElementById("delai").value - document.getElementById("delai").value;
- var display = document.querySelector('#time');
- var timer = duration, minutes, seconds;
- minutes = parseInt(timer / 60, 10)
- seconds = parseInt(timer % 60, 10);
- minutes = minutes < 10 ? "0" + minutes : minutes;
- seconds = seconds < 10 ? "0" + seconds : seconds;
- display.textContent = minutes + ":" + seconds;
- }
- function startTimer() {
- var duration = document.getElementById("nbRepetitions").value * document.getElementById("delai").value - document.getElementById("delai").value;
- var display = document.querySelector('#time');
- var timer = duration, minutes, seconds;
- setInterval(function () {
- minutes = parseInt(timer / 60, 10)
- seconds = parseInt(timer % 60, 10);
- minutes = minutes < 10 ? "0" + minutes : minutes;
- seconds = seconds < 10 ? "0" + seconds : seconds;
- display.textContent = minutes + ":" + seconds;
- if (--timer < 0) {
- timer = duration;
- }
- }, 1000);
- }
- </script>
- </li>
- <li>
- <span class="titre-subject">Delai :</span>
- <span class="topic-subject">
- <input type = "number" min="11" max="60" id="delai" style="margin:auto!important;width:99%;" name="delai" value="12" onchange="UpdateTimer()"></input>
- </span>
- </li>
- <li>
- <span class="titre-subject">Durée :</span>
- <span class="column_right" id="time">01:50</span>
- </span>
- </li>
- <li>
- <span class="titre-subject">PEMT :</span>
- <span class="topic-subject">
- <input type = "number"min="1" max="20" id="pemt" style="margin:auto!important;width:99%;" name="pemt" value="15" ></input>
- </span>
- </li>
- <li>
- <span class="titre-subject">
- </span <span class="topic-subject">
- <button style="width:100%;height:50px;" type="submit" name="flood" value="Flood" id="flood" onclick="startTimer()" />Flood</button>
- </span>
- </li>
- <li>
- <span class="titre-subject">
- </span>
- <span class="topic-subject">
- <button style="width:100%;height:25px;" type="submit" name="stop" value="Stop" id="stop"/>Stop</button>
- </span>
- </li>
- </ul>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement