Advertisement
benskalz

Untitled

Mar 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.68 KB | None | 0 0
  1. <?php
  2.  
  3. set_time_limit(0);
  4.  
  5. if (file_exists('save.txt')) {
  6. $save = file_get_contents('save.txt', FILE_USE_INCLUDE_PATH);
  7. }
  8.  
  9. // fonction pour parse le html
  10. function parse($html, $separator1, $separator2){
  11. $return = explode($separator2, explode($separator1, $html)[1])[0];
  12.  
  13. return $return;
  14. }
  15.  
  16.  
  17. function Flood($pemt, $delai, $repetition, $url , $message, $cookie_coniunctio, $random)
  18. {
  19.  
  20.  
  21. // Les messages randoms :
  22.  
  23. $spam[] = array( ":)", ":-)", ":hap:", ":-)))", ":content:", ":oui:", ":cool:", ":rire:", ":-D", ":rire2:", ":o))", ":ok:", ":sournois:", ":gni:", ":noel:", ":hap:");
  24. $spam[] = array( "😀", "😁", "😂", "😃", "😄", "😅", "😆", "😇", "😈", "😉", "😊", "😋", "😌", "😍", "😎", "😏", "😐", "😑", "😒", "😓", "😔", "😕", "😖", "😗", "😘", "😙", "😚", "😛", "😜", "😝", "😞", "😟", "😠", "😡", "😢", "😣", "😤", "😥", "😦", "😧", "😨", "😩", "😪", "😫", "😬", "😭", "😮", "😯", "😰", "😱", "😲", "😳", "😴", "😵", "😶", "😷", "😸", "😹", "😺", "😻", "😼", "😽", "😾", "😿", "🙀", "🙁", "🙂", "🙃", "🙄");
  25.  
  26.  
  27. // paramètres
  28. $cookie_coniunctio_arr = explode(";", $cookie_coniunctio);
  29.  
  30.  
  31. for ($j = 0; $j < $repetition; $j++){
  32.  
  33.  
  34.  
  35. foreach ($cookie_coniunctio_arr as $cookie_coniunctio){
  36. $options = array(
  37. 'http'=>array(
  38. 'method'=> "GET",
  39. 'header'=> "Cookie: wbCookieNotifier=1; coniunctio=".$cookie_coniunctio."; acceptableAds=0\r\n".
  40. "Connection: close\r\n"
  41. ));
  42.  
  43. $context = stream_context_create($options);
  44.  
  45.  
  46.  
  47.  
  48. // lit le fichier stop.txt, si il contient stop on stop la boucle
  49. $file = fopen("stop.txt", "r") or die("erreur");
  50. $break = fread($file,5);
  51. echo $break;
  52. fclose($file);
  53. if ($break == "stop"){
  54. file_put_contents('stop.txt', '');
  55. break;
  56. }
  57. $html = file_get_contents($url, false, $context); // html de la page jvc (pour récupérer les paramètres)
  58.  
  59. // tous les paramètres necessaires :
  60. $fs_session = parse($html,'fs_session" value="', '"/>');
  61. $fs_timestamp = parse($html,'fs_timestamp" value="', '"/>');
  62.  
  63. $html_fs = explode('value="topic_nouveau_message"/>', $html)[1];
  64. $html_fs = explode('<div class="row">', $html_fs)[0];
  65.  
  66. $fs_name1 = parse($html_fs,'name="', '"');
  67. $fs_val1 = parse($html_fs,'value="', '"/>');
  68.  
  69. $html_fs = explode('"/>', $html_fs)[1];
  70. $fs_name2 = parse($html_fs,'name="', '"');
  71. $fs_val2 = parse($html_fs,'value="', '"/>');
  72.  
  73.  
  74.  
  75. // Préparation cURL
  76. $cookies = "wbCookieNotifier=1; coniunctio=".$cookie_coniunctio."; acceptableAds=0";
  77.  
  78. $content = array(
  79. 'fs_session' => $fs_session,
  80. 'fs_timestamp' => $fs_timestamp,
  81. 'fs_version' => 'topic_nouveau_message',
  82. $fs_name1 => $fs_val1,
  83. $fs_name2 => $fs_val2,
  84. 'g-recaptcha-response' => "",
  85. 'form_alias_rang' => '1'
  86. );
  87.  
  88. $mh = curl_multi_init();
  89.  
  90. for ($i=0; $i < $pemt; $i++){ //nombre de requettes
  91.  
  92. if ($random) { // si message random activé
  93. $content['message_topic'] = $spam[0][mt_rand(0, count($spam[0]) - 1)];
  94. }
  95. else{
  96. $content['message_topic'] = $message;
  97. }
  98. $content_arr = http_build_query($content);
  99.  
  100.  
  101. $ch[$i] = curl_init($url);
  102.  
  103. curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);
  104. curl_setopt($ch[$i], CURLOPT_POST, 1);
  105. curl_setopt($ch[$i], CURLOPT_COOKIE, $cookies);
  106. curl_setopt($ch[$i], CURLOPT_POSTFIELDS, $content_arr);
  107.  
  108. curl_multi_add_handle($mh, $ch[$i]);
  109.  
  110. }
  111.  
  112.  
  113. $running = null;
  114.  
  115. do {
  116. curl_multi_exec($mh, $running);
  117. } while ($running >0);
  118.  
  119. unset($ch);
  120.  
  121.  
  122. sleep(1); // sleep pour chaque compte
  123. }
  124.  
  125. // sleep($delai); // on attend $delai secondes pour bypass le captcha :) :)
  126. sleep(9);
  127. }
  128.  
  129. echo "<h1> Flood terminé </h1>";
  130.  
  131. }
  132.  
  133.  
  134.  
  135.  
  136. if (isset($_POST['flood']))
  137. {
  138.  
  139. if (isset($_POST['random'])){
  140. $random = true; // si mode random activé
  141. }else{
  142. $random = false; // si mode random desactivé
  143. }
  144.  
  145. Flood($_POST['pemt'], $_POST['delai'], $_POST['nbRepetitions'], $_POST['url'], $_POST['message_list'], $_POST['coniunctio'], $random);
  146. }
  147.  
  148.  
  149. if (!empty($_POST['stop']))
  150. {
  151.  
  152. $ret = file_put_contents('stop.txt', 'stop');
  153.  
  154. if($ret === false)
  155. {
  156. die("Erreur");
  157. }
  158.  
  159. }
  160.  
  161.  
  162. // enregistre le cookie
  163. if (isset($_POST['save']))
  164. {
  165. if(isset($_POST['coniunctio']))
  166. {
  167. $data = $_POST['coniunctio'] ;
  168. $ret = file_put_contents('save.txt', $data);
  169.  
  170. if($ret === false)
  171. {
  172. die("Erreur, impossible d'enregistrer le cookie");
  173. }
  174. else
  175. {
  176. echo "Le cookie a bien été enregistré";
  177. header("refresh: 1;");
  178. }
  179. }
  180. }
  181.  
  182.  
  183.  
  184. ?>
  185.  
  186. <!doctype html>
  187. <html lang="en">
  188. <head>
  189. <style>
  190.  
  191. body {
  192. background-color: #252525;
  193. font-family: Tahoma,"DejaVu Sans Condensed",Arial,Helvetica,sans-serif;
  194. font-size: 14px;
  195. color: #aaa;
  196. }
  197.  
  198. input {
  199. background: #ccc !important;
  200. border-color: #323232 !important;
  201. color: #151515 !important;
  202. border: 0.0625rem solid #D0D0D9;
  203. height: 1.75rem;
  204. width: 30.25rem;
  205. padding: 0.1875rem;
  206. }
  207.  
  208. ul{
  209. display: table;
  210. list-style-type: none;
  211. padding: 0.125rem 0;
  212. margin: 0;
  213. border: 0.0625rem solid #ccc;
  214. margin-bottom: 1.5rem;
  215. width: 100%;
  216. table-layout: fixed;
  217. border-collapse: separate;
  218. padding: 0 0.125rem;
  219. border-spacing: 0 0.125rem;
  220. margin-top: 0;
  221. margin-bottom: 10px;
  222. box-sizing: border-box;
  223. color: #B8B8B8 !important;
  224. border-color: #555;
  225. }
  226. li {
  227. background: #2A2A2A;
  228. display: table-row;
  229. font-size: 1rem;
  230. vertical-align: middle;
  231. line-height: 1rem;
  232. box-sizing: border-box;
  233. border-spacing: 0;
  234. list-style-type: none;
  235. border-collapse: separate;
  236. border-spacing: 0 0.125rem;
  237. color: #B8B8B8 !important;
  238. }
  239.  
  240. .topic-subject {
  241. width:400px;
  242. padding-right: 1.25rem;
  243. font-weight: 700;
  244. position: relative;
  245. display: table-cell;
  246. padding: 0.125rem;
  247. box-sizing: border-box;
  248. line-height: 1rem;
  249. }
  250. .titre-subject {
  251. padding-right: 1.25rem;
  252. font-weight: 700;
  253. position: relative;
  254. display: table-cell;
  255. width:170px;
  256. padding: 0.125rem;
  257. box-sizing: border-box;
  258. line-height: 1rem;
  259. text-align:right;
  260. }
  261.  
  262. textarea {
  263. background: #ccc !important;
  264. width:485px;
  265. max-width:99%;
  266. min-width:99%;
  267. min-height:40px;
  268. max-height:300px;
  269. height:200px;
  270. }
  271.  
  272. H2 {
  273. color:#ddd;
  274. background:#121212;
  275. padding:5px;
  276. }
  277. .column_right{
  278. width:90%;
  279. height: 2.2rem;
  280. padding:5px;
  281. margin:auto;
  282.  
  283. }
  284.  
  285. input#random {
  286. width:10px;
  287. }
  288.  
  289. [type="checkbox"].CheckStyle:not(:checked),
  290. [type="checkbox"].CheckStyle:checked {position: absolute;left: -9999px;}
  291. [type="checkbox"].CheckStyle:not(:checked) + label,
  292. [type="checkbox"].CheckStyle:checked + label {position: relative;padding-left: 55px;cursor: pointer;}
  293. [type="checkbox"].CheckStyle:not(:checked) + label:before,
  294. [type="checkbox"].CheckStyle:checked + label:before,
  295. [type="checkbox"].CheckStyle:not(:checked) + label:after,
  296. [type="checkbox"].CheckStyle:checked + label:after {content: "";position: absolute;}
  297. [type="checkbox"].CheckStyle:not(:checked) + label:before,
  298. [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;}
  299. [type="checkbox"].CheckStyle:not(:checked) + label:after,
  300. [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;}
  301. [type="checkbox"].CheckStyle:checked + label:before {background:#34495E; }
  302. [type="checkbox"].CheckStyle:checked + label:after {background: #39D2B4;top: 2px; left: 30px;}
  303. [type="checkbox"].CheckStyle:checked + label .ui,
  304. [type="checkbox"].CheckStyle:not(:checked) + label .ui:before,
  305. [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;}
  306. [type="checkbox"].CheckStyle:not(:checked) + label .ui:before {top:-4px;content: "✖";left: 28px}
  307. [type="checkbox"].CheckStyle:checked + label .ui:after {top:-4px;content: "✓";color: #39D2B4;}
  308.  
  309. </style>
  310.  
  311.  
  312. <meta charset="UTF-8">
  313. <title>JVFlood</title>
  314. </head>
  315. <body>
  316. <div style="margin: 0 auto;padding: 1.25rem 1.25rem 0 1.25rem;width: 720px">
  317. <H2> <center>JVFLOOD </center></H2>
  318. <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" >
  319. <ul class="topic-list topic-list-admin">
  320. <li>
  321. <span class="titre-subject">Cookie :</span>
  322. <span class="topic-subject">
  323. <input id="coniunctio" placeholder="coniunctio" style="margin:auto!important;width:99%;" name="coniunctio" value="<?php echo (isset($save))?$save:'';?>"</input>
  324. </span>
  325. <span class="column_right">
  326. <input class="column_right" type="submit" name="save" value="Sauvegarder">
  327. </span>
  328. </li>
  329. <li>
  330. <span class="titre-subject">URL du topic:</span>
  331. <span class="topic-subject">
  332. <input id="url" style="margin:auto!important;width:99%;" name="url" value="" placeholder="http://www.jeuxvideo.com/forums/..."></input>
  333. </span>
  334. </li>
  335. <li>
  336. <span class="titre-subject">Message :</span>
  337. <span class="topic-subject">
  338. <textarea id="message_list" style="margin:auto!important;width:99%;" name="message_list"></textarea>
  339. </span>
  340. </li>
  341. <li>
  342. <span class="titre-subject">Message random :</span>
  343. <span class="topic-subject" style="padding-top:10px;padding-bottom:5px;";>
  344. <input name="random" id="random" class="CheckStyle" type="checkbox" value="random"/><label name="ReponseCheck" for="random"><span class="ui"></span></label>
  345. </span>
  346. </li>
  347. <li>
  348. <span class="titre-subject">Répétition :</span>
  349. <span class="topic-subject">
  350. <input type = "number"min="1" max="10000" id="nbRepetitions" style="margin:auto!important;width:99%;" name="nbRepetitions" value="10" onchange="UpdateTimer()"></input>
  351. </span>
  352. <script>
  353.  
  354. function UpdateTimer()
  355. {
  356.  
  357. var duration = document.getElementById("nbRepetitions").value * document.getElementById("delai").value - document.getElementById("delai").value;
  358. var display = document.querySelector('#time');
  359. var timer = duration, minutes, seconds;
  360.  
  361. minutes = parseInt(timer / 60, 10)
  362. seconds = parseInt(timer % 60, 10);
  363.  
  364. minutes = minutes < 10 ? "0" + minutes : minutes;
  365. seconds = seconds < 10 ? "0" + seconds : seconds;
  366.  
  367. display.textContent = minutes + ":" + seconds;
  368.  
  369.  
  370. }
  371. function startTimer() {
  372. var duration = document.getElementById("nbRepetitions").value * document.getElementById("delai").value - document.getElementById("delai").value;
  373. var display = document.querySelector('#time');
  374. var timer = duration, minutes, seconds;
  375. setInterval(function () {
  376. minutes = parseInt(timer / 60, 10)
  377. seconds = parseInt(timer % 60, 10);
  378.  
  379. minutes = minutes < 10 ? "0" + minutes : minutes;
  380. seconds = seconds < 10 ? "0" + seconds : seconds;
  381.  
  382. display.textContent = minutes + ":" + seconds;
  383.  
  384. if (--timer < 0) {
  385. timer = duration;
  386. }
  387. }, 1000);
  388. }
  389. </script>
  390. </li>
  391. <li>
  392. <span class="titre-subject">Delai :</span>
  393. <span class="topic-subject">
  394. <input type = "number" min="11" max="60" id="delai" style="margin:auto!important;width:99%;" name="delai" value="11" onchange="UpdateTimer()"></input>
  395. </span>
  396. </li>
  397. <li>
  398. <span class="titre-subject">Durée :</span>
  399. <span class="column_right" id="time">01:50</span>
  400. </span>
  401. </li>
  402. <li>
  403. <span class="titre-subject">PEMT :</span>
  404. <span class="topic-subject">
  405. <input type = "number"min="1" max="20" id="pemt" style="margin:auto!important;width:99%;" name="pemt" value="15" ></input>
  406. </span>
  407. </li>
  408. <li>
  409. <span class="titre-subject">
  410. </span <span class="topic-subject">
  411. <button style="width:100%;height:50px;" type="submit" name="flood" value="Flood" id="flood" onclick="startTimer()" />Flood</button>
  412. </span>
  413. </li>
  414. <li>
  415. <span class="titre-subject">
  416. </span>
  417. <span class="topic-subject">
  418. <button style="width:100%;height:25px;" type="submit" name="stop" value="Stop" id="stop"/>Stop</button>
  419. </span>
  420. </li>
  421. </ul>
  422. </form>
  423. </div>
  424. </body>
  425. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement