Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php class JBWebhook extends CRMEntity { protected $moduleName = "JBWebhoo..
Decoded Output download
<?php
class JBWebhook extends CRMEntity {
protected $moduleName = "JBWebhook";
function vtlib_handler($module,$event){
if($event == 'module.postinstall'){
$this->addWorkflowAction();
$this->moveFileTofolder1();
$this->InsertToServer();
}
elseif($event == 'module.preuninstall'){
}
elseif($event == 'module.enabled'){
$this->addWorkflowAction();
}
elseif($event == 'module.disabled'){
$this->deleteWorkflowAction();
}
elseif($event == 'module.preupdate'){
}
elseif($event == 'module.postupdate'){
}
}
function addWorkflowAction(){
global $adb;
$sequenceResult = $adb->pquery("SELECT MAX(id) as id from com_vtiger_workflow_tasktypes",array());
$maxSequence = $adb->query_result($sequenceResult,0,'id');
$sequence = $maxSequence + 1;
$wehook_label = vtranslate('JBWebhook', 'JBWebhook');
$adb->pquery(" INSERT INTO com_vtiger_workflow_tasktypes (id,tasktypename,label,classname,classpath,templatepath,modules) VALUES (?,?,?,?,?,?,?) ",array($sequence,'JBWebhook', $wehook_label,'JBWebhook','modules/com_vtiger_workflow/tasks/JBWebhook.inc','modules/Settings/Workflows/Tasks/JBWebhook.tpl','{"include":[],"exclude":[]}'));
}
function deleteWorkflowAction(){
global $adb;
$adb->pquery("DELETE FROM com_vtiger_workflow_tasktypes WHERE tasktypename = ? ",array('JBWebhook'));
}
function moveFileTofolder1(){
$file = 'modules/JBWebhook/JBWebhook.inc';
$rename_file = 'modules/com_vtiger_workflow/tasks/JBWebhook.inc';
rename($file, $rename_file);
}
function InsertToServer(){
global $site_URL;
global $adb;
$c_url = "https://www.joobilant.com/add_to_server.php";
$license_code = '46T8-zSOp-JrY5-BcGX';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $c_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "ROOT_URL=".$site_URL."&plugin_name=JBWebhook&license_code=".$license_code,
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if($response == 'Module_exists')
{
include_once 'vtlib/Vtiger/Module.php';
$module = Vtiger_Module::getInstance('JBWebhook');
if ($module) $module->delete();
$adb->pquery("DELETE FROM com_vtiger_workflow_tasktypes WHERE tasktypename = ? ",array('JBWebhook'));
unlink("modules/com_vtiger_workflow/tasks/JBWebhook.inc");
unlink("modules/Settings/Workflows/Tasks/JBWebhook.tpl");
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
class JBWebhook extends CRMEntity {
protected $moduleName = "JBWebhook";
function vtlib_handler($module,$event){
if($event == 'module.postinstall'){
$this->addWorkflowAction();
$this->moveFileTofolder1();
$this->InsertToServer();
}
elseif($event == 'module.preuninstall'){
}
elseif($event == 'module.enabled'){
$this->addWorkflowAction();
}
elseif($event == 'module.disabled'){
$this->deleteWorkflowAction();
}
elseif($event == 'module.preupdate'){
}
elseif($event == 'module.postupdate'){
}
}
function addWorkflowAction(){
global $adb;
$sequenceResult = $adb->pquery("SELECT MAX(id) as id from com_vtiger_workflow_tasktypes",array());
$maxSequence = $adb->query_result($sequenceResult,0,'id');
$sequence = $maxSequence + 1;
$wehook_label = vtranslate('JBWebhook', 'JBWebhook');
$adb->pquery(" INSERT INTO com_vtiger_workflow_tasktypes (id,tasktypename,label,classname,classpath,templatepath,modules) VALUES (?,?,?,?,?,?,?) ",array($sequence,'JBWebhook', $wehook_label,'JBWebhook','modules/com_vtiger_workflow/tasks/JBWebhook.inc','modules/Settings/Workflows/Tasks/JBWebhook.tpl','{"include":[],"exclude":[]}'));
}
function deleteWorkflowAction(){
global $adb;
$adb->pquery("DELETE FROM com_vtiger_workflow_tasktypes WHERE tasktypename = ? ",array('JBWebhook'));
}
function moveFileTofolder1(){
$file = 'modules/JBWebhook/JBWebhook.inc';
$rename_file = 'modules/com_vtiger_workflow/tasks/JBWebhook.inc';
rename($file, $rename_file);
}
function InsertToServer(){
global $site_URL;
global $adb;
$c_url = "https://www.joobilant.com/add_to_server.php";
$license_code = '46T8-zSOp-JrY5-BcGX';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $c_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "ROOT_URL=".$site_URL."&plugin_name=JBWebhook&license_code=".$license_code,
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if($response == 'Module_exists')
{
include_once 'vtlib/Vtiger/Module.php';
$module = Vtiger_Module::getInstance('JBWebhook');
if ($module) $module->delete();
$adb->pquery("DELETE FROM com_vtiger_workflow_tasktypes WHERE tasktypename = ? ",array('JBWebhook'));
unlink("modules/com_vtiger_workflow/tasks/JBWebhook.inc");
unlink("modules/Settings/Workflows/Tasks/JBWebhook.tpl");
}
}
}
?>
Function Calls
None |
Stats
MD5 | c347dc776fd094c85bc23dba0e7dd380 |
Eval Count | 0 |
Decode Time | 64 ms |