موصى به: أفكار تنفيذ الترحيل الخالية من المكونات والرمز ترقيم الصفحات الخالية من المكونات لا يصدق. ستعرف من خلال النظر في تأثير هذه المقالة. دعنا نشارككم التنفيذ المحدد أدناه. يمكن للأصدقاء المهتمين الرجوع إليها.
العنوان: ASP Ewebeditor V3.8 COLUME DIRENTORY PRUSERIBITION (إصدارات أخرى هي اختبارات)
ملف الضعف: ASP/Browse.asp
تحدث الضعف:
sub initparam ()
stype = ucase (trim (request.querystring (type)))) sstylename = trim (request.querystring (style)) scusdir = trim (request.querystring (cusdir)) dim i ، astyleconfig ، bvalidstyleidstyle = falsefor i = 1 to abound (astyle) |||)) إذا كان lcase (sstylename) = lace (astyleconfig (0)) therbvalidStyle = trueExit forend ifnextif bvalidstyle = false tenoutscript (alert ('invalid style.)) = clng (astyleconfig (61)) إذا كان nallowbrowse <> 1 thenoutscript (تنبيه ('لا تسمح للمتصفح!)) ينتهي إذا كان ncusdirflag <> 1 thencusdir = elsescusdir = استبدال (scusdir ، /، /) إذا كان اليسار (scusdir ، 1) = /ent (scusdir ، 1) =. أو اليمين (scusdir ، 1) =. أو Instr (scusdir ، ./)> 0 أو instr (scusdir ، /.)> 0 أو instr (scusdir ، //)> 0 thenscusdir = elseif elseif (scusdir ، 1) <> /thenscusdir = scusdir & /end if if if if Ifsuploaddir = astyleconfig (3) thensuploaddir = ../ & suploaddirend ifseSelect case sbaseurlcase 0scontentPath = astyleconfig (23) case 1scontententpath = relaterpath2rootpath (suploaddir) case 2scontentpath = rootpath2domainpath (rispatpathpath (suploaddir) scusdirscontententpath = scontentatpath & scusdiroselect case stypecase filesallowext = case mediaSallowext = rm | mp3 | wav | mid | midi | ra | avi | mpg | mpeg | asf | wma | movcase flassallyext = swfcase elsesalloxext = bmp | jpeg | suploaddirsdir = trim (request (dir)) '1. افترض dir = ../'2. افترض dir = ... // '3. افترض dir = ... /// sdir = استبدال (sdir ،/،/) 'filter 1sdir = استبدال (sdir ، ../ ،)' filter 2'1. يتم ترشيحه هنا SDIR = استبدال (SDIR ، ./ ،) 'Filter 3'2 مدعوم أيضًا هنا' 3 هنا .../. أكثر إثارة للاهتمام! يبدو أنه يتم تصفية العديد من CMS مثل هذا. [ /color] إذا كان sdir <> thenif checkvaliddir (server.mappath (suploaddir & sdir)) = thenscurrdir الحقيقي = suploaddir & sdir & /elsesdir = end ifend sub subالمشاركة: كيفية الحصول على عنوان IP حقيقي لـ ASP استخدم request.ServerVariables (Remote_ADDR) في ASP للحصول على عنوان IP الخاص بالعميل ، ولكن إذا كان العميل يستخدم خادم الوكيل للوصول إليه ، يتم الحصول على عنوان IP لخادم الوكيل ، وليس عنوان IP للعميل الحقيقي. للحصول على عنوان IP الحقيقي للعميل من خلال خادم الوكيل ، يجب عليك استخدام request.ServerVariables (H