Black-ID

ONEC.DZ [BAC] Mass result

Jul 9th, 2015
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.17 KB | None | 0 0
  1. <?php
  2.  
  3. for ($i = xxxxxxxx; $i <= xxxxxxxx; $i++) {
  4.  
  5. $x = cURL('http://bac.onec.dz/index.php' , array('matriculebac' => $i , 'dobac' => '%D8%A7%D8%B3%D8%AA%D8%B8%D9%87%D8%A7%D8%B1+%D8%A7%D9%84%D9%86%D8%AA%D9%8A%D8%AC%D8%A9'));
  6.  
  7. if(isset($x)){
  8. preg_match('/alert(.*)/',$x,$ret);
  9. $result = explode('\n',$ret[1]);
  10. $lines = array();
  11. $lines[] = substr($result[0],2);
  12. $lines[] = $result[1];
  13. $lines[] = $result[2];
  14. $lines[] = $result[4];
  15. $lines[] = $result[5];
  16. $lines[] = $result[6];
  17. $lines[] = $result[7];
  18. $lines[] = $result[9];
  19. $lines[] = $result[10];
  20.  
  21. file_put_contents('res.txt', print_r($lines, true),FILE_APPEND);
  22. }else{
  23. echo "GoBack";
  24. }
  25.  
  26. }
  27.  
  28. function cURL($url,$POSTs=false){
  29.  
  30. $curl=curl_init();
  31. curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
  32. curl_setopt($curl, CURLOPT_HEADER, 0);
  33. curl_setopt($curl,CURLOPT_URL,$url);
  34. curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1');
  35. curl_setopt($curl,CURLOPT_FOLLOWLOCATION,1);
  36. if(is_array($POSTs)){
  37. curl_setopt($curl,CURLOPT_POST,1);
  38. curl_setopt($curl,CURLOPT_POSTFIELDS,$POSTs);
  39. }
  40. curl_setopt($curl,CURLOPT_TIMEOUT,30);
  41.  
  42. $exec=curl_exec($curl);
  43.  
  44. return $exec;
  45. }
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment