Waraxe IT Security Portal
Login or Register
November 23, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 79
Members: 0
Total: 79
Full disclosure
APPLE-SA-11-19-2024-5 macOS Sequoia 15.1.1
Local Privilege Escalations in needrestart
APPLE-SA-11-19-2024-4 iOS 17.7.2 and iPadOS 17.7.2
APPLE-SA-11-19-2024-3 iOS 18.1.1 and iPadOS 18.1.1
APPLE-SA-11-19-2024-2 visionOS 2.1.1
APPLE-SA-11-19-2024-1 Safari 18.1.1
Reflected XSS - fronsetiav1.1
XXE OOB - fronsetiav1.1
St. Poelten UAS | Path Traversal in Korenix JetPort 5601
St. Poelten UAS | Multiple Stored Cross-Site Scripting in SEH utnserver Pro
Apple web content filter bypass allows unrestricted access to blocked content (macOS/iOS/iPadOS/visionO S/watchOS)
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> PHP script decode requests -> decode 4 files
Post new topicReply to topic View previous topic :: View next topic
decode 4 files
PostPosted: Fri Aug 31, 2012 3:42 am Reply with quote
arale
Regular user
Regular user
Joined: Aug 31, 2012
Posts: 22




Hi,

Can you help me to decode 4 files?
URL: http://www.mediafire.com/?t7a3mabyz3tyr1t

Encrypted by:
Code:
if (!function_exists("T7FC56270E7A70FA81A5935B72EACBE29"))


Thank you very much
View user's profile Send private message
PostPosted: Fri Aug 31, 2012 9:27 am Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




cielo.php
Code:
<?php

$programa = "Gateway Multicard Cielo Buy Page para WHMCS";
$versao = "2.0.1";
$data_1aVersao = "29/08/11";
$data_lastVer = "26/07/12";
$empresa = "CybernetFX";
$contato = "suporte@cybernetfx.com";
$copyright = "2010-2012";


// =========================================================== //

$GATEWAYMODULE = array
(
"cieloname" => "cielo",
"cielovisiblename" => "Cart&atilde;o de cr&eacute;dito (Cielo)",
"cielotype" => "Invoices",
);

