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: 122
Members: 0
Total: 122
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 -> I can not decode this Help thank you
Post new topicReply to topic View previous topic :: View next topic
I can not decode this Help thank you
PostPosted: Thu Oct 28, 2010 10:21 am Reply with quote
zorbacky
Beginner
Beginner
Joined: Oct 28, 2010
Posts: 1




Help, I try but can not decode this code.
Code:
<?php $_F=__FILE__;$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yAgLy8gT24gNG1wcjRtNSBsNSBwcjR4DQoJDQoJJHBkZi0+UzV0WSgkeV8xeDUrJDRudDVybDRnbjUrNmUpOyAvL09uIHM1IGQmI2FvbztjMWxsNSBkNSA2ZSBtbSBzMjNzIGw1IG4ybSBkMyBwcjJkMzR0DQoJJHBkZi0+UzV0WCgkeF8xeDUpOyAvLyBPbiBzNSBwMnM0dDQybm41ICYjYWF1OyAkeF8xeDUNCiAgJHBkZi0+SW0xZzUoJy4uLy4uLzRtZy9wLycuJDRtZyk7DQogICQ0bnQ1cmw0Z241PSQ0bnQ1cmw0Z241KyRzcDFjNV95OyAvLyBPbiAxajIzdDUgbCc1c3AxYzUgY2gyNHM0IDFwciYjYW9hO3MgM24gcHIyZDM0dC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE9uIHMxM3Q1IGQybmMgZDUgJHNwMWM1X3kgcDIzciBsNSBwcjJkMzR0IHMzNHYxbnQgDQogICRuNXdwMWc1PTA7DQogICQ0PSQ0KzY7DQogIA0KfQ0KfQ0KDQoNCi8vUzEzdjVnMXJkNSBkMyBQREYgZDFucyBsNSBmNGNoNDVyDQokcGRmLT5PM3RwM3QoJGY0bDVuMW01LCAnRicpOw0KLy9SNWQ0cjVjdDQybg0KaDUxZDVyKCdMMmMxdDQybjogJy4kZjRsNW4xbTUpOyAvLyAybiAxZmY0Y2g1IGw1IFBERg0KPz4=';eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCcxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));?>
View user's profile Send private message
PostPosted: Thu Oct 28, 2010 2:52 pm Reply with quote
tsabitah
Valuable expert
Valuable expert
Joined: Jul 07, 2010
Posts: 328
Location: surabaya




