النتائج 1 إلى 5 من 5

الموضوع: ثغره الفلاش يا عندليب ؟ بالله المساعده

  1. #1
    عضو سوبر نشيط
    تاريخ التسجيل
    Aug 2004
    المشاركات
    671

    ثغره الفلاش يا عندليب ؟ بالله المساعده



    كيفيه اغلاق ثغره الفلاش الخطيره مضمونة 100 فى 100

    --------------------------------------------------------------------------------

    بسم الله نبدأ :-

    هناك طريقتين لحل هذه الثغره

    اول طريقه واسهل طريقه هى اضافه كلمه كوكي ((cookie ))

    الى قائمه الكلمات الممنوعه فى المنتدى وهذه سهله من لوحه التحكم

    اما الحل التانى لهذه الثغره فهو طويل شويه الحقيقه وعايزك تركز معايا

    مشكله الثغره فى ملف functions_bbcodeparse.php

    وحلها ايضا فى هذا الملف

    بسم الله بندا :-


    اسحب هذا الملف من مجلد المنتدى وعدل عليه كالتالى

    1- دور على الكود ده

    كود PHP:
    $bbcodes['custom']['recurse']['highlight'][0] = array('replace_html' => "<span class=\"highlight\">\\7</span>"); 




    بعده مباشره اضف هذا الكود


    كود PHP:
    // For Magic-Box Added By AL3NDALEEB 

    $bbcodes['custom']['find']['[poem'] = '#\[poe[m](\s|&quot;|"|\'|)(.*)\\1\](<br>|<br />|\r\n|\n|\r)??(.*)(<br>|<br />|\r\n|\n|\r)??\[/poe[m]\]#esiU'
    $bbcodes['custom']['replace']['[poem'] = "handle_bbcode_normal('\\4', '\\2', '', 'poem')"
    $bbcodes['custom']['recurse']['poem'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['[frame='] = '#\[frame=(&quot;|"|\'|)([0-9]+)[ ]+([0-9]+)[ ]*\\1\](<br>|<br />|\r\n|\n|\r)??(.*)(<br>|<br />|\r\n|\n|\r)??\[/frame\]#esiU'
    $bbcodes['custom']['replace']['[frame='] = "handle_bbcode_normal('\\5', '\\2', '\\3', 'frame')"
    $bbcodes['custom']['recurse']['frame'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['[grade='] = '#\[grade(&quot;|"|\'|)(.*)\\1\](<br>|<br />|\r\n|\n|\r)??(.*)(<br>|<br />|\r\n|\n|\r)??\[/grade\]#esiU'
    $bbcodes['custom']['replace']['[grade='] = "handle_bbcode_normal('\\4', '\\2', '', 'grade')"
    $bbcodes['custom']['recurse']['grade'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['--------------------------------------------------------------------------------'] = '#\[hr\]#esiU'
    $bbcodes['custom']['replace']['--------------------------------------------------------------------------------'] = "handle_bbcode_normal('hr', '', '', 'hr')"
    $bbcodes['custom']['recurse']['hr'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['--------------------------------------------------------------------------------'] = '#\[line\]#esiU'
    $bbcodes['custom']['replace']['--------------------------------------------------------------------------------'] = "handle_bbcode_normal('line', '', '', 'hr')"
    $bbcodes['custom']['recurse']['line'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['[flash='] = '#\[flash=(&quot;|"|\'|)(.*)\\1\](width=)\\1([0-9]+)\\1[ ]+(height=)\\1([0-9]+)\\1\[/flash\]#esiU'
    $bbcodes['custom']['replace']['[flash='] = "handle_bbcode_normal('\\2', '\\4','\\6', 'flash')"
    $bbcodes['custom']['recurse']['flash'][0] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['[flash='] = '#\[flash=(&quot;|"|\'|)(.*)\\1\](height=)\\1([0-9]+)\\1[ ]+(width=)\\1([0-9]+)\\1\[/flash\]#esiU'
    $bbcodes['custom']['replace']['[flash='] = "handle_bbcode_normal('\\2', '\\6','\\4', 'flash')"
    $bbcodes['custom']['recurse']['flash'][1] = array('handler' => 'handle_bbcode_normal'); 

    $bbcodes['custom']['find']['[flash='] = '#\[flash=(&quot;|"|\'|)(.*)\\1\]([w|W][i|I][d|D][t|T][h|H][=])\\1([0-9]+)\\1[ ]+([h|H][e|E][i|I][g|G][h|H][t|T][=])\\1([0-9]+)\\1\[/flash\]#esiU'
    $bbcodes['custom']['replace']['[flash='] = "handle_bbcode_normal('\\2', '\\4','\\6', 'flash')"
    $bbcodes['custom']['recurse']['flash'][0] = array('handler' => 'handle_bbcode_normal'); 

    // 




    2- دور على الكود تجده اخر شىء



    كود PHP:
    ?> 



    قبله مباشره اضف هذا الكود



    كود PHP:
    // For Magic-Box Added By AL3NDALEEB 
    function handle_bbcode_normal($message$param1 ''$param2 ''$type '' 


    // remove empty codes 
    if (trim($message) == '' || $type == ''

    return 
    ''


    // remove unnecessary escaped quotes 
    $message strip_smilies(str_replace('\\"''"'$message)); 

    if(
    $type == 'poem'){ 

    $param1 str_replace('\\"''"'$param1); 
    $param1 str_replace('"''&quot;'$param1); 

    // remove smilies from param 
    $param1 strip_smilies($param1); 
    $html '<div tag="'.$param1.'" style="display:none">'.$message.'</div><script>doPoem(0)</script>'

    }elseif(
    $type == 'frame'){ 

    $param1 str_replace('\\"''"'$param1); 
    $param1 str_replace('"''&quot;'$param1); 
    $param2 str_replace('\\"''"'$param2); 
    $param2 str_replace('"''&quot;'$param2); 

    // remove smilies from param 
    $param1 strip_smilies($param1); 
    $param2 strip_smilies($param2); 
    $html '<div id="myframe" tag="'.$param1.'|'.$param2.'" style="display:none">'.$message.'</div><script>drawFrame()</script>'

    }elseif(
    $type == 'hr'){ 

    $html '<hr noshade size=1>'

    }elseif(
    $type == 'grade'){ 

    $param1 str_replace('\\"''"'$param1); 
    $param1 str_replace('"''&quot;'$param1); 

    // remove smilies from param 
    $param1 strip_smilies($param1); 
    $html '<div id="mygradient" tag="'.$param1.'" style="display:none">'.$message.'</div><script>drawGradient()</script>'

    }elseif(
    $type == 'flash'){ 
    if (!
    preg_match('#^[a-z]+://#si'$message)){ 
    return 
    ''

    $param1 intval($param1); 
    $param2 intval($param2); 
    $html '<embed src="'.$message.'" width="'.$param1.'" height="'.$param2.'" quality=high loop=true menu=false TYPE="application/x-shockwave-flash"</embed>'


    return 
    $html






    بس كده خلاص ان شاء الله احفظ الملف وارفعه وان شاء الله انسى الثغره

    ملاحظاتى على الموضوع :-
    1- رأيى الخاص لاى صاحب منتدى استخدم الطريقتين مع بعض لسد الثغره وليس طريقه واحده

    هذا والله اعلى واعلم
    http://www.traidnt.net/vb/showthread.php?t=15633

    شوفوا الموضوع للاخر ..

    أخر سطر اللي يقول اضف ?>

    فما ادري اضيفة تحت هذا :con2:

    كود PHP:
    /*======================================================================*\
    || ####################################################################
    || # Downloaded: XXXX, XXX XXX XXXX XXXX
    || # CVS: $RCSfile: functions_bbcodeparse.php,v $ - $Revision: 1.186.2.7 $
    || ####################################################################
    \*======================================================================*/
    ?> 








  2. #2
    عضو سوبر نشيط
    تاريخ التسجيل
    Jun 2005
    المشاركات
    774


    أيه أخوي قبل

    ?>

    أخوك

    حمد الشمري






  3. #3
    عضو سوبر نشيط
    تاريخ التسجيل
    Aug 2004
    المشاركات
    671


    كود PHP:
    /*======================================================================*\ 
    || #################################################################### 
    || # Downloaded: XXXX, XXX XXX XXXX XXXX 
    || # CVS: $RCSfile: functions_bbcodeparse.php,v $ - $Revision: 1.186.2.7 $ 
    || #################################################################### 
    \*======================================================================*/ 
    ?> 
    اشكرك اخوي حمد بس راح يصير الكود اسفل من المربع ؟؟ :con2:
    وعلى حسب خبرتي ان الغالب المربع يكون اخر شي :con2:






  4. #4
    عضو سوبر نشيط
    تاريخ التسجيل
    Jun 2005
    المشاركات
    774


    كود:
    /*======================================================================*\ 
    || #################################################################### 
    || # Downloaded: XXXX, XXX XXX XXXX XXXX 
    || # CVS: $RCSfile: functions_bbcodeparse.php,v $ - $Revision: 1.186.2.7 $ 
    || #################################################################### 
    \*======================================================================*/
    مابيأثر عليك بشي مجرد تعليق بملفات php

    طيب أنت كيف تركب الهاكات بعد المربع الي بالأول في ملف php :con2:

    ماراح يأثر بأي شي والعندليب قاله ومتأكد من نفسه يعني

    سويها وريح بالك

    أي شي في الملفات كــــ
    /*

    هو عبارة عن تعليق فقط ولا يظهر في عمل المنتدى

    أخوك

    حمد الشمري






  5. #5


    الترقيع هذا قديم يا أخ فاشل بجداره

    انصحك بتركيب هاك أزرار إضافيه .

    تحياتي لك










ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض