Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //made by Cyanide 2015
- //get requests
- $key = $_GET['apikey'];
- $user = $_GET['skype'];
- $email = $_GET['email'];
- $dblookup = $_GET['skypedb'];
- $ip = $_GET['ip'];
- //url shit
- $host = 'http://skypegrab.net/'; //base url
- $api = 'api.php'; //script
- $privatekey = 'YOUR SKYPEGRAB API KEY HERE!'; //need this!!!
- $url = $host . $api; //construct url
- //authed users and info
- $authed = array(
- "username" => array("Cyanide", "Zeak", "FREE"), //authed users name
- "apikey" => array("cyanideisawesome", "cyanideisbae", "freeshit") //authed users apikey (custom?)
- );
- //blacklisted users will not be resolved
- $blacklist = array(
- "ip" => array("127.0.0.1", "IP HERE"), //users ip
- "user" => array("live:iphreak2g", "USER HERE"), //users skype name
- "email" => array("admin@skids.lol", "EMAIL HERE") //users email
- );
- $continue = true; //declare this to use later
- //start
- if(isset($key)){ //check for apikey
- foreach($authed["apikey"] as $keys => $value){ //check each value
- $if($key == $value){ //if apikey is real..
- $continue = true; //we contine
- }else{ //if not
- $continue = false; //we stop
- }
- }
- if($continue == true){ //api key was legit, so go on
- if(isset($user)){ //if user is trying to do skype2ip
- foreach($blacklist["user"] as $keys => $value){ //check if blacklisted
- if($user == $value){ //if so...
- $return = 'failed to resolve user!'; //set our return
- $continue = false; //we stop
- }
- }
- unset($key, $value); //destroy variables
- if($continue == true){ //if not blacklisted
- $return = file_get_contents($url . '?key=' . $privatekey . '&username=' . $user); //we resolve and set our return
- }
- echo $return; //print our return
- }elseif(isset($ip)){ //if user is trying to do ip2skype
- foreach($blacklist["user"] as $keys => $value){ //check if blacklisted
- if($ip == $value){ //if blacklisted...
- $return = 'failed to resolve user!'; //set our return
- $continue = false; //we stop
- }
- }
- unset($key, $value); //destroy variables
- if($continue == true){ //if not blacklisted
- $return = file_get_contents($url . '?key=' . $privatekey . '&ip2skype=1&ip=' . $ip); //we resolve and set our return
- }
- echo $return; //print out our return value
- }elseif(isset($dblookup)){ //if user is trying to do old ip look up
- foreach($blacklist["user"] as $keys => $value){ //we make sure user is not blacklisted
- if($dblookup == $value){ //if they are...
- $return = 'failed to resolve user!'; //we set our retunrn
- $continue = false; //we stop
- }
- }
- unset($key, $value); //destroy variables
- if($continue == true){ //if the user is not blacklisted
- $return = file_get_contents($url . '?key=' . $privatekey . '&oldentries=1&username=' . $dblookup); //we resolve and set our return
- }
- echo $return; //and we print our return value
- }elseif(isset($email)){ //if the user is trying to do email to skype
- foreach($blacklist["user"] as $keys => $value){ //we make sue user is not blacklisted
- if($dblookup == $value){ //if they are...
- $return = 'failed to resolve user!'; //we set our return
- $continue = false; // and we stop
- }
- }
- unset($key, $value); //destroy variables
- if($continue == true){ //if the user is not blacklisted
- $return = file_get_contents($url . '?key=' . $privatekey . '&email2skype=1&email=' . $email); // we resolve them and set our return
- }
- echo $return; //then we print out our return
- }else{ //if the user is not doing any resolving then we print off the default message
- foreach($authed["apikey"] as $keys => $value){ //check apikey once more
- $if($key == $value){ //if apikey is authed
- echo 'Welcome ' . $authed["username"][$key] . '!'; //we get their username with the key index
- }else{ //if not
- echo 'Not Authed!'; //we tell them to fuckoff
- }
- }
- unset($key, $value); //destroy variables
- }
- }else{ //if not authed..
- echo 'invalid api key!'; //tell them to fak off
- }
- }else{ //if they just load the page
- echo 'You need an API Key!'; //we tell them they are doing it wrong
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement