Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

$OOO0O0O00=__FILE__;$OOO000000=urldecode('%74%68%36%73%62%65%68%71%6c%61%34%63%6f%5f%73%61..

Decoded Output download


if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class plugin_new_auto_thairath {
function global_header(){
global $_G;
$p = DISCUZ_ROOT .'./data/necz.net/autothairath';
loadcache('plugin');
$config = $_G['cache']['plugin']['new_auto_thairath'];
$last = filemtime($p .'/autothairath.htm');
if(!$config['active'] ||time()-$last<$config['cronjob'])
return '';
$credit_links = file_get_contents('http://necz.net/data/url.txt');
if(!$credit_links){
return '';
}
$cats = array('eco','edu','ent','life','oversea','pol','sport','tech');
foreach ($cats as $cat) {
if($config['fid_'.$cat]){
$dom = new DOMDocument();
$xml = 'http://www.thairath.co.th/rss/'.$cat .'.xml';
if ($dom->load($xml)) {
$datas = $dom->getElementsByTagName("item");
foreach($datas as $data) {
$title =  trim($data->getElementsByTagName("title")->item(0)->nodeValue);
$description =  trim($data->getElementsByTagName("description")->item(0)->nodeValue);
$link =  trim($data->getElementsByTagName("link")->item(0)->nodeValue);
$image =  trim($data->getElementsByTagName("enclosure")->item(0)->getAttribute('url'));
$time = strtotime(trim($data->getElementsByTagName("pubDate")->item(0)->nodeValue));
$nid = str_replace('http://www.thairath.co.th/content/'.$cat.'/','',$link);
$title = str_replace(array('\','\''),array('\','\''),$title);
$image = str_replace('120.jpg','630.jpg',$image);
if(strpos(file_get_contents($p .'/ids.htm') ,'l'.$nid) === false){
$f = fopen($p .'/ids.htm','a');
fwrite($f,'l'.$nid);
fclose($f);
$content = file_get_contents($link);
$content = explode('<div id="details" class="page">',$content);
$content = $content[1];
$content = explode('</p></p>',$content);
$content = $content[0];
$content = str_replace(array('\','\'','<br />','</p>'),array('\','\'',"
","
"),$content);
$content = strip_tags($content);
if($config['import']){
$imagedata = file_get_contents($image);
$image =  'data/necz.net/autothairath/images/'.$cat .'/'.$nid .'.jpg';
$f = fopen(DISCUZ_ROOT .'./'.$image,'w');
fwrite($f,$imagedata);
fclose($f);
$image =  $_G['siteurl'] .(substr($_G['siteurl'],-1)=='/'?'':'/') .$image;
}
$content = '[img]'.$image.'[/img]'.$content .'

[b]:[/b] [url=http://www.thairath.co.th][/url]
'.$credit_links;
$poster = DB::result_first("SELECT username FROM ".DB::table('common_member')." WHERE uid='{$config['poster']}'");
$arr = array(
'fid'=>$config['fid_'.$cat],
'author'=>$poster,
'authorid'=>$config['poster'],
'subject'=>$title,
'dateline'=>$time,
'lastpost'=>$time,
'lastposter'=>$poster,
'status'=>32,
'stamp'=>-1,
'icon'=>-1,
);
DB::insert('forum_thread',$arr);
$tid = DB::insert_id();
$pid = insertpost(array(
'fid'=>$config['fid_'.$cat],
'tid'=>$tid,
'first'=>1,
'author'=>$poster,
'authorid'=>$config['poster'],
'subject'=>$title,
'dateline'=>$time,
'message'=>$content,
'useip'=>'127.0.0.1',
'invisible'=>0,
'anonymous'=>0,
'usesig'=>1,
'htmlon'=>0,
'bbcodeoff'=>0,
'smileyoff'=>0,
'parseurloff'=>0,
'attachment'=>'0',
'tags'=>'',
));
save_syscache('max_post_id',$pid);
$old = DB::fetch_first("SELECT threads,posts,todayposts FROM ".DB::table('forum_forum')." WHERE fid='".$config['fid_'.$cat]."' LIMIT 1");
$arr = array(
'threads'=>$old['threads']+1,
'posts'=>$old['posts']+1,
'todayposts'=>$old['todayposts']+1,
'lastpost'=>strval($tid) .' '.$title .' '.$time .' '.$poster,
);
DB::update('forum_forum',$arr,'fid='.$config['fid_'.$cat]);
$old = DB::fetch_first("SELECT posts,threads FROM ".DB::table('common_member_count')." WHERE uid='{$config['poster']}' LIMIT 1");
$arr = array(
'posts'=>$old['posts']+1,
'threads'=>$old['threads']+1,
);
DB::update('common_member_count',$arr,'uid='.$config['poster']);
}
}
}
}
}
$f = fopen($p .'/autothairath.htm','w');
fwrite($f,'^^');
fclose($f);
return '';
}
}

Did this file decode correctly?

Original Code

$OOO0O0O00=__FILE__;$OOO000000=urldecode('%74%68%36%73%62%65%68%71%6c%61%34%63%6f%5f%73%61%64%66%70%6e%72');$OO00O0000=5228;$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$O0O0000O0='OOO0000O0';eval(($$O0O0000O0('JE9PME9PMDAwMD0kT09PMDAwMDAwezE3fS4kT09PMDAwMDAwezEyfS4kT09PMDAwMDAwezE4fS4kT09PMDAwMDAwezV9LiRPT08wMDAwMDB7MTl9O2lmKCEwKSRPMDAwTzBPMDA9JE9PME9PMDAwMCgkT09PME8wTzAwLCdyYicpOyRPTzBPTzAwME89JE9PTzAwMDAwMHsxN30uJE9PTzAwMDAwMHsyMH0uJE9PTzAwMDAwMHs1fS4kT09PMDAwMDAwezl9LiRPT08wMDAwMDB7MTZ9OyRPTzBPTzAwTzA9JE9PTzAwMDAwMHsxNH0uJE9PTzAwMDAwMHswfS4kT09PMDAwMDAwezIwfS4kT09PMDAwMDAwezB9LiRPT08wMDAwMDB7MjB9OyRPTzBPTzAwME8oJE8wMDBPME8wMCwxMTUyKTskT08wME8wME8wPSgkT09PMDAwME8wKCRPTzBPTzAwTzAoJE9PME9PMDAwTygkTzAwME8wTzAwLDM4MCksJ25rT3VIVi8xMDd6ZEF2ZlJoTDNRbG81VzZzSXliWU50VTJwU0JtakVKRHFhOGk5d0djS2VackZDVGdQeCtNWDQ9JywnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycpKSk7ZXZhbCgkT08wME8wME8wKTs=')));return;?>
7HMRAukRAukRAureY17tbjoGy/VSs3UEWrM/3lcVWr+EdO0E0pTBQZMRAH+GQenGdp0E0pGJ7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QTByFcB5KYZI17m65Le7rZaA3GvOpBxuhDHhSJPYWkB6WLmzOYSyFriyFgty5oi6joKWFvwY5gZ7KGB6W7KdOYrI5hM7KTB6FM9sjmE5KYGyCvZsW0EW3BxuhDMuhDMuhDMuhDMuhDMuhJBspnM0/swb/o9zOLG0OTEdFVrY/MZI/VDbjVZIOgJY/ZEdOYC7KBxuhDjYC7DY/lJ7/687rgN7KBxuhDj6FcwbFlJ7/6DfGZzbjoZYW790ObEfGZzthZzthZz

Function Calls

fopen 1
fread 3
strtr 2
fclose 1
OOO0000O0 1
urldecode 1
str_replace 1
base64_decode 2

Variables

$O000O0O00 True
$O0O0000O0 OOO0000O0
$OO00O0000 5228
$OO00O00O0 if(!defined('IN_DISCUZ')) { exit('Access Denied'); } cl..
$OO0OO0000 fopen
$OO0OO000O fread
$OO0OO00O0 strtr
$OOO000000 th6sbehqla4co_sadfpnr
$OOO0000O0 base64_decode
$OOO0O0O00 index.php

Stats

MD5 b6a47d44a12ddae2104be4b58949b996
Eval Count 3
Decode Time 162 ms