Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for SourceGuardian & phpSHIELD)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- class licensing {
- /**
- * Validate licensing
- *
- * @param string $api_fingerprint
- * @param string $server
- * @param string $RPC
- * @param string $license
- * @return mixed string on error; array on success
- */
- function validate_license($api_fingerprint, $server, $RPC, $license) {
- $returned = licensing::parse_xml( licensing::validate_local_key( ) );
- if (( $returned['status'] == 'grab_new_key' || $returned['status'] == 'expired' )) {
- $returned = licensing::parse_xml( licensing::go_remote( $method, $server, $license ) );
- if (empty( $returned )) {
- $returned['status'] = 'invalid';
- }
- licensing::go_remote_api( $RPC, $api_fingerprint, $license );
- $returned = licensing::parse_xml( licensing::validate_local_key( true ) );
- }
- if (( $returned['status'] != 'active' && $returned['status'] != 'reissued' )) {
- if (empty( $returned )) {
- $returned['status'] = 'invalid';
- }
- $errors = false;
- if ($returned['status'] == 'suspended') {
- $errors = 'This license has been suspended.';
- } else {
- if ($returned['status'] == 'pending') {
- $errors = 'This license is pending admin approval.';
- } else {
- if ($returned['status'] == 'expired') {
- $errors = 'This license is expired.';
- } else {
- if ($returned['status'] == 'renew') {
- $errors = $returned['message'];
- } else {
- if (( $returned['status'] == 'active' && strcmp( md5( 'a666d67aae067313345c74abd7b666b0' . $token ), $returned['access_token'] ) != 0 )) {
- $errors = 'This license has an invalid checksum.';
- } else {
- if (!empty( $errors )) {
- $errors = false;
- }
- $errors = 'This license appears to be invalid.';
- }
- }
- }
- }
- }
- }
- if (!empty( $errors )) {
- $errors = false;
- }
- return ($errors ? $errors : $returned);
- }
- .......................................................................
- ........................................
- ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement