AntiWPA Forum

Full Version: help to null
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
help me to make this null please

<?php

if (!defined("WHMCS")) {
exit("This file cannot be accessed directly");
}
function domainreseller_config()
{
return array("name" => "Domain Reseller Module", "description" => "This module provides domain reselling API and your customers can resell domain names.<br><strong><a target=_blank href=\"https://whmcs.com.ua/products/domain-reseller/\">Documentation - https://whmcs.com.ua/products/domain-res...strong>", "author" => "WHMCS.com.ua", "language" => "english", "version" => "1.0", "fields" => array("LicenseKey" => array("FriendlyName" => "License Key", "Type" => "text", "Size" => "25", "Default" => "", "Description" => "domres-xxxxxxxxxxxxx"), "Enabled" => array("FriendlyName" => "API Enabled", "Type" => "yesno", "Description" => "(Allow domain registration via API)"), "ErrorAction" => array("FriendlyName" => "Order with error", "Type" => "radio", "Options" => "Cancel,Delete", "Default" => "Delete")));
}
function domainreseller_activate()
{
if (!Illuminate\Database\Capsule\Manager::schema()->hasTable("mod_rumodules")) {
Illuminate\Database\Capsule\Manager::schema()->create("mod_rumodules", function ($table) {
$table->string("name", 255);
$table->text("value");
$table->unique(array("name"));
});
}
if (!Illuminate\Database\Capsule\Manager::schema()->hasTable("mod_domainreseller_apilog")) {
Illuminate\Database\Capsule\Manager::schema()->create("mod_domainreseller_apilog", function ($table) {
$table->increments("id");
$table->timestamp("timestamp")->default(Illuminate\Database\Capsule\Manager::raw("CURRENT_TIMESTAMP"));
$table->string("ip", 255);
$table->string("user", 255);
$table->string("action", 64);
$table->string("domain", 255);
$table->text("input");
$table->text("result");
});
}
if (!Illuminate\Database\Capsule\Manager::schema()->hasTable("mod_domainreseller_actions")) {
Illuminate\Database\Capsule\Manager::schema()->create("mod_domainreseller_actions", function ($table) {
$table->increments("id");
$table->integer("domainid")->default(0);
$table->string("domain", 255);
$table->string("result", 64);
$table->text("msg");
});
}
return array("status" => "success");
}
function domainreseller_deactivate()
{
$query = "DROP TABLE `mod_addonexample`";
full_query($query);
return array("status" => "success");
}
function domainreseller_upgrade($vars)
{
$obfuscated_0D2E381D3309082E2C0B081B320D3F0F18292C03065B11_ = $vars["version"];
if ($obfuscated_0D2E381D3309082E2C0B081B320D3F0F18292C03065B11_ < 1.1) {
}
if ($obfuscated_0D2E381D3309082E2C0B081B320D3F0F18292C03065B11_ < 1.2) {
}
if (!Illuminate\Database\Capsule\Manager::schema()->hasTable("mod_rumodules")) {
Illuminate\Database\Capsule\Manager::schema()->create("mod_rumodules", function ($table) {
$table->string("name", 255);
$table->text("value");
$table->unique(array("name"));
});
}
}
function domainreseller_output($vars)
{
$localkey = Illuminate\Database\Capsule\Manager::table("mod_rumodules")->where("name", "drhash1" . rand(1111, 9999))->pluck("value");
if ($localkey) {
$obfuscated_0D103E2A07262A0E055C19353033362E2E0B2339091822_ = $localkey[0];
}
$results = domainreseller_check_license($vars["LicenseKey"], $obfuscated_0D103E2A07262A0E055C19353033362E2E0B2339091822_);
Illuminate\Database\Capsule\Manager::table("mod_rumodules")->where("name", "like", "drhash1%")->delete();
if ($results["localkey"]) {
Illuminate\Database\Capsule\Manager::table("mod_rumodules")->insert(array("name" => "drhash1" . rand(1111, 9999), "value" => $results["localkey"]));
}
$obfuscated_0D3E18052C1D3113131602151B3D011039121F0B0E2B22_ = ucfirst($results["status"]);
if ($obfuscated_0D3E18052C1D3113131602151B3D011039121F0B0E2B22_ != "Active") {
echo "<div class=\"errorbox\"><strong><span class=\"title\">An Error Occurred</span></strong><br>License is not active or license error!</div>";
}
$date = date("Y-m-d");
if (isset($_POST["date"])) {
$obfuscated_0D1306310F3E2F043B2314183108191023253F1C2E3E11_ = WHMCS\Carbon::createFromFormat("Y-m-d", $_POST["date"]);
$date = $obfuscated_0D1306310F3E2F043B2314183108191023253F1C2E3E11_->toDateString();
}
if (isset($_POST["email"]) && 2 < strlen($_POST["email"])) {
$obfuscated_0D36265B34030134172C5C385B1C235C121F3D3F081A11_ = $_POST["email"];
}
$obfuscated_0D221C04141E372C26065B220837341F17330422401201_ .= "\n\n <form method=\"post\">\n <div class=\"search-bar\" id=\"search-bar\">\n <div class=\"simple\">\n <div class=\"search-icon\">\n <div class=\"icon-wrapper\"><i class=\"fa fa-search\"></i></div>\n </div>\n <div class=\"search-fields\">\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-4 col-md-3 col-lg-2\">\n <div class=\"form-group\">\n <label for=\"inputName\">Email Address</label>\n <input type=\"text\" name=\"email\" id=\"inputEmail\" class=\"form-control\" value=\"" . $obfuscated_0D36265B34030134172C5C385B1C235C121F3D3F081A11_ . "\">\n </div>\n </div>\n <div class=\"col-sm-4 col-md-3 col-lg-2 hidden-xs\">\n <div class=\"form-group\">\n <label for=\"inputEmail\">Date</label>\n <input type=\"text\" name=\"date\" value=\"" . $date . "\" class=\"form-control\">\n\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-2 col-md-1\">\n <label class=\"clear-search hidden-xs\">&nbsp;<a href=\"clients.php\" class=\" hidden\"><i class=\"fa fa-times fa-fw\"></i>Reset</a></label>\n <button type=\"submit\" id=\"btnSearchClients\" class=\"btn btn-primary btn-search btn-block\">\n <i class=\"fa fa-search fa-fw\"></i>\n <span class=\"hidden-md\">Search</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </form>\n <div class=\"tablebg\">\n <table id=\"sortabletbl1\" class=\"datatable\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\">\n <tbody>\n <tr>\n <th>Date/Time</th>\n <th>Username</th>\n <th>IP</th>\n <th>Action</th>\n <th>Domain</th>\n <th>Data</th>\n <th>Result</th>\n </tr>";
if ($obfuscated_0D36265B34030134172C5C385B1C235C121F3D3F081A11_) {
$log = Illuminate\Database\Capsule\Manager::table("mod_domainreseller_apilog")->where("timestamp", "like", $date . " %")->where("user", "like", $obfuscated_0D36265B34030134172C5C385B1C235C121F3D3F081A11_ . "%")->orderBy("id", "desc")->get();
} else {
$log = Illuminate\Database\Capsule\Manager::table("mod_domainreseller_apilog")->where("timestamp", "like", $date . " %")->orderBy("id", "desc")->get();
}
foreach ($log as $row) {
$obfuscated_0D221C04141E372C26065B220837341F17330422401201_ .= "\n <tr>\n <td nowrap>" . $row->timestamp . "</td>\n <td><strong><a href=\"clients.php?email=" . $row->user . "\">" . $row->user . "</a></strong></td>\n <td>" . $row->ip . "</td>\n <td>" . $row->action . "</td>\n <td><strong>" . $row->domain . "</strong></td>\n <td><textarea cols=\"70\" rows=\"1\">" . $row->input . "</textarea></td>\n <td>" . $row->result . "</td>\n </tr>";
}
if (!$log) {
$obfuscated_0D221C04141E372C26065B220837341F17330422401201_ .= "\n <tr>\n <td nowrap colspan=\"7\" style=\"text-align:center\">No records found</td>\n </tr>";
}
$obfuscated_0D221C04141E372C26065B220837341F17330422401201_ .= "\n </tbody>\n </table>\n </div>";
echo $obfuscated_0D221C04141E372C26065B220837341F17330422401201_;
}
function domainreseller_check_license($licensekey, $localkey = "")
{
$obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_ = "https://my.customersbilling.net/clientarea/";
$obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_ = "d0ma1nr3s3113r54";
$obfuscated_0D353C110E3E1D01180A375C351D2830320438013C5C11_ = time() . md5(mt_rand(1000000000, 9999999999.0) . $licensekey);
$checkdate = date("Ymd");
$obfuscated_0D351F123B252124262B211A381D0123043C2C2A2C0A11_ = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : $_SERVER["LOCAL_ADDR"];
$obfuscated_0D04073933232D130E020233370F0C0B122D2922283611_ = 60;
$obfuscated_0D1E402B3C3803073726400F07103830050D3F5B061C11_ = 5;
$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_ = false;
if ($localkey) {
$localkey = str_replace("\n", "", $localkey);
$obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_ = substr($localkey, 0, strlen($localkey) - 32);
$obfuscated_0D18401C2433261E34073E0107320F3831290C0E0D2501_ = substr($localkey, strlen($localkey) - 32);
if ($obfuscated_0D18401C2433261E34073E0107320F3831290C0E0D2501_ == md5($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_ . $obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_)) {
$obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_ = strrev($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_);
$obfuscated_0D18401C2433261E34073E0107320F3831290C0E0D2501_ = substr($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_, 0, 32);
$obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_ = substr($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_, 32);
$obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_ = base64_decode($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_);
$obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_ = unserialize($obfuscated_0D0D0C191A271E281F372B5C1E2E240D10305C36190911_);
$obfuscated_0D1B111C3E0A34330C3C183B1E2835313F30240B3D3D22_ = $obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_["checkdate"];
if ($obfuscated_0D18401C2433261E34073E0107320F3831290C0E0D2501_ == md5($obfuscated_0D1B111C3E0A34330C3C183B1E2835313F30240B3D3D22_ . $obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_)) {
$obfuscated_0D37392F2A0E02183339381612051313170D330E342B22_ = date("Ymd", mktime(0, 0, 0, date("m"), date("d") - $obfuscated_0D04073933232D130E020233370F0C0B122D2922283611_, date("Y")));
if ($obfuscated_0D37392F2A0E02183339381612051313170D330E342B22_ < $obfuscated_0D1B111C3E0A34330C3C183B1E2835313F30240B3D3D22_) {
$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_ = true;
$results = $obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_;
$obfuscated_0D232E2C3F313119110C1F2A1B1D0310303F3101320E22_ = explode(",", $results["validdomain"]);
if (!in_array($_SERVER["SERVER_NAME"], $obfuscated_0D232E2C3F313119110C1F2A1B1D0310303F3101320E22_)) {
$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_ = false;
$obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_["status"] = "Invalid";
$results = array();
}
$obfuscated_0D1D072A0A093122280D12115B3B1E1F03061B3F371501_ = explode(",", $results["validip"]);
if (!in_array($obfuscated_0D351F123B252124262B211A381D0123043C2C2A2C0A11_, $obfuscated_0D1D072A0A093122280D12115B3B1E1F03061B3F371501_)) {
$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_ = false;
$obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_["status"] = "Invalid";
$results = array();
}
if ($results["validdirectory"] != dirname(dirname(dirname(dirname(__FILE__))))) {
$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_ = false;
$obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_["status"] = "Invalid";
$results = array();
}
}
}
}
}
if (!$obfuscated_0D0A5C031E02191A110202272A3D02071B2503140C1711_) {
$postfields["licensekey"] = $licensekey;
$postfields["url"] = base64_encode($_SERVER["SERVER_NAME"]);
$postfields["adr"] = base64_encode($obfuscated_0D351F123B252124262B211A381D0123043C2C2A2C0A11_);
$postfields["dir"] = dirname(dirname(dirname(dirname(__FILE__))));
if ($obfuscated_0D353C110E3E1D01180A375C351D2830320438013C5C11_) {
$postfields["check_token"] = $obfuscated_0D353C110E3E1D01180A375C351D2830320438013C5C11_;
}
if (function_exists("curl_exec")) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_ . "modules/servers/licensing/verify.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
} else {
$fp = fsockopen($obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_, 80, $obfuscated_0D0E5B06121B242D2121282A321F333C1A2308140D2811_, $obfuscated_0D21211D2C1A1038015C1D36192F052B3601360B140B11_, 5);
if ($fp) {
$querystring = "";
foreach ($postfields as $k => $obfuscated_0D01035B0314020F12052A2F040E111F33363C041E5B22_) {
$querystring .= (string) $k . "=" . urlencode($obfuscated_0D01035B0314020F12052A2F040E111F33363C041E5B22_) . "&";
}
$header = "POST " . $obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_ . "modules/servers/licensing/verify.php HTTP/1.0\r\n";
$header .= "Host: " . $obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_ . "\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: " . @strlen($querystring) . "\r\n";
$header .= "Connection: close\r\n\r\n";
$header .= $querystring;
$data = "";
@stream_set_timeout($fp, 20);
@fputs($fp, $header);
$status = @socket_get_status($fp);
while (!@feof($fp) && $status) {
$data .= @fgets($fp, 1024);
$status = @socket_get_status($fp);
}
@fclose($fp);
}
}
if (!$data) {
$obfuscated_0D37392F2A0E02183339381612051313170D330E342B22_ = date("Ymd", mktime(0, 0, 0, date("m"), date("d") - ($obfuscated_0D04073933232D130E020233370F0C0B122D2922283611_ + $obfuscated_0D1E402B3C3803073726400F07103830050D3F5B061C11_), date("Y")));
if ($obfuscated_0D37392F2A0E02183339381612051313170D330E342B22_ < $obfuscated_0D1B111C3E0A34330C3C183B1E2835313F30240B3D3D22_) {
$results = $obfuscated_0D3E3D061F26042A313F0C262C1F11035B0F3739160511_;
} else {
$results["status"] = "Invalid";
$results["description"] = "Remote Check Failed";
return $results;
}
} else {
preg_match_all("/<(.*?)>([^<]+)<\\/\\1>/i", $data, $obfuscated_0D390D02180E12242F3C3C37101A1C09093D3B1F231D32_);
$results = array();
foreach ($obfuscated_0D390D02180E12242F3C3C37101A1C09093D3B1F231D32_[1] as $k => $obfuscated_0D01035B0314020F12052A2F040E111F33363C041E5B22_) {
$results[$obfuscated_0D01035B0314020F12052A2F040E111F33363C041E5B22_] = $obfuscated_0D390D02180E12242F3C3C37101A1C09093D3B1F231D32_[2][$k];
}
}
if ($results["md5hash"] && $results["md5hash"] != md5($obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_ . $obfuscated_0D353C110E3E1D01180A375C351D2830320438013C5C11_)) {
$results["status"] = "Invalid";
$results["description"] = "MD5 Checksum Verification Failed";
return $results;
}
if ($results["status"] == "Active") {
$results["checkdate"] = $checkdate;
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = serialize($results);
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = base64_encode($obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_);
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = md5($checkdate . $obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_) . $obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_;
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = strrev($obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_);
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = $obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ . md5($obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ . $obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_);
$obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_ = wordwrap($obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_, 80, "\n", true);
$results["localkey"] = $obfuscated_0D17151A30321406313E0D123438342B3C0A0E250E1401_;
}
$results["remotecheck"] = true;
}
unset($postfields);
unset($data);
unset($obfuscated_0D390D02180E12242F3C3C37101A1C09093D3B1F231D32_);
unset($obfuscated_0D5B1C391E121529021D055B2C1504295B5B1E3D2D2522_);
unset($obfuscated_0D3D182F3F3B0704082B1C303739230A14093512360A01_);
unset($checkdate);
unset($obfuscated_0D351F123B252124262B211A381D0123043C2C2A2C0A11_);
unset($obfuscated_0D04073933232D130E020233370F0C0B122D2922283611_);
unset($obfuscated_0D1E402B3C3803073726400F07103830050D3F5B061C11_);
unset($obfuscated_0D18401C2433261E34073E0107320F3831290C0E0D2501_);
return $results;
}

?>
Reference URL's