Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[疑问] 解密了bbcode.inc.php 版本 SupeSite 6.0.1 UC 但怎么才能加上emule支持???

[复制链接]
beroko 发表于 2008-11-23 12:38:19 | 显示全部楼层 |阅读模式
解密了bbcode.inc.php  版本 SupeSite 6.0.1 UC  但我不知道怎么才能加上emule
  1. <?php
  2. function bbcode( $message, $bbcodeoff = 0, $smileyoff = 0, $htmlon = 0, $jammer = 0, $allowmediacode = 0 )
  3. {
  4.     global $_DCACHE;
  5.     global $discuzcodes;
  6.     $message = preg_replace( "/\\s*\\[code\\](.+?)\\[\\/code\\]\\s*/ies", "codedisp('\\1')", $message );
  7.     if ( !$htmlon )
  8.     {
  9.         $message = preg_replace( "/\r\n|\n|\r/e", "jammer()", shtmlspecialchars( $message ) ) ? preg_replace( "/\r\n|\n|\r/e", "jammer()", shtmlspecialchars( $message ) ) : shtmlspecialchars( $message );
  10.     }
  11.     if ( !$smileyoff && !isset( $_DCACHE['smilies'] ) && is_array( $_DCACHE['smilies'] ) )
  12.     {
  13.         $message = preg_replace( $_DCACHE['smilies']['searcharray'], $_DCACHE['smilies']['replacearray'], $message, 50 );
  14.     }
  15.     if ( !$bbcodeoff )
  16.     {
  17.         if ( isset( $discuzcodes['searcharray'] ) )
  18.         {
  19.             $discuzcodes['searcharray']['bbcode_regexp'] = array( "/\\s*\\[quote\\][\n\r]*(.+?)[\n\r]*\\[\\/quote\\]\\s*/is", "/\\s*\\[free\\][\n\r]*(.+?)[\n\r]*\\[\\/free\\]\\s*/is", "/\\[url\\]\\s*(www.|https?:\\/\\/|ftp:\\/\\/|gopher:\\/\\/|news:\\/\\/|telnet:\\/\\/|rtsp:\\/\\/|mms:\\/\\/|callto:\\/\\/|ed2k:\\/\\/){1}([^\\["']+?)\\s*\\[\\/url\\]/ie", "/\\[url=www.([^\\["']+?)\\](.+?)\\[\\/url\\]/is", "/\\[url=(https?|ftp|gopher|news|telnet|rtsp|mms|callto|ed2k){1}:\\/\\/([^\\["']+?)\\](.+?)\\[\\/url\\]/is", "/\\[email\\]\\s*([a-z0-9\\-_.+]+)@([a-z0-9\\-_]+[.][a-z0-9\\-_.]+)\\s*\\[\\/email\\]/i", "/\\[email=([a-z0-9\\-_.+]+)@([a-z0-9\\-_]+[.][a-z0-9\\-_.]+)\\](.+?)\\[\\/email\\]/is", "/\\[color=([^\\[\\<]+?)\\]/i", "/\\[size=(\\d+(\\.\\d+)?(px|pt|in|cm|mm|pc|em|ex|%)+?)\\]/i", "/\\[size=(\\d+?)\\]/i", "/\\[font=([^\\[\\<]+?)\\]/i", "/\\[align=([^\\[\\<]+?)\\]/i", "/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is" );
  20.             $discuzcodes['replacearray']['bbcode_regexp'] = array( "<p style="font-weight: bold; margin: 1em 1em 0 1em;">QUOTE:</p><blockquote style="border: 1px dotted #DDD; margin: 0 1em 1em; padding: 0.5em; line-height: 1.8em;">\\1</blockquote>", "<p style="font-weight: bold; margin: 1em 1em 0 1em;">FREE:</p><blockquote style="border: 1px dotted #DDD; margin: 0 1em 1em; padding: 0.5em; line-height: 1.8em;">\\1</blockquote>", "cuturl('\\1\\2')", "<a href="http://www.\\1" target="_blank">\\2</a>", "<a href="\\1://\\2" target="_blank">\\3</a>", "<a href="mailto:\\1@\\2">\\1@\\2</a>", "<a href="mailto:\\1@\\2">\\3</a>", "<font color="\\1">", "<font style="font-size: \\1">", "<font size="\\1">", "<font face="\\1">", "<p align="\\1">", "<strong>*** Hidden to visitors ***</strong>" );
  21.             $discuzcodes[$discuzcodes['searcharray']['bbcode_regexp']] = "/\\[table(?:=(\\d{1,4}%?)(?:,([\\(\\)%,#\\w ]+))?)?\\]\\s*(.+?)\\s*\\[\\/table\\]/ies";
  22.             $discuzcodes[$discuzcodes['replacearray']['bbcode_regexp']] = "parsetable('\\1', '\\2', '\\3')";
  23.             $discuzcodes[$discuzcodes['searcharray']['bbcode_regexp']] = "/\\[table(?:=(\\d{1,4}%?)(?:,([\\(\\)%,#\\w ]+))?)?\\]\\s*(.+?)\\s*\\[\\/table\\]/ies";
  24.             $discuzcodes[$discuzcodes['replacearray']['bbcode_regexp']] = "parsetable('\\1', '\\2', '\\3')";
  25.             $discuzcodes[$discuzcodes['searcharray']['bbcode_regexp']] = "/\\[payto\\]\\s*\\(seller\\)(.*)\\(\\/seller\\)\\s*(\\(subject\\)(.*)\\(\\/subject\\))?\\s*(\\(body\\)(.*)\\(\\/body\\))?\\s*(\\(gross\\)(.*)\\(\\/gross\\))?\\s*(\\(price\\)(.*)\\(\\/price\\))?\\s*(\\(url\\)(.*)\\(\\/url\\))?\\s*(\\(type\\)(.*)\\(\\/type\\))?\\s*(\\(transport\\)(.*)\\(\\/transport\\))?\\s*(\\(ordinary_fee\\)(.*)\\(\\/ordinary_fee\\))?\\s*(\\(express_fee\\)(.*)\\(\\/express_fee\\))?\\s*\\[\\/payto\\]/iesU";
  26.             $discuzcodes[$discuzcodes['replacearray']['bbcode_regexp']] = "payto('\\1',array('subject'=>'\\3','body'=>'\\5','price'=>'\\7','price'=>'\\9','url'=>'\\11','type'=>'\\13','transport'=>'\\15','ordinary_fee'=>'\\17','express_fee'=>'\\19'))";
  27.             $discuzcodes['searcharray']['bbcode_str'] = array( "[/color]", "[/size]", "[/font]", "[/align]", "[b]", "[/b]", "[i]", "[/i]", "[u]", "[/u]", "[list]", "[list=1]", "[list=a]", "[list=A]", "[*]", "[/list]", "[indent]", "[/indent]" );
  28.             $discuzcodes['replacearray']['bbcode_str'] = array( "</font>", "</font>", "</font>", "</p>", "<b>", "</b>", "<i>", "</i>", "<u>", "</u>", "<ul>", "<ol type=1>", "<ol type=a>", "<ol type=A>", "<li>", "</ul></ol>", "<blockquote>", "</blockquote>" );
  29.         }
  30.         $discuzcodes[$discuzcodes['searcharray']['bbcode_regexp']] = "/\\[media=(\\w{1,4}),(\\d{1,4}),(\\d{1,4}),(\\d)\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/media\\]/ies";
  31.         if ( $allowmediacode )
  32.         {
  33.             $allowmediacode[$discuzcodes['replacearray']['bbcode_regexp']] = "parsemedia('\\1', \\2, \\3, \\4, '\\5')";
  34.         }
  35.         else
  36.         {
  37.             $allowmediacode[$discuzcodes['replacearray']['bbcode_regexp']] = "bbcodeurl('\\5', '<a href="%s" target="_blank">%s</a>')";
  38.         }
  39.         $message = str_replace( $discuzcodes['searcharray']['bbcode_str'], $discuzcodes['replacearray']['bbcode_str'], preg_replace( $_DCACHE['bbcodes']['searcharray'] ? array_merge( $discuzcodes['searcharray']['bbcode_regexp'], $_DCACHE['bbcodes']['searcharray'] ) : $discuzcodes['searcharray']['bbcode_regexp'], $_DCACHE['bbcodes']['replacearray'] ? array_merge( $discuzcodes['replacearray']['bbcode_regexp'], $_DCACHE['bbcodes']['replacearray'] ) : $discuzcodes['replacearray']['bbcode_regexp'], $message ) );
  40.         if ( preg_match( "/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is", $message ) )
  41.         {
  42.             $message = preg_replace( "/\\[hide\\]\\s*(.+?)\\s*\\[\\/hide\\]/is", "<b>\\1</b>", $message );
  43.             $message = preg_replace( "/\\[hide=(\\d+)\\]\\s*(.+?)\\s*\\[\\/hide\\]/ies", "creditshide(\\1,'\\2')", $message );
  44.         }
  45.         if ( isset( $discuzcodes['searcharray']['imgcode'] ) )
  46.         {
  47.             $discuzcodes['searcharray']['imgcode'] = array( "/\\[swf\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/swf\\]/ies", "/\\[wma\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/wma\\]/ies", "/\\[img\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/ies", "/\\[img=(\\d{1,3})[x|\\,](\\d{1,3})\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/ies" );
  48.             $discuzcodes['replacearray']['imgcode'] = array( "bbcodeurl('\\1', '<br>Flash: <a href="%s" class="showflash" onclick="return showmedia(this);">%s</a><br>')", "bbcodeurl('\\1', '<br>Media: <a href="%s" class="showvideo" onclick="return showmedia(this);">%s</a><br>')", "bbcodeurl('\\1', '<img src="%s" border="0">')", "bbcodeurl('\\3', '<img width="\\1" height="\\2" src="%s" border="0">')" );
  49.         }
  50.         $message = preg_replace( $discuzcodes['searcharray']['imgcode'], $discuzcodes['replacearray']['imgcode'], $message );
  51.     }
  52.     $i = 0;
  53.     for ( ; $i <= $discuzcodes['pcodecount']; ++$i )
  54.     {
  55.         $message = str_replace( "\[\        DISCUZ_CODE_$i\        \]", $discuzcodes['codehtml'][$i], $message );
  56.     }
  57.     return $htmlon ? $message : nl2br( str_replace( array( "\t", "   ", "  " ), array( "&nbsp; &nbsp; &nbsp; &nbsp; ", "&nbsp; &nbsp;", "&nbsp;&nbsp;" ), $message ) );
  58. }

  59. function codedisp( $code )
  60. {
  61.     global $discuzcodes;
  62.     global $_DCACHE;
  63.     ++$discuzcodes['pcodecount'];
  64.     $code = shtmlspecialchars( str_replace( "\\"", """, preg_replace( "/^\[\
  65. \
  66. \]*(.+?)\[\
  67. \
  68. \]*\$/is", "\\1", $code ) ) );
  69.     $discuzcodes['codehtml'][$discuzcodes['pcodecount']] = "<p style="font-weight: bold; margin: 1em 1em 0 1em;">CODE:</p><code style="display: block; margin: 0 1em 1em; padding: 0.5em; border: 1px solid #CCC; font: 12px Courier, monospace; line-height: 1.8em;">$code</code>";
  70.     ++$discuzcodes['codecount'];
  71.     return "\[\        DISCUZ_CODE_$discuzcodes['pcodecount']\        \]";
  72. }

  73. function bbcodeurl( $url, $tags )
  74. {
  75.     if ( !preg_match( "/<.+?>/s", $url ) )
  76.     {
  77.         if ( !in_array( strtolower( substr( $url, 0, 6 ) ), array( "http:/", "ftp://", "rtsp:/", "mms://" ) ) )
  78.         {
  79.             $url = "http://".$url;
  80.         }
  81.         return str_replace( array( "submit", "logging.php" ), array( "", "" ), sprintf( $tags, $url, addslashes( $url ) ) );
  82.     }
  83.     else
  84.     {
  85.         return "&nbsp;".$url;
  86.     }
  87. }

  88. function parsemedia( $type, $width, $height, $autostart, $url )
  89. {
  90.     if ( in_array( $type, array( "ra", "rm", "wma", "wmv", "mp3", "mov" ) ) )
  91.     {
  92.         $url = str_replace( array( "<", ">" ), "", str_replace( "\\"", "\\"", $url ) );
  93.         $mediaid = "media_".random( 3 );
  94.     case "ra" :
  95.         return "<object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="".$width."" height="32"><param name="autostart" value="".$autostart."" /><param name="src" value="".$url."" /><param name="controls" value="controlpanel" /><param name="console" value="".$mediaid."_" /><embed src="".$url."" type="audio/x-pn-realaudio-plugin" controls="ControlPanel" ".( $autostart ? "autostart="true"" : "" )." console="".$mediaid."_" width="".$width."" height="32"></embed></object>";
  96.     case "rm" :
  97.         return "<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="".$width."" height="".$height.""><param name="autostart" value="".$autostart."" /><param name="src" value="".$url."" /><param name="controls" value="imagewindow" /><param name="console" value="".$mediaid."_" /><embed src="".$url."" type="audio/x-pn-realaudio-plugin" controls="IMAGEWINDOW" console="".$mediaid."_" width="".$width."" height="".$height.""></embed></object><br /><object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="".$width."" height="32"><param name="src" value="".$url."" /><param name="controls" value="controlpanel" /><param name="console" value="".$mediaid."_" /><embed src="".$url."" type="audio/x-pn-realaudio-plugin" controls="ControlPanel" ".( $autostart ? "autostart="true"" : "" )." console="".$mediaid."_" width="".$width."" height="32"></embed></object>";
  98.     case "wma" :
  99.         return "<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="".$width."" height="64"><param name="autostart" value="".$autostart."" /><param name="url" value="".$url."" /><embed src="".$url."" autostart="".$autostart."" type="audio/x-ms-wma" width="".$width."" height="64"></embed></object>";
  100.     case "wmv" :
  101.         return "<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="".$width."" height="".$height.""><param name="autostart" value="".$autostart."" /><param name="url" value="".$url."" /><embed src="".$url."" autostart="".$autostart."" type="video/x-ms-wmv" width="".$width."" height="".$height.""></embed></object>";
  102.     case "mp3" :
  103.         return "<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="".$width."" height="64"><param name="autostart" value="".$autostart."" /><param name="url" value="".$url."" /><embed src="".$url."" autostart="".$autostart."" type="application/x-mplayer2" width="".$width."" height="64"></embed></object>";
  104.     case "mov" :
  105.         return "<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="".$width."" height="".$height.""><param name="autostart" value="".( $autostart ? "true" : "false" )."" /><param name="src" value="".$url."" /><embed controller="true" width="".$width."" height="".$height."" src="".$url."" autostart="".( $autostart ? "true" : "false" ).""></embed></object>";
  106.     }
  107. }

  108. function jammer( )
  109. {
  110.     global $discuzcodes;
  111.     $randomstr = "";
  112.     $i = 0;
  113.     for ( ; $i < mt_rand( 5, 15 ); ++$i )
  114.     {
  115.         $randomstr .= chr( mt_rand( 0, 59 ) ).chr( mt_rand( 63, 126 ) );
  116.     }
  117.     return $discuzcodes['seoarray'] ? "<span style="display:none">".$discuzcodes['seoarray'][mt_rand( 0, 5 )].$randomstr."</span>"."\r\n" : "\r\n"."<span style="display:none">".$randomstr.$discuzcodes['seoarray'][mt_rand( 0, 5 )]."</span>";
  118. }

  119. function payto( $seller, $detail )
  120. {
  121.     $detailarray = array( );
  122.     foreach ( array_merge( $detail, array( "partner"=>"20880020258585430156", "readonly"=>"true" ) ) as $key=>$val )
  123.     {
  124.         if ( $val = trim( $val ) )
  125.         {
  126.                 continue;
  127.         }
  128.         else
  129.         {
  130.             $val[$detailarray] = $key."=".rawurlencode( $val );
  131.         }
  132.     }
  133.     return "<a href="https://www.alipay.com/payto:".$seller."?".implode( "&", $detailarray )."" target="_blank"><img src="".S_IMGDIR."/alipaybutton.gif" border="0"></a>";
  134. }

  135. function creditshide( $creditsrequire, $message )
  136. {
  137.     return "<b>".str_replace( "\\"", """, $message )."</b>";
  138. }

  139. function attachtag( $aid )
  140. {
  141.     global $attachlist;
  142.     if ( isset( $attachlist[$aid] ) )
  143.     {
  144.         $attach = $attachlist[$aid];
  145.         if ( $attach['isimage'] )
  146.         {
  147.             $replacement = "<p><a href="".B_URL."/attachment.php?aid=$attach['aid']" target="_blank"><img src="$attach['attachment']" border="0"><br>$attach['filename']</a></p>";
  148.         }
  149.         else
  150.         {
  151.             $replacement = "<p><img src="".S_URL."/images/base/haveattach.gif" align="absmiddle" border="0"><a href="".B_URL."/attachment.php?aid=$attach['aid']" target="_blank"><strong>$attach['filename']</strong></a><br />($attach['dateline'], Size: $attach['attachsize'], Downloads: $attach['downloads'])</p>";
  152.         }
  153.         return $replacement;
  154.     }
  155.     else
  156.     {
  157.         return "<strike>[attach]".$aid."[/attach]</strike>";
  158.     }
  159. }

  160. function attachtagone( $pid, $aid )
  161. {
  162.     global $attacharr;
  163.     if ( isset( $attacharr[$pid][$aid] ) )
  164.     {
  165.         $attach = $attacharr[$pid][$aid];
  166.         $replacement = "<br>";
  167.         if ( $attach['attachimg'] )
  168.         {
  169.             $replacement .= "<a href="".B_URL."/attachment.php?aid=$attach['aid']" target="_blank"><img src="$attach['attachment']" border="0"><br>$attach['filename']</a>";
  170.         }
  171.         else
  172.         {
  173.             $replacement .= "<p><img src="".S_URL."/images/base/haveattach.gif" align="absmiddle" border="0"><a href="".B_URL."/attachment.php?aid=$attach['aid']" target="_blank"><strong>$attach['filename']</strong></a><br />($attach['dateline'], Size: $attach['attachsize'], Downloads: $attach['downloads'])</p>";
  174.         }
  175.         return $replacement;
  176.     }
  177.     else
  178.     {
  179.         return "<strike>[attach]".$aid."[/attach]</strike>";
  180.     }
  181. }

  182. function parsetable( $width, $bgcolor, $message )
  183. {
  184.     $width = substr( $width, 0, 0 - 1 ) <= 98 ? $width : "98%" ? substr( $width, 0, 0 - 1 ) <= 98 ? $width : "98%" : $width <= 560$width ? "98%" : ;
  185.     return "<table cellspacing="0" ".( NULL ? NULL : "width="".$width."" " )."align="center" class="t_table"".( $bgcolor ? " style="background: ".$bgcolor."">" : ">" ).str_replace( "\\"", """, preg_replace( array( "/\\[tr(?:=([\\(\\)%,#\\w]+))?\\]\\s*\\[td(?:=(\\d{1,2}),(\\d{1,2})(?:,(\\d{1,4}%?))?)?\\]/ie", "/\\[\\/td\\]\\s*\\[td(?:=(\\d{1,2}),(\\d{1,2})(?:,(\\d{1,4}%?))?)?\\]/ie", "/\\[\\/td\\]\\s*\\[\\/tr\\]/i" ), array( "parsetrtd('\\1', '\\2', '\\3', '\\4')", "parsetrtd('td', '\\1', '\\2', '\\3')", "</td></tr>" ), $message ) )."</table>";
  186. }

  187. function parsetrtd( $bgcolor, $colspan, $rowspan, $width )
  188. {
  189.     return ( $bgcolor == "td" ? "</td>" : "<tr".( " style="background: ".$bgcolor" style="background: ".$bgcolor.""" ? "" :  ).">" )."<td".( " colspan="".$colspan.""" ? " colspan="".$colspan.""" : "" ).( " rowspan="".$rowspan.""" ? " rowspan="".$rowspan.""" : "" ).( $width ? " width="".$width.""" : "" ).">";
  190. }

  191. if ( !defined( "IN_SUPESITE" ) )
  192. {
  193.     exit( );
  194. }
  195. include_once( S_ROOT."/data/system/bbs_bbcodes.cache.php" );
  196. include_once( S_ROOT."/data/system/bbs_settings.cache.php" );
  197. include_once( S_ROOT."/data/system/bbs_style.cache.php" );
  198. define( "S_IMGDIR", B_URL."/".$_DCACHE['style']['imgdir'] );
  199. if ( isset( $_DCACHE['style']['smdir'] ) )
  200. {
  201.     $_DCACHE['style']['smdir'] = "images/smilies/default";
  202. }
  203. define( "S_SMDIR", B_URL."/".$_DCACHE['style']['smdir'] );
  204. $discuzcodes = array( "pcodecount"=>0 - 1, "codecount"=>0, "codehtml"=>"", "searcharray"=>array( ), "replacearray"=>array( ), "seoarray"=>array( 0=>"", 1=>$_SERVER['HTTP_HOST'], 2=>$_SCONFIG['sitename'], 3=>$_DCACHE['settings']['seotitle'], 4=>$_DCACHE['settings']['seokeywords'], 5=>$_DCACHE['settings']['seodescription'] ) );
  205. foreach ( $_DCACHE['smilies']['replacearray'] as $key=>$smiley )
  206. {
  207.     $_DCACHE['smilies']['replacearray'][$key] = "<img src="".S_SMDIR."/".$smiley."" align="absmiddle" border="0">";
  208. }
  209. mt_srand( ( double )microtime( ) * 1000000 );
  210. ?>
复制代码
 楼主| beroko 发表于 2008-11-23 13:14:19 | 显示全部楼层
toptoptoptoptop
回复

使用道具 举报

 楼主| beroko 发表于 2008-11-23 14:19:53 | 显示全部楼层
如果修改还需要解密哪个文件大家就告诉我,我解密了贴上来!!!!!!!!!!!!
回复

使用道具 举报

lsatprepcourse 发表于 2008-11-25 15:14:14 | 显示全部楼层
谢谢楼主,顶一下
回复

使用道具 举报

63490794 发表于 2008-11-25 15:33:27 | 显示全部楼层
牛人,哈哈
回复

使用道具 举报

hellollx 发表于 2009-6-17 15:14:05 | 显示全部楼层
能不能说下是要如何解密啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-1-1 08:47 , Processed in 0.033368 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表