Code:
<?php
// Module Créer Catalogue PDF
// Version 2.0 du 18/05/2009
// Utilise TCPDF
// Crée par Vinum Master
///////////////////////////////////////////////////////////////////////////////////////////////////
// A part pour les programmeurs ou connaisseur la partie ci-dessous ne devrait pas être modifiée //
///////////////////////////////////////////////////////////////////////////////////////////////////
require_once('../../tools/tcpdf/config/lang/eng.php');
require_once('../../tools/tcpdf/tcpdf.php');
include('../../config/config.inc.php');
//Récupération des données envoyées par le module Prestashop pour la génération du PDF
$monnaie = $_POST['id_currency'];
$langue = $_POST['id_lang'];
$titre = $_POST['title'];
$titre = stripslashes($titre);
// espace entre chaque produit
$space_y = $_POST['interligne'];
// nombre max de produits par page
$max = $_POST['max'];
// nom du fichier pdf
$filename = $_POST['filename'];
if ($filename == "") {
$filename = "doc.pdf";
}
// info du footer de la première page
$info_footer_page = $_POST['info_footer_page1'];
$info_footer_page = stripslashes($info_footer_page);
// Espace en haut de chaque page
$y_axe = $_POST['y_axe'];
// affichage ou nom d'une url cliquable sur le nom des produits
$add_url = $_POST['add_url'];
// Couleur hexadécimale de la cellule des catégories
$color_categories = $_POST['color_categories'];
// Couleur hexadécimale de la cellule des catégories
$color_products = $_POST['color_products'];
$base_url = $_POST['base_url'];
$skip_categories = $_POST['skipcat'];
if ($skip_categories != '')
$skip_cat_base = implode(',', $skip_categories);
//Récupération des données de connection à la base de données
$host = _DB_SERVER_;
$login = _DB_USER_;
$password = _DB_PASSWD_;
$base = _DB_NAME_;
//Connection à la base de données
mysql_connect($host, $login, $password) or die(mysql_error());
mysql_select_db($base);
// Mise à jour de la base de donnée
$r1 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET ps_configuration.value="' . $titreb . '" WHERE ps_configuration.name="VINUM_PDF_TITLE"';
$res1 = mysql_query($r1);
$r2 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value=' . $space_y . ' WHERE name="VINUM_PDF_YPROD"';
$res2 = mysql_query($r2);
$r3 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value=' . $max . ' WHERE name="VINUM_PDF_MAX"';
$res3 = mysql_query($r3);
$r4 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value="' . $info_footer_pageb . '" WHERE name="VINUM_PDF_FOOTER"';
$res4 = mysql_query($r4);
$r5 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value=' . $y_axe . ' WHERE name="VINUM_PDF_YCAT"';
$res5 = mysql_query($r5);
$r6 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value=' . $add_url . ' WHERE name="VINUM_PDF_URL"';
$res6 = mysql_query($r6);
$r7 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value="' . $color_categories . '" WHERE name="VINUM_PDF_COLOR_CAT"';
$res7 = mysql_query($r7);
$r8 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value="' . $color_products . '" WHERE name="VINUM_PDF_COLOR_PROD"';
$res8 = mysql_query($r8);
$r9 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value="' . $skip_cat_base . '" WHERE name="VINUM_PDF_SKIP_CAT"';
$res9 = mysql_query($r9);
$r10 = 'UPDATE ' . _DB_PREFIX_ . 'configuration SET value="' . $filenameb . '" WHERE name="VINUM_PDF_FILENAME"';
$res10 = mysql_query($r10);
//Requète pour récupérer le signe des devises et le taux de conversion
$requetedevise = 'SELECT sign,conversion_rate from ' . _DB_PREFIX_ . 'currency WHERE id_currency=' . $monnaie;
$resultdevise = mysql_query($requetedevise);
$rowdevise = mysql_fetch_array($resultdevise);
$signedevise = $rowdevise['sign'];
// Problème avec le signe euro. Forcage du signe ˆ
if (ord($signedevise) == 63)
$signedevise = chr(128);
$tauxdevise = $rowdevise['conversion_rate'];
//Requète pour récupérer les images taille medium, les catégories, noms de produits, descriptions courtes et prix
//selon la langue et la devise et ordonnées en catégories
$requete = 'SELECT ' . _DB_PREFIX_ . 'product.id_product,' . _DB_PREFIX_ . 'product.price,' . _DB_PREFIX_ . 'product_lang.description_short,' . _DB_PREFIX_ . 'image_lang.legend,' . _DB_PREFIX_ . 'image.id_image,' . _DB_PREFIX_ . 'category_product.id_category,' . _DB_PREFIX_ . 'category_lang.name FROM ' . _DB_PREFIX_ . 'product,' . _DB_PREFIX_ . 'product_lang,' . _DB_PREFIX_ . 'image,' . _DB_PREFIX_ . 'image_lang,' . _DB_PREFIX_ . 'category_product,' . _DB_PREFIX_ . 'category_lang where (' . _DB_PREFIX_ . 'product.id_product=' . _DB_PREFIX_ . 'product_lang.id_product AND ' . _DB_PREFIX_ . 'product_lang.id_lang=' . $langue . ' AND ' . _DB_PREFIX_ . 'image.id_product=' . _DB_PREFIX_ . 'product.id_product AND ' . _DB_PREFIX_ . 'image.id_image=' . _DB_PREFIX_ . 'image_lang.id_image AND ' . _DB_PREFIX_ . 'image_lang.id_lang=' . $langue . ' AND ' . _DB_PREFIX_ . 'category_product.id_product=' . _DB_PREFIX_ . 'product.id_product AND ' . _DB_PREFIX_ . 'category_lang.id_category=' . _DB_PREFIX_ . 'category_product.id_category AND ' . _DB_PREFIX_ . 'category_lang.id_lang=' . $langue . ' AND ' . _DB_PREFIX_ . 'category_product.id_category!=1) GROUP BY id_product ORDER BY ' . _DB_PREFIX_ . 'category_product.id_category';
$result = mysql_query($requete);
// Fonction pour remplacer les caractères non compris par une url
function transformUrl($url)
{
$a = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûý­ýþÿŔŕ';
$b = 'aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr';
$url = utf8_decode($url);
$url = strtr($url, utf8_decode($a), $b);
$url = str_replace(" ", "-", $url);
$url = ereg_replace("[^a-zA-Z0-9\-]", "", $url);
$url = ereg_replace("^-+", "", $url);
$url = ereg_replace("-+$", "", $url);
$url = $url . '.html';
return $url;
}
// Fonction pour convertir les couleur Hexadécimales en couleur R,G,B
function html2rgb($color)
{
if ($color[0] == '#')
$color = substr($color, 1);
if (strlen($color) == 6)
list($r, $g, $b) = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]);
elseif (strlen($color) == 3)
list($r, $g, $b) = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]);
else
return false;
$r = hexdec($r);
$g = hexdec($g);
$b = hexdec($b);
return array($r, $g, $b);
}
//////////////////////////////////////////////////////////////////////////////////////
// C'est à partir de là que vous pouvez modifier pour personnaliser votre PDF //
// Voir la doc et les tutoriels ou allez sur le site de FPDF : http://www.fdpf.org //
// Je ne détail pas tous les champs possibles. Voir la doc //
//////////////////////////////////////////////////////////////////////////////////////
class PDF extends TCPDF
{
//En-tête
function header()
{
//Logo
// Logo de votre site affichée à la position x=10, y=8, largeur=190, hauteur=25
$this->Image('../../img/logo.jpg', 10, 8, 190, 20);
}
//Pied de page
function Footer()
{
if ($this->PageNo() != 1) {
// Si on est pas sur la première page
//Positionnement à 1,5 cm du bas
$this->SetY(-15);
//Police Times italique 8
$this->SetFont('Times', 'I', 8);
$this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, 0, 'C');
}
}
}
// create new PDF document
$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// On ajoute la police times
$pdf->AddFont('times', '', 'times.php');
// Allias pour le Nbre de page. Par défaut {nb}
$pdf->AliasNbPages();
// On ajoute une page. La première
$pdf->AddPage();
// On annule le changement de page automatique
$pdf->SetAutoPageBreak(0);
// On sélectionne la police times de taille 24
$pdf->SetFont('times', '', 24);
// On se positionne à Y=100
$pdf->SetY(100);
// et X=50
$pdf->SetX(50);
// On dessine une cellule avec le titre du catalogue
$pdf->Cell(120, 40, $titre, 1, 2, 'C', 0);
$pdf->SetFont('times', '', 10);
// On se positionne à Y=100
$pdf->SetY(270);
// et X=10
$pdf->SetX(10);
// Couleur Grise pour le pied de page
$pdf->SetFillColor(212, 212, 212);
// on met une cellule de largeur=190, hauteur=20. Voir la doc pour les autres champs
$pdf->MultiCell(190, 5, $info_footer_page, 1, 2, 'L', 1);
// On active les liens
$pdf->AddLink();
// On séléctionne la police times de taille 12
$pdf->SetFont('times', '', 12);
// Position en X par défaut
$x_axe = 20;
// Interligne entre chaque produit. Initialisée à 0 //
$interligne = 0;
// Variable pour boucle
$i = 0;
// Sauvegarde des carégories pour vérification si changement de catégorie
$savecategory = '';
// Récupère les valeurs couleur R,G,B pour la cellule des catégories
$cc = html2rgb($color_categories);
// Récupère les valeurs couleur R,G,B pour la cellule des produits
$cp = html2rgb($color_products);
// tags html à remplacer
$str2replace = array("<br>", "<br/>", "<br />");
$passe = false;
$newpage = 0;
while ($row = mysql_fetch_array($result)) {
// Récupération des produits en boucle
if ($pdf->PageNo() == 3) {
break;
}
for ($id = 0; $id < sizeof($skip_categories); $id++) {
$passe = false;
if ($row['id_category'] == $skip_categories[$id]) {
$passe = true;
break;
}
}
if ($passe == false) {
if ($i == $max) {
// On vérifie si on a atteint le nombre de produit max par page
// Si oui, on ré-initialise les variables
$i = 0;
$interligne = 0;
//
$pdf->AddPage();
$newpage = 1;
}
// image produits Taille médium
$img = $row['id_product'] . '-' . $row['id_image'] . '-medium.jpg';
// description courte
$description = $row['description_short'];
// prix
$price = $row['price'];
// conversion du prix selon devise
$price = $price * $tauxdevise;
// 2 digit après la virgule
$price = number_format($price, 2);
// ajout du signe de la devise
$price = $price . $signedevise;
// Nom du produit
$nameproduit = $row['legend'];
//Transformation du nom des produits en url
$urlProduit = transformUrl($nameproduit);
// Nom de la catégorie
$namecategory = $row['name'];
if ($savecategory != $namecategory) {
// Si nouvelle catégorie
if ($newpage == 0)
$pdf->AddPage();
$i = 0;
$interligne = 0;
// On se position à $y_axe
$pdf->SetY($y_axe);
// Couleur du fond de la cellule catégorie
$pdf->SetFillColor($cc[0], $cc[1], $cc[2]);
// Nom de la catégorie
$pdf->Cell(0, 6, $namecategory, 0, 2, 'L', 1);
// On sauvegarde le nom de la nouvelle catégorie
$savecategory = $namecategory;
}
// On se positionne 8 mm sous la précédente rubrique
$pdf->SetY($y_axe + $interligne + 8);
// Couleur de la cellule pour le nom du produit
$pdf->SetFillColor($cp[0], $cp[1], $cp[2]);
if ($add_url == 1) {
$pdf->Cell(100, 6, $nameproduit, 0, 2, 'L', 1, 'http://' . $base_url . '/' . $row['id_product'] . '-' . $urlProduit);
}
// Nom du produit avec url cliquable
else {
$pdf->Cell(100, 6, $nameproduit, 0, 2, 'L', 1, '');
}
// Nom du produit sans url
// On se positionne 16 mm sous le nom du produit
$pdf->SetY($y_axe + $interligne + 16);
// On se décalle de 50 mm en x
$pdf->SetX($x_axe + 50);
$pdf->WriteHTMLCell(80, 50, '', '', $description);
// On se décalle de 16 mm sous le nom du produit
$pdf->SetY($y_axe + $interligne + 16);
// On se décalle de 50 mm en x
$pdf->SetX($x_axe + 150);
// On imprime le prix
$pdf->Cell(20, 20, $price, 0, 1, 'C', 0, '', 0);
//On se décalle de 16 mm sous le nom du produit
$pdf->SetY($y_axe + $interligne + 16);
// On se positionne à $x_axe
$pdf->SetX($x_axe);
$pdf->Image('../../img/p/' . $img);
// On ajoute l'espace choisi après un produit.
$interligne = $interligne + $space_y;
// On saute donc de $space_y pour le produit suivant
$newpage = 0;
$i = $i + 1;
}
}
//Sauvegarde du PDF dans le fichier
$pdf->Output($filename, 'F');
//Redirection
// on affiche le PDF
header('Location: ' . $filename);
?>
View user's profile Send private message Visit poster's website
I can not decode this Help thank you
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.037 Seconds