Jump to content

Quotes Automation For WHMCS v2.1.6 Module


uQs
 Share

Recommended Posts

  • Administrators

quotes_automation_for_whmcs_1.png

Quotes Automation For WHMCS v2.1.6 Module Nulled

Quotes Automation For WHMCS has been developed to shorten and simplify the entire process between quote preparation and order processing. With it, both the administrators and your clients will be allowed to place orders and then automatically generate invoices, all from the quote page directly.

The module will empower you to create and modify as many quote templates as you require, each with an adjustable set of products, addons, domains, or even custom items. You will be free to regulate your own relations of any specific quote item with an existing WHMCS product, addon, or domain, as well as manage discounts, recurring payments and other billing details applicable to a quote.

It is your move now. Order Quotes Automation For WHMCS and follow the shortest route from a quote to an order!

download.png

https://ftp1.forumnulled.com/WHMCS/Module/1a/Quotes_Automation_For_WHMCS_v2.1.6.zip

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
On 6/26/2022 at 7:15 AM, srvtsrp said:

How could you make it worked? None of the modulesgarden's module works for me. I always get a license error

It's in fact pretty easy. You can encode your own license after extracting the secret key. The secret key can be extracted by decoding (using phpdecode.xyz for example) a single PHP file and extracting the secret_key variable from that PHP source. But you can even extract that key with simple PHP script by rewriting some curl functions and extract the key without even de-ioncubing the files...

Link to comment
Share on other sites

On 7/8/2022 at 4:20 AM, Dela said:

It's in fact pretty easy. You can encode your own license after extracting the secret key. The secret key can be extracted by decoding (using phpdecode.xyz for example) a single PHP file and extracting the secret_key variable from that PHP source. But you can even extract that key with simple PHP script by rewriting some curl functions and extract the key without even de-ioncubing the files...

I think a sample script is much more interesting and will explain everything on its own...

#!/usr/bin/php -nc./php.ini
<?php

$localkeyresults = array();
$localkeyresults['checkdate']='99999999'; /// YYYYMMDD
$localkeyresults['validdomain']='www.mydomain.com'; // Domain where WHMCS is installed
$localkeyresults['validip']='1.2.3.4'; // Your IP
$localkeyresults['status'] = 'Active'; // Static info

$tmpfolder = "/tmp";

if ($argc != 2) {
  echo "Usage: $argv[0] <php file>\n";
  die("");
}

if (!file_exists($argv[1])) {
  die("File not found: ".$argv[1]."\n");
}

$localkeyresults['validdirectory']=dirname(realpath($argv[1]));

echo "Trying to find the MG secret key\n";

// Some MG addons are including files like ../../../init.php so we generate a dir structure..
mkdir($tmpfolder.'/MGH');
mkdir($tmpfolder.'/MGH/b');
mkdir($tmpfolder.'/MGH/b/c');
mkdir($tmpfolder.'/MGH/b/c/d');
$tmpsubfolder = $tmpfolder.'/MGH/b/c/d';

// Copy the file to $tmpsubfolder
copy($argv[1], $tmpsubfolder."/lic.php");

$BD=dirname($argv[1]);

// License function is looking for license.php in the same folder so we need to create one with a 'hack'
$fp = fopen($tmpsubfolder.'/license.php', 'w');
fwrite($fp,"<?php\nglobal \$licensing_secret_key;\n?>");
fclose($fp);

define('WHMCS', 'yes'); // Required for some MG addons
touch($tmpsubfolder.'/utility.php'); // Some mods use this file. For example ProxmoxCloud
touch($tmpsubfolder.'/init.php'); // Some mods use this file. For example ReportsGenerator
touch($tmpsubfolder.'/config.php');
touch($tmpsubfolder.'/../../../init.php'); // Needed for reports generator too
if (file_exists($BD.'/Loader.php'))
  copy($BD.'/Loader.php', $tmpsubfolder.'/Loader.php');
require($tmpsubfolder."/lic.php");

// Todo, some MG modules might need some additional includes.

// Now find the MG license function
$function_found = false;
$funcs = get_defined_functions();
foreach ($funcs['user'] as $userfunc) {
  if (strstr($userfunc, 'license')) {
    $function_found = true;
    break;
  }
}

if (!$function_found)
  die("Could not find license function. Are you using the right php file?\n");

