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.6.0
- * @ Author : DeZender
- * @ Release on : 02.06.2013
- * @ Official site : http://DeZender.Net
- *
- */
- /**
- * Licensing Class.
- *
- * @author Andy Rockwell <andy@solidphp.com>
- */
- 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
- */
- public 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';
- }
- if (( $returned['status'] == 'active' || $returned['status'] == 'reissued' )) {
- 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 {
- $errors = 'This license appears to be invalid.';
- }
- }
- }
- }
- }
- }
- return ($errors ? $errors : $returned);
- }
- /**
- * Write the local license key to somewhere.
- *
- * @param string $local_key The local key data to write.
- * @return You choose.
- */
- public function store_local_key($local_key) {
- $count = mysql_fetch_row( mysql_query( 'select count(*) from settings where set_name=\'license_local_key\'' ) );
- ...............................................................................
- ....................................
- ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement