Advertisement
Guest User

Untitled

a guest
Jul 20th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. <?
  2. function escape($value) {
  3.     $return = '';
  4.     for($i = 0; $i < strlen($value); ++$i) {
  5.         $char = $value[$i];
  6.         $ord = ord($char);
  7.         if($char !== "'" && $char !== "\"" && $char !== '\\' && $ord >= 32 && $ord <= 126)
  8.             $return .= $char;
  9.         else
  10.             $return .= '\\x' . dechex($ord);
  11.     }
  12.     return $return;
  13. }
  14.  
  15. $user = "someuser";
  16. $pass = "somepass";
  17. $lat = escape($_POST['lat']);
  18. $long = escape($_POST['long']);
  19. $useIgnore = escape($_POST['useIgnore']);
  20. if ($useIgnore == '1') {
  21.         $ignore = "-i \"Abra,Diglett,Drowzee,Eevee,Ekans,Electabuzz,Geodude,Golbat,Growlithe,Hitmonchan,Hitmonlee,Jynx,Krabby,Magnemite,Mankey,Meowth,29,32,Paras,Pidgeotto,Pidgey,Ponyta,Raticate,Rattata,Rhyhorn,Spearow,Weedle,Zubat\"";
  22. } else {
  23.         $ignore = "";
  24. }
  25. $port = rand(7000,15000);
  26.  
  27. print("<html><body><h2>Scanning 3 steps from: $lat $long for up to 10 minutes. <a href='http://pm.rpmcable.com:$port'>View Map</a></h2></body></html>");
  28. exec("/usr/bin/python /home/jp/PokemonGo-Map/example.py -P $port -a ptc -u $user -p $pass -l \"$lat $long\" -st 3 -dg -ar 10 $ignore > /dev/null &");
  29. exec("touch /tmp/killpm");
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement