Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function decryptpass($pass){
- $url = "api.php"; # URL to API file
- $username = "apiuser"; # Admin username goes here
- $password = "password"; # Admin password goes here
- $postfields["username"] = $username;
- $postfields["password"] = md5($password);
- $postfields["action"] = "decryptpassword";
- $postfields["password2"] = $pass;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 100);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
- $data = curl_exec($ch);
- curl_close($ch);
- $data = explode(";",$data);
- foreach ($data AS $temp) {
- $temp = explode("=",$temp);
- $results[$temp[0]] = $temp[1];
- }
- if ($results["result"]=="success") {
- echo $results["password"];
- } else {
- # An error occured
- echo "The following error occured: ".$results["message"];
- }
- }
Add Comment
Please, Sign In to add comment