// Call license function
$x = $userfunc();
cleanup();

/////// Helper functions for proxmox cloud & vps
function proxmoxCloud_load() {}
function proxmoxCloud_debug() {}
function proxmoxVPS_isProxmoxAddon() { return 0; }
function proxmoxVPS_load() {}
/////// Helper functions for reports generator
class lic {};

// TODO: other modules might need more helper functions too

////// General Helper functions:
function curl_exec() {}
function mysql_query($query) {}
function mysql_fetch_assoc($query_result) { return null; }
function mysql_real_escape_string($query) {}

// Here's where the magic happens :)
// We intercept the curl_init() function as this is called from withint the orignal license function.
// This functions does a require() in the beginning, loading the license.php file (which we created ourselves where we defined $licensing_secret_key as global
// By doing that we can read $licensing_secret_key in our curl_init() function by defining it global again.
// Stupid hack, but it works :)

function curl_init() {
  global $licensing_secret_key; // A var we want to extract from the license function
  global $localkeyresults; // Our config, define above
 
  if (empty($licensing_secret_key)) {
    die("Failed. \$licensing_secret_key was empty....\n");
  }
 
  echo "SECRET KEY FOUND: $licensing_secret_key\n\n";
 
  // Now encode our license config
  $localdata = serialize($localkeyresults);
  $localdata = base64_encode($localdata);
  $localdata = md5($localkeyresults['checkdate'].$licensing_secret_key).$localdata;
  $localdata = strrev( $localdata );
  $localdata .= md5($localdata . $licensing_secret_key);
  $value = wordwrap($localdata, 80, "\n", true);
 
  $tmp = debug_backtrace();
  $callerfunc = $tmp[1]['function'];
  $pos = strpos($callerfunc, "_license_");
  $row_name = substr($callerfunc, 0, $pos)."_localkey";


  echo "Please run these query's in order to activate your personal license:\n\n";

  echo "delete from tblconfiguration where setting='".addslashes($row_name)."';\n";
  echo "insert into tblconfiguration(value, setting) values('".addslashes($value)."', '".addslashes($row_name)."');\n";
  echo "\n\n\n";
  cleanup();
  die("");
}

function cleanup() {
global $tmpsubfolder, $tmpfolder;
  unlink($tmpsubfolder.'/lic.php');
  unlink($tmpsubfolder.'/license.php');
  unlink($tmpsubfolder.'/utility.php');
  unlink($tmpsubfolder.'/init.php');
  unlink($tmpsubfolder.'/config.php');
  if (file_exists($BD.'/Loader.php'))
    unlink($tmpsubfolder.'/Loader.php');
  unlink($tmpsubfolder.'/../../../init.php');
  rmdir($tmpfolder.'/MGH/b/c/d');
  rmdir($tmpfolder.'/MGH/b/c');
  rmdir($tmpfolder.'/MGH/b');
  rmdir($tmpfolder.'/MGH');
}
 
?>

Contents of php.ini would be:

zend_extension=/usr/lib/php/20151012/ioncube/ioncube_loader_lin_7.0.so

Executing the above script will return something like this:

Trying to find the MG secret key
SECRET KEY FOUND: 400d9a86a5849f91820e75821c283719

Please run these query's in order to activate your personal license:
Trying to find the MG secret key
SECRET KEY FOUND: 400d9a86a5849f91820e75821c283719

Please run these query's in order to activate your personal license:

