|
Menu |
|
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
|
User Info |
|
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 77
Members: 0
Total: 77
|
|
|
|
|
|
Full disclosure |
|
|
|
|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
How to decode obfuscated PHP code? |
|
Posted: Sun Jan 09, 2011 4:57 pm |
|
|
mikkeljuhl |
Beginner |
|
|
Joined: Jan 09, 2011 |
Posts: 1 |
|
|
|
|
|
|
|
Hey everyone! I'm new here - just in case.. anyway, let's get straight forward.
I have some code, which I really would love to get readable, as I would like to customize the code a bit, if you would help me do it so I would be able to decode some other code, but if you don't want to share your techniques then just give me the outcome :)
I have several files, which I would like to get decoded:
1:
Code: | <?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF14159DC7D007D3=3;$T77605D5F26DD5248=0;$T4A747C3263CA7A55=16;$T7C7E72B89B83E235="";$T0D47BDF6FD9DDE2E=strlen($T059EC46CFE335260);$T43D5686285035C13=__FILE__;$T43D5686285035C13=file_get_contents($T43D5686285035C13);$T6BBC58A3B5B11DC4=0;preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"),$T43D5686285035C13,$T6BBC58A3B5B11DC4);for(;$TBF14159DC7D007D3<$T0D47BDF6FD9DDE2E;){if(count($T6BBC58A3B5B11DC4)) exit;if($T4A747C3263CA7A55==0){$T65CE9F6823D588A7=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$T65CE9F6823D588A7+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++]);$T4A747C3263CA7A55=16;}if($T65CE9F6823D588A7&0x8000){$TC9A16C47DA8EEE87=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<4);$TC9A16C47DA8EEE87+=(ord($T059EC46CFE335260[$TBF14159DC7D007D3])>>4);if($TC9A16C47DA8EEE87){$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])&0x0F)+3;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T17D35BB9DF7A47E4++)$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4]=$T7C7E72B89B83E235[$T77605D5F26DD5248-$TC9A16C47DA8EEE87+$T17D35BB9DF7A47E4];$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}else{$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$TA7FB8B0A1C0E2E9E+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++])+16;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4++]=$T059EC46CFE335260[$TBF14159DC7D007D3]);$TBF14159DC7D007D3++;$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}}else $T7C7E72B89B83E235[$T77605D5F26DD5248++]=$T059EC46CFE335260[$TBF14159DC7D007D3++];$T65CE9F6823D588A7<<=1;$T4A747C3263CA7A55--;if($TBF14159DC7D007D3==$T0D47BDF6FD9DDE2E){$T43D5686285035C13=implode("",$T7C7E72B89B83E235);$T43D5686285035C13="?".">".$T43D5686285035C13;return $T43D5686285035C13;}}}}eval(TC9A16C47DA8EEE87("QAIAPD9waHAgABBpZiAoIWNsYXMAAHNfZXhpc3RzKCd1YmFtX2QAG3BkZW1vbicpKSB7AnACIiABqQFywAABoAAwdmFyICRvcHRpb25zTmEFOG1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0qxZHVjarDJAqZfbmNl698xxqZfGGQtu6EtKMSmP6Y/pj91pj+mP6Y3C+RcZgoDVVBEQdIwexdEcHJlZml4fS+SXA+P/lwJU0VUr3EQQVfAYRAejx6CDdQCQB6BTOQcACB7nyBX8F85BD8SVF9LbgRsP0VicgRPBEYCVwiPCkX//2KhBD8EPkXECG8hANhwZgYEvwS9R+UEu24PbgIE8FeP/92xXHF/viBXjy1NV49XhQmrTbIIj1MFDQKCUs9PAp+//1LHIEYYeTcG0CWfJZJUOQPLUqd5AQQvGGZ99iE/VHJ//194wX2FBI8EhQLCVzcI24IOBI8EhVbwBtEI3wRGWOH//w1PxAkEQAJRBE8KUg0BWjoI3wjVAnoE/wT8XIEEzwTLwDsCQQSZV0hFUkUgaWQDgI1WJ3F9FBJgz+ADhsBL6WDPZGl2IGNsYXNzPSICk7JM4ABgzrIwpvFmdWxseSBjaGFuZ2VkaGAusm9K4SRCRGxpc3QLEFL0Z2V0X3IAAGVzdWx0cygiU0VMRUNUICoHgCBmcm9tsS93wFUvVSBPUkRFUiBCYCBZVOiO4EFSUkFZX0EOUmlmKCFpAxxzX2FycmEQQAiYKSkgCYwCQwNiJGEHkmRtaW5fIOFq0F1xC4Anb6+icy3ZgGUAkHJhbC5waHA/J1E9JxcRaW5jbAQAdWRlX29r4URQREVNT05fVEVADE2+oFRFX0RJUiAuICIENQNxLmgaAnRtIgbyElB9AEQgIGZ1bmN0udAgKIBzdLbAcxlAaGVzUbBlcCgkdmFsB9h1ZSkgewLQAMMJcA3nAeQ/AeAMwl9tYR1wcCgnBH6rkAPTKaSwIAZ6BiUNASAgcmUH+HR1cm4gAtMBMQpRBdAAMQCzAGMBAT8+"));?> |
2:
Code: | <?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF14159DC7D007D3=3;$T77605D5F26DD5248=0;$T4A747C3263CA7A55=16;$T7C7E72B89B83E235="";$T0D47BDF6FD9DDE2E=strlen($T059EC46CFE335260);$T43D5686285035C13=__FILE__;$T43D5686285035C13=file_get_contents($T43D5686285035C13);$T6BBC58A3B5B11DC4=0;preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"),$T43D5686285035C13,$T6BBC58A3B5B11DC4);for(;$TBF14159DC7D007D3<$T0D47BDF6FD9DDE2E;){if(count($T6BBC58A3B5B11DC4)) exit;if($T4A747C3263CA7A55==0){$T65CE9F6823D588A7=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$T65CE9F6823D588A7+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++]);$T4A747C3263CA7A55=16;}if($T65CE9F6823D588A7&0x8000){$TC9A16C47DA8EEE87=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<4);$TC9A16C47DA8EEE87+=(ord($T059EC46CFE335260[$TBF14159DC7D007D3])>>4);if($TC9A16C47DA8EEE87){$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])&0x0F)+3;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T17D35BB9DF7A47E4++)$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4]=$T7C7E72B89B83E235[$T77605D5F26DD5248-$TC9A16C47DA8EEE87+$T17D35BB9DF7A47E4];$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}else{$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$TA7FB8B0A1C0E2E9E+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++])+16;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4++]=$T059EC46CFE335260[$TBF14159DC7D007D3]);$TBF14159DC7D007D3++;$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}}else $T7C7E72B89B83E235[$T77605D5F26DD5248++]=$T059EC46CFE335260[$TBF14159DC7D007D3++];$T65CE9F6823D588A7<<=1;$T4A747C3263CA7A55--;if($TBF14159DC7D007D3==$T0D47BDF6FD9DDE2E){$T43D5686285035C13=implode("",$T7C7E72B89B83E235);$T43D5686285035C13="?".">".$T43D5686285035C13;return $T43D5686285035C13;}}}}eval(TC9A16C47DA8EEE87("QAIAPD9waHAgABBpZighY2xhc3MAAF9leGlzdHMoJ3ViYW1fZHAAAGRlbW9uX3VybF9wcm90ZWMAl3RvcicpKSB7A0AgIAMiIAKvAqUCdAAEIHZhciAkbWFzdGVyOwOSIGYBuHVuY3Rpb24D3wZ2KAMkBlIHISR0aAmIaXMtPgSDID0FJQICOyB9BZxzZWMACnVyZVVybCgkdGV4dAQRIAMwbAcAcEJhc2UD4QTpCWQkU0VDX0dFTgoSX0tFWQIxbQLjLT5vcArRc1sRa2cA4mVuX2tleSddA/EDxgRAUkVUA/9ukYAD/25fCmByZXQEIwwSJGV4cGlyZUB8cwQAdGltZSgpKwtWCH8Z0wMjBLFvbjwAZHMExg9yBHATdGNyZWF0ZV9saW5H8msRIywgJAqwDvUA6AFgDBABEAWTcykN8SBDvyAKgHVybiAFcgEhFxNmHJUGDwYPFdMGDiJzeAUkFuQLNx6jBsEkdGFnX3BhdCQQbgIAEAQnLygEUFVSRSguKj8pOgBgKSkQAC9pJwKhICBpZiAocHJlZ19tD8hhdGNoDsADtw1AIMEAcAHCZXMspHJlcUAEdRdQX29uY2UgZGlybmEXoF9fAABGSUxFX18pIC4gJy9pbmNsAAV1ZGVzL1NlY3J5cHQuJ3IuAXBkBi40MAe0ICQKMHJfYXJyYXkKcBekcAQMYXJzZV8BoWlidXRlcy2RCaBlcxP5WzJ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nCcQ/y9eIgWRIiQvJwWfBZ8FnwWRGoEHhQjCcFLqAwnRFQEgkSSVED1TsHRvbG93ZXIRVw+Uq/0CgSQXYVsCoV2gYAxyWoYEQSTVAnEDAQFBICTYtuNKmHShsFoxZVTSFWMkS7EBkSswcmF3MUAB4wH4KGJhc2U2NFZ1kJIDyCACB7QZInJlcAsHbGFjZRlAJRjQPgBCRl9SX0ZxBhUDMuAACeEAQAAwICA/Pg=="));?> |
3:
Code: | <?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF14159DC7D007D3=3;$T77605D5F26DD5248=0;$T4A747C3263CA7A55=16;$T7C7E72B89B83E235="";$T0D47BDF6FD9DDE2E=strlen($T059EC46CFE335260);$T43D5686285035C13=__FILE__;$T43D5686285035C13=file_get_contents($T43D5686285035C13);$T6BBC58A3B5B11DC4=0;preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"),$T43D5686285035C13,$T6BBC58A3B5B11DC4);for(;$TBF14159DC7D007D3<$T0D47BDF6FD9DDE2E;){if(count($T6BBC58A3B5B11DC4)) exit;if($T4A747C3263CA7A55==0){$T65CE9F6823D588A7=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$T65CE9F6823D588A7+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++]);$T4A747C3263CA7A55=16;}if($T65CE9F6823D588A7&0x8000){$TC9A16C47DA8EEE87=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<4);$TC9A16C47DA8EEE87+=(ord($T059EC46CFE335260[$TBF14159DC7D007D3])>>4);if($TC9A16C47DA8EEE87){$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])&0x0F)+3;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T17D35BB9DF7A47E4++)$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4]=$T7C7E72B89B83E235[$T77605D5F26DD5248-$TC9A16C47DA8EEE87+$T17D35BB9DF7A47E4];$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}else{$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$TA7FB8B0A1C0E2E9E+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++])+16;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4++]=$T059EC46CFE335260[$TBF14159DC7D007D3]);$TBF14159DC7D007D3++;$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}}else $T7C7E72B89B83E235[$T77605D5F26DD5248++]=$T059EC46CFE335260[$TBF14159DC7D007D3++];$T65CE9F6823D588A7<<=1;$T4A747C3263CA7A55--;if($TBF14159DC7D007D3==$T0D47BDF6FD9DDE2E){$T43D5686285035C13=implode("",$T7C7E72B89B83E235);$T43D5686285035C13="?".">".$T43D5686285035C13;return $T43D5686285035C13;}}}}eval(TC9A16C47DA8EEE87("QAIAPD9waHAgABBpZighY2xhc3MAAF9leGlzdHMoJ3ViYW1fZHAAAGRlbW9uX2xpbmtfcHJvdGUBLmN0JykpIHsDMCAgAxIgAp8ClAJkIAAIdmFyICRtYXN0ZXI7A4IgZnUDcG5jdGlvbgPPBlUoAxQGMgcBJHRoaRMQcy0+BHMgPQUVAgI7IH0FjGV4ZWOCgQS1X3VybCgEMSADUGxwQmFzZQQB4AAFCQl0BFIkc2F2ZWRfc2VjdXJlCGFfZGlyAtB0cmltCSAD0y0+b3AL0SAYc1sSS2Rvd25sb2FkA0EScG9yeQCAJ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1hU+xTpExPR19ET1dOTE9BDJ5EUykgUTED9CRmI/BAZjXyAmE2MWiwYTQIKycCEh+yZicDQGZwdXRzBlAsIGSAABoAKCJtLmQuWSBnOmlhIikuAQAiICAiLiRf47VSRU1PVEVfQTs/RETjoAHUKlIurQEFwkBmOMUA8iOhAEENIQBB0DtIVRVgbmOjICgkZGlyFhE9wQCDJlXoSSL+H1ggAlANUA0xAKADRgZSICB3aElwBKATEQJgE8G/6wJlKQ6DD0GLdAJRRBNmQQayqVCW8CcBDC5DJAPBGv9pc18FJQpBLjWQLgOyBgRxFIAAq+FPUA30Cqb8GAMnDocEEgizNnM+ViRmdWxsBpEM4XRyaX/fbQSGHICFMQT0AjEDsQoxDYKh4HMdAgQECfUB0pNh5f4FEAXWA6FyZcSQbgChGoIAUQBJG1AbRsZB5MV08HRpoMXhAQMWQyRvdXRfAZEGQD2QZ0mWIi8AC19CRl9SXy8iLCAiJQBQJAJhA/jRDwfxCJMgmDE2NF8FgyhyYXe2cADUBgZzk/9+CnEJ/dA0BgYBAwn/BYMB4ygHNADkA80mMgnUDWwl/wINEg3DDWEQBQMyCfEAQAAwICByZXF1UuBfOJBvbvBAJIAbcShfXzmBX1+tQScvU2UgAGNy7rAuY2xhc3MuaW5jLnBoQABwpfIgPz4="));?> |
Thank you so much for taking the time, to try. Thanks a lot! |
|
|
|
|
|
|
|
|
Posted: Sun Jan 09, 2011 11:13 pm |
|
|
tsabitah |
Valuable expert |
|
|
Joined: Jul 07, 2010 |
Posts: 328 |
Location: surabaya |
|
|
|
|
|
|
1.
Code: | <?php
if (!class_exists('ubam_dpdemon')) {
class ubam_dpdemon
{
var $optionsName = 'ubam_dpdemon_options';
var $localizationDomain = "ubam_dpdemon";
var $thispluginurl = '';
var $thispluginpath = '';
var $options = array();
function ubam_dpdemon()
{
$locale = get_locale();
$mo = dirname(__FILE__) . "/languages/" . $this->localizationDomain . "-" . $locale . ".mo";
load_textdomain($this->localizationDomain, $mo);
$this->thispluginurl = WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)) . '/';
$this->thispluginpath = WP_PLUGIN_PATH . '/' . dirname(plugin_basename(__FILE__)) . '/';
$this->getOptions();
if (empty($this->options['ubam_dpdemon_default_email']))
$this->options['ubam_dpdemon_default_email'] = "Dear {CUSTOMER NAME},\n\nThank you for purchasing {PRODUCT NAME}.\n\nBelow is the URL to your download page. You have\napproximately {X} hours to download your purchase, after\nwhich the download page will be expired.\n\nDownload for {PRODUCT NAME} ({PRODUCT CODE})\n{DOWNLOAD PAGE}\n\nIf the URL above is not clickable, just copy and paste the\nURL into your browser.\n\nShould you need any assistance, simply reply to this email.\n\n\nYour Name\nYour Company";
add_action("admin_menu", array(&$this, "admin_menu_link"));
add_action("init", array(&$this, "ubam_dpdemon_notify"));
add_filter('the_content', array(&$this, "ubam_dpdemon_button_html"));
}
function getOptions()
{
if (!$theOptions = get_option($this->optionsName)) {
$theOptions = array('default' => 'options');
update_option($this->optionsName, $theOptions);
}
$this->options = $theOptions;
}
function ubam_dpdemon_notify()
{
global $wpdb;
global $ubam_aff_mgr_var;
if ($_GET['dpd-pp-notify'] || strpos($_SERVER['REQUEST_URI'], '/dpd-pp-notify/') !== false) {
require_once dirname(__FILE__) . '/' . 'dp-demon-notify.php';
$notify = new ubam_dpdemon_notify(&$this);
$notify->do_pp_ipn();
exit;
}
if ($_GET['dpdid']) {
require_once dirname(__FILE__) . '/' . 'dp-demon-page.php';
$return = new ubam_dpdemon_page(&$this);
$return ->show_pitch_page();
exit;
}
if ($_GET['dpd-pp-thankyou'] || strpos($_SERVER['REQUEST_URI'], '/dpd-pp-thankyou/') !== false) {
require_once dirname(__FILE__) . '/' . 'dp-demon-page.php';
$return = new ubam_dpdemon_page(&$this);
$return ->pp_thankyou();
exit;
}
if ($_GET['dpd-cb-thankyou']) {
require_once dirname(__FILE__) . '/' . 'dp-demon-notify.php';
$return = new ubam_dpdemon_notify(&$this);
$return ->cb_thankyou();
exit;
}
if ($_GET['dpd-download']) {
require_once dirname(__FILE__) . '/' . 'dp-demon-page.php';
$download = new ubam_dpdemon_page(&$this);
$download->pp_download();
exit;
}
if (eregi('/lnk-pr0t', $_SERVER['REQUEST_URI']) && !empty($_GET['seclnk'])) {
require_once dirname(__FILE__) . '/' . 'includes/CLASS.link-protect.php';
$url_handler = new ubam_dpdemon_link_protect(&$this);
$url_handler->exec_protect_url();
exit;
}
}
function send_to_pitch_page($dpdid = '')
{
if ($_GET['dpdid'] || !empty($dpdid)) {
if (empty($dpdid))
$dpdid = $_GET['dpdid'];
require_once dirname(__FILE__) . '/' . 'dp-demon-page.php';
$return = new ubam_dpdemon_page(&$this);
$return ->show_pitch_page($dpdid);
exit;
}
}
function saveAdminOptions()
{
return update_option($this->optionsName, $this->options);
}
function admin_menu_link()
{
add_options_page(DPDEMON_OPTION_PAGE_TITLE, DPDEMON_MENU_TITLE, 'manage_options', 'dp-demon-inc.php', array(&$this, 'admin_options_page'));
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'filter_plugin_actions'), 10, 2);
}
function filter_plugin_actions($links, $file)
{
$settings_link = '<a href="options-general.php?page=' . basename(__FILE__) . '">' . __('Settings') . '</a>';
array_unshift($links, $settings_link);
return $links;
}
function create_sales_link_html($product_id, $pid = 0)
{
return $this->create_purchase_button_html($product_id, $pid = 0, $type = 'link');
}
function create_custom_purchase_button_html($product_id, $image_array)
{
return $this->create_purchase_button_html($product_id, $pid = 0, $type = 'button', $image_array);
}
function create_purchase_button_html($product_id, $pid = 0, $type = 'button', $image_array = '')
{
global $wpdb;
global $ubam_aff_mgr_var;
$filter_value = ($pid > 0 ? $pid : "'$product_id'");
$filter_column = ($pid > 0 ? 'id' : 'product_id');
$product = $wpdb->get_row("SELECT * from {$wpdb->prefix}ubam_mktg_launchpad_items WHERE $filter_column = $filter_value");
if ($product) {
if (is_array($image_array)) {
$img_width = (empty($image_array['width']) ? '' : ' width="' . $image_array['width'] . '"');
$img_height = (empty($image_array['height']) ? '' : ' height="' . $image_array['height'] . '"');
}
switch ($product->pmt_processor) {
case 'PAYPAL':
if (!$paypal_sandbox == 0) {
$paypal_url = "www.sandbox.paypal.com/cgi-bin/webscr";
$paypal_ipn_url = "www.sandbox.paypal.com";
} else {
$paypal_url = "www.paypal.com/cgi-bin/webscr";
$paypal_ipn_url = "www.paypal.com";
}
if ($get_shipping_address == 1) {
$no_shipping = 2;
}
if ($get_shipping_address == 0) {
$no_shipping = 1;
}
if ($get_shipping_address == 2) {
$no_shipping = 0;
}
$buy_now_image = '"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"';
if (is_array($image_array)) {
if (!empty($image_array['image']))
$buy_now_image = '"' . $image_array['image'] . '"' . $img_width . $img_height;
}
$return_url = rtrim(get_option('siteurl'), '/') . "/dpd-pp-thankyou/{$product->product_id}";
$notify_url = rtrim(get_option('siteurl'), '/') . "/dpd-pp-notify/{$product->product_id}";
$button_html = '<form name="form1" action="https://' . $paypal_url . '" method="post">';
$button_html .= '<input type="image" src=' . $buy_now_image . ' border="0" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!">';
$button_html .= '<input type="hidden" name="cmd" value="_xclick">';
$button_html .= '<input type="hidden" name="business" value="' . $this->options['ubam_dpdemon_pp_email'] . '">';
$button_html .= '<input type="hidden" name="item_name" value="' . $product->product_name . '">';
$button_html .= '<input type="hidden" name="item_number" value="' . $product->product_nbr . '">';
$button_html .= '<input type="hidden" name="amount" value="' . $product->price . '">';
$button_html .= '<input type="hidden" name="no_shipping" value="' . $no_shipping . '">';
$button_html .= '<input type="hidden" name="return" value="' . $return_url . '">';
$button_html .= '<input type="hidden" name="notify_url" value="' . $notify_url . '">';
$button_html .= '<input type="hidden" name="no_note" value="1">';
$button_html .= '<input type="hidden" name="currency_code" value="' . $product->currency . '">';
$button_html .= '<input type="hidden" name="rm" value="2">';
$button_html .= '</form>';
break;
case 'CLICKBANK':
$processor = 'cb';
$buy_now_image = '"' . $this->thispluginurl . 'cb-buy-NOW.gif"';
if (is_array($image_array)) {
if (!empty($image_array['image']))
$buy_now_image = '"' . $image_array['image'] . '"' . $img_width . $img_height;
}
$button_html = '<form id="eppForm" action="http://' . $product->product_nbr . '.' . $this->options['ubam_dpdemon_cb_vendid'] . '.pay.clickbank.net" method="get" target="_top">';
$button_html .= '<input type="image" src=' . $buy_now_image . ' border="0" name="submit" alt="Make payments with ClickBank - it\'s fast, free and secure!">';
$button_html .= '</form>';
break;
case 'E-JUNKIE':
$processor = 'ej';
$buy_now_image = '"http://www.e-junkie.com/ej/x-click-butcc.gif"';
if (is_array($image_array)) {
if (!empty($image_array['image']))
$buy_now_image = '"' . $image_array['image'] . '"' . $img_width . $img_height;
}
$link = 'https://www.e-junkie.com/ecom/gb.php?i=' . $product->product_nbr . '&c=single&cl=' . $this->options['ubam_dpdemon_ej_clientid'] . $ma_custom;
$button_html = '<a href="' . $link . '" target="ejejcsingle">';
$button_html .= '<img src=' . $buy_now_image . ' border="0" alt="Buy Now"/></a>';
break;
case 'AFFILIATE':
$button_html = get_option('siteurl') . '/?dpdid=' . $product->product_id;
break;
}
$copy_html = $button_html;
} else {
$button_html = false;
}
return array('html' => $button_html, 'copy_html' => $copy_html, 'pmt_processor' => $product->pmt_processor, 'product_id' => $product->product_id, 'pitch_page' => (empty($product->pitch_page_url) ? false : true));
}
function ubam_dpdemon_button_html($text)
{
$dpd_button_tag_pattern = '/(\[dpd-button(.*?)\](.*?)\[\/dpd-button\])/is';
$dpd_link_tag_pattern = '/\[dpd-button\](.*?)\[\/dpd-button\]/is';
preg_match_all($dpd_button_tag_pattern, $text, $dpd_button_matches);
if (is_array($dpd_button_matches)) {
foreach ($dpd_button_matches[1] as $bkey => $bvalue) {
$product_id = $dpd_button_matches[3][$bkey];
if (empty($dpd_button_matches[2][$bkey])) {
$image_array = '';
} else {
$image_array = $this->parse_attributes($dpd_button_matches[2][$bkey]);
if (count($image_array) == 0)
$image_array = '';
}
if (is_array($image_array)) {
$button_html = $this->create_custom_purchase_button_html($product_id, $image_array);
} else {
$button_html = $this->create_purchase_button_html($product_id);
}
if ($button_html === false)
$button_html = array('html' => '');
$text = str_replace($bvalue, $button_html['html'], $text);
}
}
preg_match_all($dpd_link_tag_pattern, $text, $dpd_link_matches);
if (is_array($dpd_link_matches)) {
foreach ($dpd_link_matches[1] as $key => $product_id) {
$link_html = $this->create_purchase_button_html($product_id);
if ($link_html === false)
$link_html = array('html' => '');
$text = str_replace($dpd_link_matches[0][$key], $link_html['html'], $text);
}
}
return $text;
}
function parse_attributes($attrib_string)
{
$regex = '@([^\s=]+)\s*=\s*(\'[^<\']*\'|"[^<"]*"|\S*)@';
preg_match_all($regex, $attrib_string, $matches);
$attr = array();
for ($i = 0; $i < count($matches[0]); $i++) {
if (!empty($matches[0][$i]) && !empty($matches[1][$i])) {
if (preg_match("/^'(.*)'$/", $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} elseif (preg_match('/^"(.*)"$/', $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} else {
$value = $matches[2][$i];
}
$key = strtolower($matches[1][$i]);
$attr[$key] = $value;
}
}
return $attr;
}
function admin_options_page()
{
global $wpdb;
if ($_POST['action'] == 'edit') {
$editmode = true;
$eproduct = $wpdb->get_row("SELECT * from {$wpdb->prefix}ubam_mktg_launchpad_items WHERE id={$_POST['pid']}");
?><div class="wrap">
<h2><?php
echo DPDEMON_OPTION_PAGE_TITLE;
?></h2> <?php
require_once(DPDEMON_TEMPLATE_DIR . "product-entry-form.htm");
} elseif ($_POST['action'] == 'Edit Default Email') {
$default_email = $this->options['ubam_dpdemon_default_email'];
require_once(DPDEMON_TEMPLATE_DIR . "edit-default-email.htm");
} elseif ($_POST['action'] == 'button') {
$button = $this->create_purchase_button_html('', $_POST['pid']);
if ($button['pitch_page']) {
$pitch_page = get_option('siteurl') . "/?dpdid={$button['product_id']}";
}
if ($button['pmt_processor'] == 'CLICKBANK') {
$cb_hoplink_target = get_option('siteurl') . "/";
$append_to_hoplink = "?dpdid={$button['product_id']}";
$append_to_tracking_hoplink = "&dpdid={$button['product_id']}";
$cb_thank_you = get_option('siteurl') . "/?dpd-cb-thankyou={$button['product_id']}";
}
if ($button['pmt_processor'] == 'E-JUNKIE') {
$ej_ipn_url = rtrim(get_option('siteurl'), '/') . "/dpd-ej-notify/{$button['product_id']}";
}
require_once(DPDEMON_TEMPLATE_DIR . "button-display.htm");
} else {
if ($_POST['action'] == 'delete') {
$wpdb->show_errors();
$wpdb->query("DELETE FROM {$wpdb->prefix}ubam_mktg_launchpad_items WHERE id={$_POST['pid']}");
$wpdb->hide_errors();
echo '<div class="updated"><p>Success! Product has been deleted from the database.</p></div>';
}
if ($_POST['ubam_dpdemon_edit_default_email']) {
$this->options['ubam_dpdemon_default_email'] = $_POST['ubam_dpdemon_default_email'];
$this->saveAdminOptions();
echo '<div class="updated"><p>Success! Your changes were sucessfully saved.</p></div>';
}
if ($_POST['ubam_dpdemon_acct_save']) {
if (!wp_verify_nonce($_POST['_wpnonce'], 'ubam_dpdemon-update-options'))
die('Whoops! There was a problem with the data you posted. Please go back and try again.');
$this->options['ubam_dpdemon_pp_email'] = $_POST['ubam_dpdemon_pp_email'];
$this->options['ubam_dpdemon_pp_authcd'] = $_POST['ubam_dpdemon_pp_authcd'];
$this->options['ubam_dpdemon_cb_vendid'] = $_POST['ubam_dpdemon_cb_vendid'];
$this->options['ubam_dpdemon_cb_authcd'] = $_POST['ubam_dpdemon_cb_authcd'];
$this->options['ubam_dpdemon_ej_clientid'] = $_POST['ubam_dpdemon_ej_clientid'];
$this->options['ubam_dpdemon_support_name'] = $_POST['ubam_dpdemon_support_name'];
$this->options['ubam_dpdemon_support_email'] = $_POST['ubam_dpdemon_support_email'];
$this->options['ubam_dpdemon_expire_hours'] = $_POST['ubam_dpdemon_expire_hours'];
$this->options['ubam_dpdemon_gen_key'] = $_POST['ubam_dpdemon_gen_key'];
$this->options['ubam_dpdemon_gen_secret'] = $_POST['ubam_dpdemon_gen_secret'];
$this->options['ubam_dpdemon_expire_seconds'] = $_POST['ubam_dpdemon_expire_seconds'];
$this->options['ubam_dpdemon_download_directory'] = $_POST['ubam_dpdemon_download_directory'];
$this->saveAdminOptions();
echo '<div class="updated"><p>Success! Your changes were sucessfully saved.</p></div>';
}
if ($_POST['ubam_dpdemon_add_product']) {
$insert_query = "REPLACE INTO {$wpdb->prefix}ubam_mktg_launchpad_items " . " (product_id, pmt_processor, product_nbr, " . " ma_commission_scheme_id, " . " product_name, product_description, price, currency, " . " pitch_page_url, thank_you_page_url, download_page_url, download_link_url, " . " thankyou_email_subject, thankyou_email_body) " . "VALUES ('{$_POST['ubam_dpdemon_product_id']}', '{$_POST['ubam_dpdemon_pmt_processor']}', '{$_POST['ubam_dpdemon_product_nbr']}', " . " " . (empty($_POST['ubam_dpdemon_commission_scheme_id']) ? 'NULL' : $_POST['ubam_dpdemon_commission_scheme_id']) . ", " . " '{$_POST['ubam_dpdemon_product_name']}', '{$_POST['ubam_dpdemon_product_desc']}', " . (empty($_POST['ubam_dpdemon_price']) ? '0.00' : $_POST['ubam_dpdemon_price']) . ", '{$_POST['ubam_dpdemon_currency']}', " . " '{$_POST['ubam_dpdemon_pitch_page']}', '{$_POST['ubam_dpdemon_thanku_page']}', '{$_POST['ubam_dpdemon_dl_page']}', '{$_POST['ubam_dpdemon_dl_link']}', " . " '{$_POST['ubam_dpdemon_email_subject']}', '{$_POST['ubam_dpdemon_email_body']}') ";
$wpdb->query($insert_query);
echo '<div class="updated"><p>Success! Product has been added to the database.</p></div>';
}
if ($_POST['ubam_dpdemon_update_product']) {
if (!wp_verify_nonce($_POST['_wpnonce'], 'ubam_dpdemon-edit-product'))
die('Whoops! There was a problem with the data you posted. Please go back and try again.');
$update_query = "UPDATE {$wpdb->prefix}ubam_mktg_launchpad_items " . " SET product_id = '{$_POST['ubam_dpdemon_product_id']}' " . " , pmt_processor = '{$_POST['ubam_dpdemon_pmt_processor']}' " . " , product_nbr = '{$_POST['ubam_dpdemon_product_nbr']}' " . " , product_name = '{$_POST['ubam_dpdemon_product_name']}' " . " , product_description = '{$_POST['ubam_dpdemon_product_desc']}' " . " , ma_commission_scheme_id = " . (empty($_POST['ubam_dpdemon_commission_scheme_id']) ? 'NULL' : $_POST['ubam_dpdemon_commission_scheme_id']) . " " . " , price = " . (empty($_POST['ubam_dpdemon_price']) ? '0.00' : $_POST['ubam_dpdemon_price']) . " " . " , currency = '{$_POST['ubam_dpdemon_currency']}' " . " , pitch_page_url = '{$_POST['ubam_dpdemon_pitch_page']}' " . " , thank_you_page_url = '{$_POST['ubam_dpdemon_thanku_page']}' " . " , download_page_url = '{$_POST['ubam_dpdemon_dl_page']}' " . " , download_link_url = '{$_POST['ubam_dpdemon_dl_link']}' " . " , thankyou_email_subject = '{$_POST['ubam_dpdemon_email_subject']}' " . " , thankyou_email_body = '{$_POST['ubam_dpdemon_email_body']}' " . " WHERE id = {$_POST['id']} ";
$wpdb->query($update_query);
echo '<div class="updated"><p>Success! Product has been successfully changed.</p></div>';
}
$productlist = $wpdb->get_results("SELECT * from {$wpdb->prefix}ubam_mktg_launchpad_items ORDER BY product_id", ARRAY_A);
if (!is_array($productlist))
$productlist = array();
$admin_link_prefix = 'options-general.php?page=';
include_once(DPDEMON_TEMPLATE_DIR . "options-page.htm");
}
}
function stripslashes_deep($value)
{
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
return $value;
}
}
}
?> |
|
|
|
|
|
|
|
|
|
Posted: Sun Jan 09, 2011 11:14 pm |
|
|
tsabitah |
Valuable expert |
|
|
Joined: Jul 07, 2010 |
Posts: 328 |
Location: surabaya |
|
|
|
|
|
|
2.
Code: | <?php
if (!class_exists('ubam_dpdemon_url_protector')) {
class ubam_dpdemon_url_protector
{
var $master;
function ubam_dpdemon_url_protector($masterclass)
{
$this->master = $masterclass;
}
function secureUrl($text)
{
$mlpBase = $this->master;
$SEC_GEN_KEY = $mlpBase->options['ubam_dpdemon_gen_key'];
$SEC_GEN_SECRET = $mlpBase->options['ubam_dpdemon_gen_secret'];
$expires = time() + $mlpBase->options['ubam_dpdemon_expire_seconds'];
$text = $this->create_link($text, $SEC_GEN_KEY, $SEC_GEN_SECRET, $expires);
return $text;
}
function create_link($text, $SEC_GEN_KEY, $SEC_GEN_SECRET, $expires)
{
$mlpBase = $this->master;
$tag_pattern = '/(SECURE(.*?):(.*))/i';
if (preg_match($tag_pattern, $text, $matches)) {
require_once dirname(__FILE__) . '/includes/Secrypt.class.inc.php';
$attr_array = $this->parse_attributes($matches[2]);
$link_expires = $expires;
if ($attr_array['seconds'] && is_numeric($attr_array['seconds'])) {
if ($attr_array['seconds'] > 0) {
$link_expires = time() + $attr_array['seconds'];
} elseif ($attr_array['seconds'] == 0) {
$link_expires = time() + (3650 * 24 * 60 * 60);
}
}
if (($attr_array['hotlink']) && is_numeric($attr_array['hotlink'])) {
$hotlink = $attr_array['hotlink'] <= 0 ? 0 : 1;
}
$secure_resource = trim($matches[3]);
$sug_string_to_sign = "{$SEC_GEN_KEY}GET\n\n\n$link_expires\n$SEC_GEN_SECRET";
$sug_signature = urlencode($this->pct_encode(md5($sug_string_to_sign)));
$sugout_secrypt = new ubam_dpdemon_Secrypt(false);
$secure_link = urlencode($this->pct_encode($sugout_secrypt->Encrypt($secure_resource, $SEC_GEN_KEY, $SEC_GEN_SECRET)));
$secure_hotlink = urlencode($this->pct_encode($sugout_secrypt->Encrypt($hotlink == 0 ? "000" : "111", $SEC_GEN_KEY, $SEC_GEN_SECRET)));
$sug_authentication_params = "_L-N-KP_$link_expires";
$sug_authentication_params .= "_L-N-KP_$sug_signature";
$sug_authentication_params .= "_L-N-KP_$secure_hotlink";
$secure_destination = rtrim(get_option('siteurl'), '/') . '/lnk-pr0t?seclnk=' . $secure_link . "$sug_authentication_params";
$text = $secure_destination;
}
return $text;
}
function parse_attributes($attrib_string)
{
$regex = '@([^\s=]+)\s*=\s*(\'[^<\']*\'|"[^<"]*"|\S*)@';
preg_match_all($regex, $attrib_string, $matches);
$attr = array();
for ($i = 0; $i < count($matches[0]); $i++) {
if (!empty($matches[0][$i]) && !empty($matches[1][$i])) {
if (preg_match("/^'(.*)'$/", $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} elseif (preg_match('/^"(.*)"$/', $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} else {
$value = $matches[2][$i];
}
$key = strtolower($matches[1][$i]);
$attr[$key] = $value;
}
}
return $attr;
}
function pct_encode($text_to_encode)
{
$out_text = rawurlencode(base64_encode($text_to_encode));
return preg_replace("/%/", "_BF_R_", $out_text);
}
}
}
?> |
|
|
|
|
|
|
|
|
|
Posted: Sun Jan 09, 2011 11:16 pm |
|
|
tsabitah |
Valuable expert |
|
|
Joined: Jul 07, 2010 |
Posts: 328 |
Location: surabaya |
|
|
|
|
|
|
3.
Code: | <?php
if (!class_exists('ubam_dpdemon_link_protect')) {
class ubam_dpdemon_link_protect
{
var $master;
function ubam_dpdemon_link_protect($masterclass)
{
$this->master = $masterclass;
}
function exec_protect_url()
{
$mlpBase = $this->master;
$saved_secure_dir = trim($mlpBase->options['ubam_dpdemon_download_directory'], '/');
define('BASE_DIR', ABSPATH . "wp-content/$saved_secure_dir/");
$allowed_ext = array('zip' => 'application/zip', 'pdf' => 'application/pdf', 'doc' => 'application/msword', 'xls' => 'application/vnd.ms-excel', 'ppt' => 'application/vnd.ms-powerpoint', 'exe' => 'application/octet-stream', 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo');
if (!ini_get('safe mode')) {
set_time_limit(0);
}
if (!isset($_GET['seclnk']) || empty($_GET['seclnk'])) {
die("Please specify file name for download.");
}
$seclnk_array = explode('_L-N-KP_', $_GET['seclnk']);
if (count($seclnk_array) < 4) {
die("Invalid URL. Missing security information.");
}
$sugin_secrypt = new ubam_dpdemon_Secrypt(false);
if (true) {
$valid_referrer = true;
if ($sugin_secrypt->Decrypt($this->pct_decode($seclnk_array[3]), $mlpBase->options['ubam_dpdemon_gen_key'], $mlpBase->options['ubam_dpdemon_gen_secret'])) {
$hotlink = (int)$sugin_secrypt->Data;
$hotlink = ($hotlink == 0 ? 0 : 1);
} else {
$sugin_secrypt->ShowErrors();
exit;
}
if (isset($_SERVER['HTTP_REFERER']) && strlen($_SERVER['HTTP_REFERER']) > 0 && substr($_SERVER['HTTP_REFERER'], 0, strlen(get_bloginfo('home'))) != get_bloginfo('home')) {
$valid_referrer = false;
}
if ($hotlink > 0 && $valid_referrer) {
if (!(isset($_SERVER['HTTP_REFERER']) && strlen($_SERVER['HTTP_REFERER']) > 0)) {
$valid_referrer = false;
}
}
if (!$valid_referrer) {
die("Internal server error. Please contact system administrator.");
}
}
if ($sugin_secrypt->Decrypt($this->pct_decode($seclnk_array[0]), $mlpBase->options['ubam_dpdemon_gen_key'], $mlpBase->options['ubam_dpdemon_gen_secret'])) {
$secure_resource = $sugin_secrypt->Data;
} else {
$sugin_secrypt->ShowErrors();
exit;
}
if ($seclnk_array[1] < time()) {
die("This link is no longer valid.");
}
$string_to_sign = $mlpBase->options['ubam_dpdemon_gen_key'] . "GET\n\n\n" . $seclnk_array[1] . "\n" . $mlpBase->options['ubam_dpdemon_gen_secret'];
$auth_signature = $this->pct_encode(md5($string_to_sign));
if ($auth_signature != $seclnk_array[2]) {
die("Invalid security information in URL.");
}
if (strpos($secure_resource, '://') !== false) {
$parsedUrl = parse_url($secure_resource);
$thepath = $parsedUrl['path'];
$thehost = $parsedUrl['host'];
if (strpos(preg_replace('/^http:\/\/www\./i', 'http://', get_option('siteurl')), 'http://' . preg_replace('/^www\./i', '', $thehost)) === false) {
header('Location: ' . $secure_resource);
exit;
} else {
$fname = substr($thepath, strrpos($thepath, '/') + 1);
$theWPdir = parse_url(get_option('siteurl'));
if (!empty($theWPdir['path'])) {
$file_path = substr(ABSPATH, 0, strrpos(strtolower(ABSPATH), strtolower($theWPdir['path']))) . $thepath;
} else {
$file_path = ABSPATH . $thepath;
}
}
} else {
$fname = basename($secure_resource);
$file_path = '';
if (strpos($secure_resource, '/') !== false) {
$subdir = substr($secure_resource, 0, strrpos(strtolower($secure_resource), $fname));
$subdir = substr($subdir, 0, 1) == '/' ? substr($subdir, 1) : $subdir;
} else {
$subdir = '';
}
$this->find_file(BASE_DIR . $subdir, $fname, $file_path);
}
if (!(file_exists($file_path) && is_file($file_path))) {
die("File does not exist. Make sure you specified correct file name.<br />File Path: $file_path");
}
$fsize = filesize($file_path);
$fext = strtolower(substr(strrchr($fname, "."), 1));
if (!array_key_exists($fext, $allowed_ext) || $allowed_ext[$fext] == '') {
$mtype = '';
if (function_exists('mime_content_type')) {
$mtype = mime_content_type($file_path);
} elseif (function_exists('finfo_file')) {
$finfo = finfo_open(FILEINFO_MIME);
$mtype = finfo_file($finfo, $file_path);
finfo_close($finfo);
}
if ($mtype == '') {
$mtype = "application/force-download";
}
} else {
$mtype = $allowed_ext[$fext];
}
if (!isset($_GET['fc']) || empty($_GET['fc'])) {
$asfname = $fname;
} else {
$asfname = str_replace(array('"', "'", '\\', '/'), '', $_GET['fc']);
if ($asfname === '')
$asfname = 'NoName';
}
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: $mtype");
header("Content-Disposition: filename=\"$asfname\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $fsize);
readfile($file_path);
if (!LOG_DOWNLOADS)
die();
$f = @fopen(LOG_FILE, 'a+');
if ($f) {
@fputs($f, date("m.d.Y g:ia") . " " . $_SERVER['REMOTE_ADDR'] . " " . $fname . "\n");
@fclose($f);
}
}
function find_file($dirname, $fname, &$file_path)
{
$dir = opendir($dirname);
while ($file = readdir($dir)) {
if (empty($file_path) && $file != '.' && $file != '..') {
if (is_dir($dirname . '/' . $file)) {
$this->sec_url_find_file($dirname . '/' . $file, $fname, $file_path);
} else {
$fullname = rtrim($dirname, '/') . '/' . $fname;
if (file_exists($fullname)) {
$file_path = $fullname;
return;
}
}
}
}
}
function pct_decode($text_to_decode)
{
$out_text = preg_replace("/_BF_R_/", "%", $text_to_decode);
return base64_decode(rawurldecode($out_text));
}
function pct_encode($text_to_encode)
{
$out_text = rawurlencode(base64_encode($text_to_encode));
return preg_replace("/%/", "_BF_R_", $out_text);
}
}
}
require_once dirname(__FILE__) . '/Secrypt.class.inc.php';
?> |
|
|
|
|
|
|
www.waraxe.us Forum Index -> MD5 hashes
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
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|
|