function cielo_config() {
$configarray = array(
"FriendlyName" => array("Type" => "System", "Value"=>"Cart&atilde;o de cr&eacute;dito (Cielo)"),
"codigo_estabelecimento" => array("FriendlyName" => "C&oacute;digo do estabelecimento", "Type" => "text", "Size" => "20", "Description" => "C&oacute;digo de afilia&ccedil;&atilde;o da empresa com a Cielo", ),
"chave" => array("FriendlyName" => "Chave de acesso", "Type" => "text", "Size" => "87", "Description" => "Chave de integra&ccedil;&atilde;o informada pela Cielo", ),
"ambiente" => array("FriendlyName" => "Ambiente de teste", "Type" => "yesno", "Description" => "Marque para usar o ambiente de testes da Cielo (use o c&oacute;digo e a chave de testes)", ),
"tipo_captura" => array("FriendlyName" => "Tipo de Captura", "Type" => "dropdown", "Options" => "Manual,Automatica", "Description" => "Se captura manual, capturar no portal Cielo em at&eacute; 5 dias (recomendado para minimizar fraude)", ),
"visa" => array("FriendlyName" => "Pagamento com Visa", "Type" => "yesno", "Description" => "Marque para permitir", ),
"master" => array("FriendlyName" => "Pagamento com Master", "Type" => "yesno", "Description" => "Marque para permitir", ),
"amex" => array("FriendlyName" => "Pagamento com Amex", "Type" => "yesno", "Description" => "Marque para permitir", ),
"elo" => array("FriendlyName" => "Pagamento com Elo", "Type" => "yesno", "Description" => "Marque para permitir", ),
"diners" => array("FriendlyName" => "Pagamento com Diners", "Type" => "yesno", "Description" => "Marque para permitir", ),
"discover" => array("FriendlyName" => "Pagamento com Discover", "Type" => "yesno", "Description" => "Marque para permitir", ),
"valor_minimo" => array("FriendlyName" => "Parcela m&iacute;nima", "Type" => "text", "Size" => "20", "Description" => "Valor m&iacute;nimo de cada parcela (N&atilde;o use v&iacute;rgula, use ponto. Ex: 5.00", ),


"parcela2" => array("FriendlyName" => "Parcelamento em 2x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela3" => array("FriendlyName" => "Parcelamento em 3x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela4" => array("FriendlyName" => "Parcelamento em 4x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela5" => array("FriendlyName" => "Parcelamento em 5x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela6" => array("FriendlyName" => "Parcelamento em 6x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela7" => array("FriendlyName" => "Parcelamento em 7x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela8" => array("FriendlyName" => "Parcelamento em 8x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela9" => array("FriendlyName" => "Parcelamento em 9x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela10" => array("FriendlyName" => "Parcelamento em 10x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela11" => array("FriendlyName" => "Parcelamento em 11x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
"parcela12" => array("FriendlyName" => "Parcelamento em 12x", "Type" => "dropdown", "Options" => "Nao exibir,Sem juros pelo estabelecimento,Com juros pelo emissor", "Description" => "Estabelecimento = Sua empresa | Emissor = Emissor do cart&atilde;o", ),
);
return $configarray;
}

function cielo_link($params) {

# Dados do modulo
$gatewayparcela = array();
for ($i = 2; $i <= 12; $i++){
$nome = 'parcela'.$i;
$gatewayparcela[$i] = $params[$nome];
}
$gatewayjuros = $params['juros'];
$gatewaytipojuros = $params['tipo_juros'];
$vl_minimo = $params['valor_minimo'];

$gatewaypagvalidos = array('visa'=>$params['visa'],
'elo'=>$params['elo'],
'master'=>$params['master'],
'diners'=>$params['diners'],
'discover'=>$params['discover'],
'amex'=>$params['amex']);

# Gateway Specific Variables
//$gatewayusername = $params['username'];
//$gatewaytestmode = $params['testmode'];

# Invoice Variables
$invoiceid = $params['invoiceid'];
$description = $params["description"];
$amount = $params['amount']; # Format: ##.##
$currency = $params['currency']; # Currency Code

# Client Variables
$firstname = $params['clientdetails']['firstname'];
$lastname = $params['clientdetails']['lastname'];
$email = $params['clientdetails']['email'];
$address1 = $params['clientdetails']['address1'];
$address2 = $params['clientdetails']['address2'];
$city = $params['clientdetails']['city'];
$state = $params['clientdetails']['state'];
$postcode = $params['clientdetails']['postcode'];
$country = $params['clientdetails']['country'];
$phone = $params['clientdetails']['phonenumber'];

# System Variables
$companyname = $params['companyname'];
$systemurl = $params['systemurl'];
$currency = $params['currency'];

# Enter your code submit to the gateway...
$parcelas = urlencode(serialize($gatewayparcela));
$gatewaypagvalidos = urlencode(serialize($gatewaypagvalidos));
$code = '<form action="' . $params['systemurl'] . '/modules/gateways/cielo/receptor.php" method="post">
<input type="hidden" name="username" value="'.$gatewayusername.'" />
<input type="hidden" name="testmode" value="'.$gatewaytestmode.'" />
<input type="hidden" name="description" value="'.$description.'" />
<input type="hidden" name="invoiceid" value="'.$invoiceid.'" />
<input type="hidden" name="parcela1" value="'.$parcelas.'" />
<input type="hidden" name="juros" value="'.$gatewayjuros.'" />
<input type="hidden" name="pagvalidos" value="'.$gatewaypagvalidos.'" />
<input type="hidden" name="tipo_juros" value="'.$gatewaytipojuros.'" />
<input type="hidden" name="valor_minimo" value="'.$vl_minimo.'" />
<input type="hidden" name="amount" value="'.$amount.'" />
<input type="submit" value=" Pagar " />
</form>';

//print_r (unserialize(urldecode($parcelas)));
return $code;
}

function cielo_refund($params) {

# Gateway Specific Variables
$gatewayusername = $params['username'];
$gatewaytestmode = $params['testmode'];

# Invoice Variables
$transid = $params['transid']; # Transaction ID of Original Payment
$amount = $params['amount']; # Format: ##.##
$currency = $params['currency']; # Currency Code

# Client Variables
$firstname = $params['clientdetails']['firstname'];
$lastname = $params['clientdetails']['lastname'];
$email = $params['clientdetails']['email'];
$address1 = $params['clientdetails']['address1'];
$address2 = $params['clientdetails']['address2'];
$city = $params['clientdetails']['city'];
$state = $params['clientdetails']['state'];
$postcode = $params['clientdetails']['postcode'];
$country = $params['clientdetails']['country'];
$phone = $params['clientdetails']['phonenumber'];

# Card Details
$cardtype = $params['cardtype'];
$cardnumber = $params['cardnum'];
$cardexpiry = $params['cardexp']; # Format: MMYY
$cardstart = $params['cardstart']; # Format: MMYY
$cardissuenum = $params['cardissuenum'];

# Perform Refund Here & Generate $results Array, eg:
$results = array();
$results["status"] = "success";
$results["transid"] = "12345";

# Return Results
if ($results["status"]=="success") {
return array("status"=>"success","transid"=>$results["transid"],"rawdata"=>$results);
} elseif ($gatewayresult=="declined") {
return array("status"=>"declined","rawdata"=>$results);
} else {
return array("status"=>"error","rawdata"=>$results);
}

}

?>

_________________
Go BIG or go HOME !
View user's profile Send private message
PostPosted: Fri Aug 31, 2012 9:28 am Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




cieloConsulta.php
Code:
<?php

$programa = "Gateway Multicard Cielo Buy Page para WHMCS";
$versao = "2.0.1";
$data_1aVersao = "29/08/11";
$data_lastVer = "26/07/12";
$empresa = "CybernetFX";
$contato = "suporte@cybernetfx.com";
$copyright = "2010-2012";


// =========================================================== //

include("../../../dbconnect.php");
include("../../../includes/functions.php");
include("../../../includes/gatewayfunctions.php");
include("../../../includes/invoicefunctions.php");


$gatewaymodule = "cielo"; # Enter your gateway module name here replacing template

// Faz a conexao com o banco de dados

mysql_select_db($db_name, mysql_connect($db_host, $db_username, $db_password)) or print (mysql_error());

try{
$oID = 0;
$status = 8;

$xmldoc = new DOMDocument();

$xmldoc->load('../cielo/relatorio.xml', LIBXML_NOBLANKS);

$xml_tid = $xmldoc->firstChild->getElementsByTagname('tid');
foreach ($xml_tid as $value)
$tid = $value->nodeValue;

$xml_url = $xmldoc->firstChild->getElementsByTagname('url');
foreach ($xml_url as $value)
$url_servico = $value->nodeValue;

$xml_af = $xmldoc->firstChild->getElementsByTagname('afiliacao');
foreach ($xml_af as $value)
$afiliacao = $value->nodeValue;

$xml_ch = $xmldoc->firstChild->getElementsByTagname('chave');
foreach ($xml_ch as $value)
$chave = $value->nodeValue;

$xml_oscsid = $xmldoc->firstChild->getElementsByTagname('oscsid');
foreach ($xml_oscsid as $value)
$oscsid = $value->nodeValue;

//CONVERTE A STRING(12345) P/ 123,45
function formato_monetario($string) {
$string = (int) $string;
if ($string != 0
)return "R$" . substr($string, 0, -2) . "," . substr($string, -2);
return "R$0,00";
}

$relatorio_tid = "";
$relatorio_pan = "";
$relatorio_dados_pedido_numero = "";
$relatorio_dados_pedido_valor = "";
$relatorio_autenticacao_mensagem = "";
$relatorio_autorizacao_mensagem = "";
$relatorio_autorizacao_lr = "";
$pedido = $_GET['pedido'];
//$relatorio_autorizacao_data_hora = "";

/* Abre o arquivo externo requisicao-consulta.xml e o atribui a variavel $xml */
$fp = fopen("xml/requisicao-consulta.xml", "r");

//$fp = fopen("./xml/requisicao-consulta.xml", "r");
$char = "";
while (!feof($fp)) {
$char .= fgetc($fp);
}

fclose($fp);

$xml = $char;

$mensagem = sprintf($xml, $tid, $afiliacao, $chave);

/* Iniciando CURL */
$ch = curl_init();

/* Verificamos se o recurso CURL foi criado com exito */
if (is_resource($ch)) {
curl_setopt($ch, CURLOPT_HEADER, 0);

/* Codigo usa para a app funcionar sem o certificado da cielo */
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

//curl_setopt( $curl , CURLOPT_RETURNTRANSFER , 1 );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url_servico);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('mensagem' => $mensagem)));

$xml = curl_exec($ch);
$ern = curl_errno($ch);
$err = curl_error($ch);

curl_close($ch);

if ((bool) $ern) {
echo 'Ocorreu um erro [', $ern, ']: ', $err;
} else {

$DadosEnvio = simplexml_load_string($xml);

//var_dump($DadosEnvio);

foreach ($DadosEnvio->children() as $child) {

if ($child->getName() == "tid")
$relatorio_tid = (string) $child;

if ($child->getName() == "pan")
$relatorio_pan = (string) $child;

if ($child->getName() == "dados-pedido") {
$relatorio_dados_pedido_numero = (string) $child->numero;
$relatorio_dados_pedido_valor = formato_monetario((string) $child->valor);
}

if ($child->getName() == "autenticacao") {
$relatorio_autenticacao_mensagem = utf8_decode((string) $child->mensagem);
}
if ($child->getName() == "forma-pagamento"){

$bandeira = utf8_decode((string) $child->bandeira);

}

if ($child->getName() == "autorizacao") {
$relatorio_autorizacao_mensagem = utf8_decode((string) $child->mensagem);
$relatorio_autorizacao_lr = utf8_decode((string) $child->lr);
//$relatorio_autorizacao_data_hora = utf8_decode((string) $child->nsu);
}
}

// Executar o API do WHMCS

$url = mysql_fetch_assoc(mysql_query("SELECT value FROM tblconfiguration WHERE setting='SystemURL'"));
$url = $url[value]."includes/api.php"; // Endereco do arquivo api.php do seu WHMCS

// Pegamos campo Admin do modulo da Cielo
$login = mysql_fetch_assoc(mysql_query("SELECT value FROM tblpaymentgateways WHERE gateway='cielo' AND setting='admin'"));

// Pegamos a senha do seu username do WHMCS ja em md5 para conectarmos no API.
$senha = mysql_fetch_assoc(mysql_query("SELECT password FROM tbladmins WHERE username='".$login[value]."'"));

// Pegamos o ID do cliente.
$id_cliente = mysql_fetch_assoc(mysql_query("SELECT userid FROM tblinvoices WHERE id='".$pedido."'"));

// Pega o valor real do servico atraves do Invoice ID.
$valor = mysql_fetch_assoc(mysql_query("SELECT total FROM tblinvoices WHERE id='".$pedido."'")) or die(mysql_error());
//var_dump ($valor);
//$porcentagem = $valor[total] * (3.70/100);
$postfields["username"] = $login[value];
$postfields["password"] = $senha[password];
$postfields["action"] = "addinvoicepayment";
$postfields["clientid"] = $id_cliente[userid];

/* Codigo para adicionar o pagamento ao WHMCS */
$postfields["invoiceid"] = $pedido;
$postfields["transid"] = $relatorio_tid.' - Bandeira: '.$bandeira.' Codigo de autoriza&ccedil;&atilde;o: '.$relatorio_autorizacao_lr;
$postfields["amount"] = $valor['total'];
$postfields["fees"] = $porcentagem;
$postfields["gateway"] = 'cielo';
$postfields["noemail"] = false;

/*$whmcs = curl_init();
curl_setopt($whmcs, CURLOPT_URL, $url);
curl_setopt($whmcs, CURLOPT_POST, 1);
curl_setopt($whmcs, CURLOPT_TIMEOUT, 100);
curl_setopt($whmcs, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($whmcs, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($whmcs);
curl_close($whmcs);*/

if ($relatorio_autorizacao_lr!='00') {
# Unsuccessful
logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); # Save to Gateway Log: name, data array, status
} else {
# Successful
addInvoicePayment($postfields["invoiceid"],$postfields["transid"],$postfields["amount"],$postfields["fees"],$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, fees, modulename
logTransaction($GATEWAY["name"],$_POST,"Successful"); # Save to Gateway Log: name, data array, status
}

echo '<div style="font-family: Verdana, Arial; font-size: 11px;"> <h2>Resumo da transa&ccedil;&atilde;o</h2>';
echo "<h4>Dados da transa&ccedil;&atilde;o realizada no ambiente da Cielo.</h4>";
$msg_compra .= "<b>TID: </b>" . $relatorio_tid;
$msg_compra .= "<br/><b>Hash do cart&atilde;o: </b>" . $relatorio_pan;
//$msg_compra .= "<br/><b>Codigo nsu: </b>" . $relatorio_autorizacao_data_hora;
$msg_compra .= "<br/><b>Bandeira: </b>" . $bandeira;
$msg_compra .= "<br/><b>N&deg; do pedido: </b>" . $relatorio_dados_pedido_numero;
$msg_compra .= "<br/><b>Valor do pedido: </b>" . $relatorio_dados_pedido_valor;
$msg_compra .= "<br/><b>Mensagem da autentica&ccedil;&atilde;o: </b>" . $relatorio_autenticacao_mensagem;
$msg_compra .= "<br/><b>Mensagem da autoriza&ccedil;&atilde;o: </b>";
if ($relatorio_autorizacao_lr != 0){
$msg_compra .= '<label style="color:#FF0000;">';
}
$msg_compra .= formatMessage($relatorio_autorizacao_mensagem);
if ($relatorio_autorizacao_lr != 0){
$msg_compra .= '</label>';
}
$msg_compra .= "<br/><b>C&oacute;digo do retorno da autoriza&ccedil;&atilde;o: </b>" . $relatorio_autorizacao_lr;

if ($relatorio_autorizacao_lr != 0){
$msg_compra .= '<br>Houve um problema com seu pagamento. Clique no link acima para voltar para a fatura e tentar novamente.';
}
$msg_compra .= '</div>';
echo $msg_compra;

echo '
<script type="text/javascript">
function exibeField(){
window.top.$("#fieldForm").slideDown();
}
</script>';
}
} else {
echo 'N&atilde;o foi possivel criar o recurso da cURL';
}
} catch (Exception $e){
echo $e;
}

function formatMessage($message)
{
$message = str_replace("c", "ç", $message);
$message = str_replace("a", "ã", $message);
return $message;

}

?>

_________________
Go BIG or go HOME !
View user's profile Send private message
PostPosted: Fri Aug 31, 2012 9:28 am Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




receptor.php
Code:
<?php

$programa = "Gateway Multicard Cielo Buy Page para WHMCS";
$versao = "2.0.1";
$data_1aVersao = "29/08/11";
$data_lastVer = "26/07/12";
$empresa = "CybernetFX";
$contato = "osclicenca@gmail.com";
$cliente = "Severino Santos";
$site = "www.w3case.com.br";
$instalacao = "21/08/12";
$copyright = "2010-2012";


$dom = explode('.',$_SERVER["HTTP_HOST"]);
$ip = $_SERVER["SERVER_ADDR"];

if($dom['0'] != 'www'){
$dominio_sem_www = $_SERVER["HTTP_HOST"];
$dominio_com_www = 'www.'.$_SERVER["HTTP_HOST"];
}else{
unset($dom['0']);
$dominio_sem_www = implode('.',$dom);
$dominio_com_www = $_SERVER["HTTP_HOST"];
}

// BOF EDIT

$dominiovalido_sem_www = 'sac.w3case.com.br'; // Dominio do cliente sem www
$dominiovalido_com_www = 'www.sac.w3case.com.br'; // Dominio do cliente com www

$dominiovalido2_sem_www = 'w3case.com.br'; // Dominio do cliente sem www
$dominiovalido2_com_www = 'www.w3case.com.br'; // Dominio do cliente com www

// EOF EDIT

if (($dominio_sem_www != $dominiovalido_sem_www OR $dominio_com_www != $dominiovalido_com_www) AND
($dominio_sem_www != $dominiovalido2_sem_www OR $dominio_com_www != $dominiovalido2_com_www)){

echo '<center><div style="width:600px; border:2px solid #BCBCBC; padding:25px; font-size:12px; font-family:Verdana, Tahoma, Arial;" align="left"><b>Programa:</b> ' . $programa . ' - v' . $versao . '<br><b>Dominio licenciado:</b> <a href="http://' . $dominiovalido_com_www . '">' . $dominiovalido_com_www . '</a>' . "\n" .
'<br><br><font color="red">O dominio: <b>' . "\n" . $_SERVER["HTTP_HOST"] . "\n(IP: " . $_SERVER["SERVER_ADDR"] .
")\n\n" . '</b> nao esta autorizado a executar este programa.</font><br><br>Se voce e o responsavel por este site, copie os dados desta mensagem e envie por email para <a href="mailto:' . $contato . '">' . $contato . '</a></div></center>';

mail($contato, $programa, 'ATENCAO: Tentativa de uso nao autorizado do programa licenciado para ' . $dominiovalido_com_www . ' no dominio ' . $_SERVER["HTTP_HOST"] . ' com o IP ' . $_SERVER["SERVER_ADDR"]);
exit;
}


// =========================================================== //

else {

$nome = $_POST['username'];
$tipo_juros = $_POST['tipo_juros'];
$juros = $_POST['juros'];
$cod_compra = $_POST['invoiceid'];
$valor = $_POST['amount'];
$valorb = $_POST['amount'];
$valor = explode('.',$valor);
$minimo = $_POST['valor_minimo'];
$pag_validos = unserialize(urldecode($_POST['pagvalidos']));
# Required File Includes

//print_r($pag_validos);

//var_dump ($valor);

for ($c = 0; $c <= sizeof($valor);$c++){
$total .= $valor[$c];
//echo $total;
}
//$valor = explode('.',$valor);

$parcela = unserialize(urldecode($_POST['parcela1']));
//var_dump ($parcela);

$parcelas_validas = array();
$i = 2;

foreach ($parcela as $key=>$valor){
if ($valor != 'Nao exibir'){
if (($valorb / $i) > $minimo) $parcelas_validas[$i] = $valor;
$i++;
}
}
//print_r ($parcelas_validas);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pagamento via Cielo</title>
<style>
.loader {
display: none;
}
.formulario{
width: 850px;
padding: 100px;
margin: 0 auto;
}
.formulario fieldset{
border: border:solid 2px #b7ddf2;
background:#ebf4fb;
}
.formulario h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
.formulario label{
display:block;
font-family:Verdana, Geneva, sans-serif;
font-size:10px;
font-weight:bold;
text-align:right;
width:150px;
float:left;
padding-left:30px;

}
.formulario p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.formulario campos{
float:left;
padding:4px 2px;
margin:2px 0 20px 10px;
}
</style>
</head>
<div id="estilizado" class="formulario">
<fieldset id="fieldForm">
<legend><img src="images/cielo.jpg" /></legend>
<p> ;;</p>
<form method="post" action="transacao.php">
<input type="hidden" id="nome" value="<?php echo $nome; ?>" name="nome" />
<input type="hidden" id="cod_compra" value="<?php echo $cod_compra; ?>" name="cod_compra" />
<input type="hidden" id="total" value="<?php echo $total; ?>" name="valor" />
<input type="hidden" id="tipo_juros" value="<?php echo $tipo_juros; ?>" name="tipo_juros" />
<input type="hidden" id="juros" value="<?php echo $juros; ?>" name="juros" />

<label>
Selecione o Cart&atilde;o: ;;
</label>
<?php
if ($pag_validos['visa'] == 'on'){

?>
<img src="images/visa.gif" /><input type="radio" name="bandeira" id="bandeira" value="visa" checked="checked" /> ;; ;; ;;
<?php
}

if ($pag_validos['master'] == 'on'){
?>
<img src="images/mastercard.gif" /><input type="radio" name="bandeira" id="bandeira" value="mastercard" /> ;; ;; ;;
<?php
}

if ($pag_validos['elo'] == 'on'){
?>
<img src="images/elo.gif" /><input type="radio" name="bandeira" id="bandeira" value="elo" /> ;; ;; ;;
<?php
}

if ($pag_validos['amex'] == 'on'){
?>
<img src="images/amex.gif" /><input type="radio" name="bandeira" id="bandeira" value="amex" /> ;; ;; ;;
<?php
}

if ($pag_validos['discover'] == 'on'){
?>
<img src="images/discover.gif" /><input type="radio" class="discover" name="bandeira" id="bandeira" value="discover" /> ;; ;;
<?php
}

if ($pag_validos['diners'] == 'on'){
?>
<img src="images/diners.gif" /><input type="radio" name="bandeira" id="bandeira" value="diners" />
<?php
}

?>

<br /><br />

<label>Forma de Pagamento: ;;
</label>
<select name="parcelas" id="parcelas">
<option value="A">Cart&atilde;o de D&eacute;bito</option>
<option value="1">Cr&eacute;dito &agrave; vista</option>
<?php
$x = int;
$x = 2;
for ($i = 0; $i <= sizeof($parcelas_validas); $i++){
if ($x == key($parcelas_validas)){
$lst .= '<option juros="'.$parcelas_validas[$x].'" value="'.$x.'"> '.$x."X ".$parcelas_validas[$x].' </option>';
}
next($parcelas_validas);
$x++;
}
echo $lst;
?>
</select>
<select name="parcelas1" id="parcelas2" style="display: none;" >
<option value="1">Cr&eacute;dito &agrave; vista</option>
</select>
<br />
<input style="margin-left: 400px;" type="button" id="pagar" value=" Pagar " name="pagar" />
</form>
<br />
<span style="font-family:Verdana, Geneva, sans-serif; font-size: 10px; color:#F00; margin-top: 30px; margin-left: 120px;">OBS: A transa&ccedil;&atilde;o ser&aacute; efetuada abaixo no servidor seguro da Cielo</span><br /><br />
</fieldset>
<br />
<a href="../../../viewinvoice.php?id=<?php echo $cod_compra; ?>" style="font-family:Verdana, Geneva, sans-serif; font-size:10px;">Voltar para a fatura</a>
<div id="recebe"><img src="images/carregando.gif" class="loader" /></div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(".discover").click(function(){
$("select[name=parcelas]").hide();
$("select[name=parcelas1]").show();
});
$("input[type=radio][value!=discover]").click(function(){
$("select[name=parcelas]").show();
$("select[name=parcelas1]").hide();
if ($(this).val() == "visa"){
if ($("select option:first").val() != "A"){
$("select#parcelas option[value=1]").before("<option value=\"A\">Cart&atilde;o de D&eacute;bito</option>");
}
}else{
$("select option[value=A]").remove();
}
});

$("#pagar").click(function(){
var nome = $("#nome").val();
var cod_compra = $("#cod_compra").val();
var total = $("#total").val();
var bandeira = $("input[type=radio]:checked").val();
if (bandeira=="discover"){
var parcelas = $("#parcelas2").val();
}else{
var parcelas = $("#parcelas").val();
var tipo_juros = $("#parcelas option:selected").attr("juros");
}
var juros = $("#juros").val();

$.ajax({
type: 'POST',
data: "nome="+ nome
+"&valor="+total
+"&cod_compra="+cod_compra
+"&bandeira="+bandeira
+"&parcelas="+parcelas
+"&juros="+juros
+"&tipo_juros="+tipo_juros,
url: "transacao.php",
cache: false,
success: function (valor,status){
// window.alert(parcelas);
$("#recebe").html(valor);
},
beforeSend: function(){
$(".loader").css({display:"block"});
} ,
complete: function(){
$(".loader").css({display:"none"});
$("#fieldForm").slideUp();
}
});

});
</script>
</body>
</html>

_________________
Go BIG or go HOME !
View user's profile Send private message
PostPosted: Fri Aug 31, 2012 9:28 am Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




transacao.php
Code:
<?php

$programa = "Gateway Multicard Cielo Buy Page para WHMCS";
$versao = "2.0.1";
$data_1aVersao = "29/08/11";
$data_lastVer = "26/07/12";
$empresa = "CybernetFX";
$contato = "suporte@cybernetfx.com";
$copyright = "2010-2012";


//---------------- FIM ----------------

# Required File Includes
include("../../../dbconnect.php");
include("../../../includes/functions.php");
include("../../../includes/gatewayfunctions.php");
include("../../../includes/invoicefunctions.php");


mysql_select_db($db_name, mysql_connect($db_host, $db_username, $db_password)) or print (mysql_error());

$gatewaymodule = "cielo";

$GATEWAY = getGatewayVariables($gatewaymodule);

header("Content-Type: text/html");
$parcelas = $_POST['parcelas'];
$valor = $_POST['valor'];
$pedido = $_POST['cod_compra'];
$tipo_juros = $_POST['tipo_juros'];
$afiliacao = $GATEWAY['codigo_estabelecimento'];
$chave = $GATEWAY['chave'];
$bandeira = strtolower($_POST['bandeira']);

if ($parcelas > 1){
if (preg_match('/sem/i',$tipo_juros)){
$produto = 2;
}else{
$produto = 3;
}

}else{
if($parcelas == "A"){
$produto = "A";
$parcelas = 1;
}else{
$produto = 1;
}
}
$ambiente = mysql_fetch_assoc(mysql_query("SELECT value FROM tblpaymentgateways WHERE gateway='cielo' AND setting='ambiente'"));

if($ambiente['value'] == 'on'){
$url_servico = "https://qasecommerce.cielo.com.br/servicos/ecommwsec.do";
}else{
$url_servico = "https://ecommerce.cbmp.com.br/servicos/ecommwsec.do";
}

$tipo_captura = mysql_fetch_assoc(mysql_query("SELECT value FROM tblpaymentgateways WHERE gateway='cielo' AND setting='tipo_captura'"));

if($tipo_captura['value'] == 'Manual'){
$capturar = 'false';
}else{
$capturar = 'true';
}

$tid = "";
$autorizar = 2;
if (($bandeira == 'amex') || ($bandeira == 'elo') || ($bandeira == 'discover') || ($bandeira == 'diners')){
$autorizar = 3;
}

/* Abre o arquivo externo requisicao-transacao.xml e o atribui a variA?vel $xml */
$fp = fopen("./xml/requisicao-transacao.xml", "r");
while (!feof($fp)) {
$char .= fgetc($fp);
}
fclose($fp);
$xml = $char;
/* fim */

/* Data no formato que eles esperam */
$data = strftime('%Y-%m-%dT%H:%M:%S');


/*
URL de retorno, a Cielo precisa conseguir acessar essa URL para enviar o retorno, entA?o
nA?o coloque LOCALHOST aqui.
*/
$curDir = dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
$script_directory = substr($curDir, 0, strrpos($curDir, '/'));
$retorno = $script_directory ."/callback/cieloConsulta.php?pedido=".$pedido;

/* Montando a mensagem com os dados acima. */
$mensagem = sprintf($xml, $afiliacao, $chave, $pedido, $valor, $data, $bandeira, $produto, $parcelas, $retorno, $autorizar, $capturar);

/* Iniciando CURL */
$ch = curl_init();

/* Verificamos se o recurso CURL foi criado com A?xito */
if (is_resource($ch)) {
curl_setopt($ch, CURLOPT_HEADER, 0);

/* CA?digo usa para a app funcionar sem o certificado da cielo */
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

//curl_setopt( $curl , CURLOPT_RETURNTRANSFER , 1 );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url_servico);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('mensagem' => $mensagem)));

$xml = curl_exec($ch);
$ern = curl_errno($ch);
$err = curl_error($ch);

/*
echo '<pre>';
print_r(curl_getinfo( $ch ));
echo '</pre>';
*/

curl_close($ch);

if ((bool) $ern) {
echo 'Ocorreu um erro [', $ern, ']: ', $err;
} else {
//var_dump($xml, $ern, $err);
//echo $xml;

$DadosEnvio = simplexml_load_string($xml);

if ( $DadosEnvio->getName() == "erro" ) {
echo "<h1>Erro!</h1>";
foreach ($DadosEnvio->children() as $child) {
if ( $child->getName() == "codigo" ) echo "<b>Codigo: </b>" . (string) $child . "<br/>";
if ( $child->getName() == "mensagem" ) echo "<b>Mensagem: </b>" . utf8_decode ( (string) $child ) . "<br/>";
}
exit;
}

foreach ($DadosEnvio->children() as $child) {

if ($child->getName() == "url-autenticacao")
$url_autenticacao = (string) $child;

if ($child->getName() == "tid")
$tid = (string) $child;
}

#versao do encoding xml
$dom = new DOMDocument("1.0", "iso-8859-1");
#retirar os espacos em branco
$dom->preserveWhiteSpace = false;
#gerar o codigo
$dom->formatOutput = true;
#criando o nA? principal (root)
$root = $dom->createElement("root");

$rel_tid = $dom->createElement("tid", $tid);
$rel_url = $dom->createElement("url", $url_servico);
$rel_af = $dom->createElement("afiliacao", $afiliacao);
$rel_ch = $dom->createElement("chave", $chave);

$root->appendChild($rel_tid);
$root->appendChild($rel_url);
$root->appendChild($rel_af);
$root->appendChild($rel_ch);
$dom->appendChild($root);

# Para salvar o arquivo, descomente a linha
$dom->save("relatorio.xml");



if ($url_autenticacao != "") {
echo '<iframe src="'.$url_autenticacao.'" frameborder=0 width="890" height="670"></iframe>';
} else {
echo $xml;
}


}
} else {
echo 'NA?o foi possA­vel criar o recurso da cURL';
}

?>

_________________
Go BIG or go HOME !
View user's profile Send private message
PostPosted: Sat Sep 01, 2012 2:55 am Reply with quote
arale
Regular user
Regular user
Joined: Aug 31, 2012
Posts: 22




thank youuuuu Very Happy
View user's profile Send private message
decode 4 files
www.waraxe.us Forum Index -> PHP script decode requests
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.049 Seconds