delete from tblconfiguration where setting='unban_center_localkey';
insert into tblconfiguration(value, setting) values('0=03OiInZ05WZD5Wii5WdvMobvRGZhnyclxWdl9WbvYmpvU2cuV2hpx2Xh9VZ0Fmcl5WZn9VMk9Ga0VWb
vM3ajFGaf5WZkJoYnNXZs9HZv12Xlt7ah9iRGVFVT9lblRmchd0clxWdk9WTvQ3bvJ3LiozNwEjOztjI
5J3b0NWZylGZklGbhZnI6QTM6M3OiUmdpR3YBJiO2ozc7Iyc1RXY0NnI6YjOztjI04yMuIjLxIiO3ozc
7ICcpRWasFmdiozN6M3Oi89702bjpFWbvRWet5yd3dnI6YTM6M3Oi4Wah12bkRWasFmdioTMxozc7ISO
5kTO5kTO5IiO4ozc7ISZ0FGZrNWZoNmI6k0987651oTYfccffb9aa02e828a3ed6b05199a09866a1f7
83c1163d670e631fb9755482a9e1', 'unban_center_localkey');

The above test was with the latest unban center 2.3.7 and worked perfectly fine.
Command was /usr/bin/php -nc./php.ini hack.php /var/www/html/modules/addons/unbanCenter/unbanCenter.php
Please read the code and it should all be self explaining... Feel free to use the code and improve it.

  • Thanks 1
Link to comment
Share on other sites

On 7/15/2022 at 4:08 PM, Dela said:

I think a sample script is much more interesting and will explain everything on its own...

#!/usr/bin/php -nc./php.ini
<?php

$localkeyresults = array();
$localkeyresults['checkdate']='99999999'; /// YYYYMMDD
$localkeyresults['validdomain']='www.mydomain.com'; // Domain where WHMCS is installed
$localkeyresults['validip']='1.2.3.4'; // Your IP
$localkeyresults['status'] = 'Active'; // Static info

$tmpfolder = "/tmp";

if ($argc != 2) {
  echo "Usage: $argv[0] <php file>\n";
  die("");
}

if (!file_exists($argv[1])) {
  die("File not found: ".$argv[1]."\n");
}

$localkeyresults['validdirectory']=dirname(realpath($argv[1]));

echo "Trying to find the MG secret key\n";

// Some MG addons are including files like ../../../init.php so we generate a dir structure..
mkdir($tmpfolder.'/MGH');
mkdir($tmpfolder.'/MGH/b');
mkdir($tmpfolder.'/MGH/b/c');
mkdir($tmpfolder.'/MGH/b/c/d');
$tmpsubfolder = $tmpfolder.'/MGH/b/c/d';

// Copy the file to $tmpsubfolder
copy($argv[1], $tmpsubfolder."/lic.php");

$BD=dirname($argv[1]);

// License function is looking for license.php in the same folder so we need to create one with a 'hack'
$fp = fopen($tmpsubfolder.'/license.php', 'w');
fwrite($fp,"<?php\nglobal \$licensing_secret_key;\n?>");
fclose($fp);

define('WHMCS', 'yes'); // Required for some MG addons
touch($tmpsubfolder.'/utility.php'); // Some mods use this file. For example ProxmoxCloud
touch($tmpsubfolder.'/init.php'); // Some mods use this file. For example ReportsGenerator
touch($tmpsubfolder.'/config.php');
touch($tmpsubfolder.'/../../../init.php'); // Needed for reports generator too
if (file_exists($BD.'/Loader.php'))
  copy($BD.'/Loader.php', $tmpsubfolder.'/Loader.php');
require($tmpsubfolder."/lic.php");

// Todo, some MG modules might need some additional includes.

// Now find the MG license function
$function_found = false;
$funcs = get_defined_functions();
foreach ($funcs['user'] as $userfunc) {
  if (strstr($userfunc, 'license')) {
    $function_found = true;
    break;
  }
}

if (!$function_found)
  die("Could not find license function. Are you using the right php file?\n");

// Call license function
$x = $userfunc();
cleanup();

/////// Helper functions for proxmox cloud & vps
function proxmoxCloud_load() {}
function proxmoxCloud_debug() {}
function proxmoxVPS_isProxmoxAddon() { return 0; }
function proxmoxVPS_load() {}
/////// Helper functions for reports generator
class lic {};

// TODO: other modules might need more helper functions too

////// General Helper functions:
function curl_exec() {}
function mysql_query($query) {}
function mysql_fetch_assoc($query_result) { return null; }
function mysql_real_escape_string($query) {}

// Here's where the magic happens :)
// We intercept the curl_init() function as this is called from withint the orignal license function.
// This functions does a require() in the beginning, loading the license.php file (which we created ourselves where we defined $licensing_secret_key as global
// By doing that we can read $licensing_secret_key in our curl_init() function by defining it global again.
// Stupid hack, but it works :)

function curl_init() {
  global $licensing_secret_key; // A var we want to extract from the license function
  global $localkeyresults; // Our config, define above
 
  if (empty($licensing_secret_key)) {
    die("Failed. \$licensing_secret_key was empty....\n");
  }
 
  echo "SECRET KEY FOUND: $licensing_secret_key\n\n";
 
  // Now encode our license config
  $localdata = serialize($localkeyresults);
  $localdata = base64_encode($localdata);
  $localdata = md5($localkeyresults['checkdate'].$licensing_secret_key).$localdata;
  $localdata = strrev( $localdata );
  $localdata .= md5($localdata . $licensing_secret_key);
  $value = wordwrap($localdata, 80, "\n", true);
 
  $tmp = debug_backtrace();
  $callerfunc = $tmp[1]['function'];
  $pos = strpos($callerfunc, "_license_");
  $row_name = substr($callerfunc, 0, $pos)."_localkey";


  echo "Please run these query's in order to activate your personal license:\n\n";

  echo "delete from tblconfiguration where setting='".addslashes($row_name)."';\n";
  echo "insert into tblconfiguration(value, setting) values('".addslashes($value)."', '".addslashes($row_name)."');\n";
  echo "\n\n\n";
  cleanup();
  die("");
}

function cleanup() {
global $tmpsubfolder, $tmpfolder;
  unlink($tmpsubfolder.'/lic.php');
  unlink($tmpsubfolder.'/license.php');
  unlink($tmpsubfolder.'/utility.php');
  unlink($tmpsubfolder.'/init.php');
  unlink($tmpsubfolder.'/config.php');
  if (file_exists($BD.'/Loader.php'))
    unlink($tmpsubfolder.'/Loader.php');
  unlink($tmpsubfolder.'/../../../init.php');
  rmdir($tmpfolder.'/MGH/b/c/d');
  rmdir($tmpfolder.'/MGH/b/c');
  rmdir($tmpfolder.'/MGH/b');
  rmdir($tmpfolder.'/MGH');
}
 
?>

Contents of php.ini would be:

zend_extension=/usr/lib/php/20151012/ioncube/ioncube_loader_lin_7.0.so

Executing the above script will return something like this:

Trying to find the MG secret key
SECRET KEY FOUND: 400d9a86a5849f91820e75821c283719

Please run these query's in order to activate your personal license:
Trying to find the MG secret key
SECRET KEY FOUND: 400d9a86a5849f91820e75821c283719

Please run these query's in order to activate your personal license:

delete from tblconfiguration where setting='unban_center_localkey';
insert into tblconfiguration(value, setting) values('0=03OiInZ05WZD5Wii5WdvMobvRGZhnyclxWdl9WbvYmpvU2cuV2hpx2Xh9VZ0Fmcl5WZn9VMk9Ga0VWb
vM3ajFGaf5WZkJoYnNXZs9HZv12Xlt7ah9iRGVFVT9lblRmchd0clxWdk9WTvQ3bvJ3LiozNwEjOztjI
5J3b0NWZylGZklGbhZnI6QTM6M3OiUmdpR3YBJiO2ozc7Iyc1RXY0NnI6YjOztjI04yMuIjLxIiO3ozc
7ICcpRWasFmdiozN6M3Oi89702bjpFWbvRWet5yd3dnI6YTM6M3Oi4Wah12bkRWasFmdioTMxozc7ISO
5kTO5kTO5IiO4ozc7ISZ0FGZrNWZoNmI6k0987651oTYfccffb9aa02e828a3ed6b05199a09866a1f7
83c1163d670e631fb9755482a9e1', 'unban_center_localkey');

The above test was with the latest unban center 2.3.7 and worked perfectly fine.
Command was /usr/bin/php -nc./php.ini hack.php /var/www/html/modules/addons/unbanCenter/unbanCenter.php
Please read the code and it should all be self explaining... Feel free to use the code and improve it.

Why do I get an error when I execute the command?

````

Warning: mkdir(): File exists in /home/nspztykq/public_html/hack.php on line 26

Warning: mkdir(): File exists in /home/nspztykq/public_html/hack.php on line 27

Warning: mkdir(): File exists in /home/nspztykq/public_html/hack.php on line 28

Warning: mkdir(): File exists in /home/nspztykq/public_html/hack.php on line 29

````

Ā 

PHP 7.0

inocube 10 + Loader

  • Thanks 1
Link to comment
Share on other sites

  • uQs changed the title to Quotes Automation For WHMCS v2.1.6 Module

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...