揭秘asp常用函數(shù)庫(kù)大全(2)_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:詳解將ASP頁(yè)面改為偽靜態(tài)的簡(jiǎn)單方法
      目前很多網(wǎng)站都采用生成靜態(tài)頁(yè)的方法,原因是這樣訪問速度會(huì)得到提高(服務(wù)器端CPU利用率很低),另外也容易被搜索引擎收錄,但是這帶來的一個(gè)問題就是需要足夠大的空間存放這些靜態(tài)頁(yè)面,如果你的空間不是很富裕,而又想有利于被搜索引擎收錄,其實(shí)可以采用偽


      Function IP2Num(sip)
      ’--------------------限制某段IP地址

          dim str1,str2,str3,str4
          dim num
          IP2Num=0
          if isnumeric(left(sip,2)) then
              str1=left(sip,instr(sip,".")-1)
              sip=mid(sip,instr(sip,".")+1)
              str2=left(sip,instr(sip,".")-1)
              sip=mid(sip,instr(sip,".")+1)
              str3=left(sip,instr(sip,".")-1)
              str4=mid(sip,instr(sip,".")+1)
              num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
              IP2Num = num
          end if
      end function

      ’userIPnum = IP2Num(Request.ServerVariables("REMOTE_ADDR"))
      ’if userIPnum > IP2Num("192.168.0.0") and userIPnum < IP2Num("192.168.0.255") then
          ’response.write ("<center>您的IP被禁止</center>")
          ’response.end
      ’end if


      Function chkFrom() 
      ’----------------------------防站外提交設(shè)定
          Dim server_v1,server_v2, server1, server2
          chkFrom=False 
          server1=Cstr(Request.ServerVariables("HTTP_REFERER"))
          server2=Cstr(Request.ServerVariables("SERVER_NAME"))
          If Mid(server1,8,len(server2))=server2 Then chkFrom=True 
      End Function
      ’if not chkFrom then
          ’Response.write("請(qǐng)不要從站外提交內(nèi)容!")
          ’Response.end
      ’End if

      function getsys()
      ’----------------------------------操作系統(tǒng)檢測(cè)
      vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
      if instr(vibo_soft,"Windows NT 5.0") then
          msm="Win 2000"
      elseif instr(vibo_soft,"Windows NT 5.1") then
          msm="Win XP"
      elseif instr(vibo_soft,"Windows NT 5.2") then
          msm="Win 2003"
      elseif instr(vibo_soft,"4.0") then
          msm="Win NT"
      elseif instr(vibo_soft,"NT") then
          msm="Win NT"
      elseif instr(vibo_soft,"Windows CE") then
          msm="Windows CE"
      elseif instr(vibo_soft,"Windows 9") then
          msm="Win 9x"
      elseif instr(vibo_soft,"9x") then
          msm="Windows ME"
      elseif instr(vibo_soft,"98") then
          msm="Windows 98"
      elseif instr(vibo_soft,"Windows 95") then
          msm="Windows 95"
      elseif instr(vibo_soft,"Win32") then
          msm="Win32"
      elseif instr(vibo_soft,"unix") or instr(vibo_soft,"linux") or instr(vibo_soft,"SunOS") or instr(vibo_soft,"BSD") then
          msm="類Unix"
      elseif instr(vibo_soft,"Mac") then
          msm="Mac"
      else
          msm="Other"
      end if
      getsys=msm
      End Function

      分享:解析有關(guān)eWebEditor網(wǎng)頁(yè)編輯器的漏洞
      首先介紹編輯器的一些默認(rèn)特征: 默認(rèn)登陸admin_login.asp 默認(rèn)數(shù)據(jù)庫(kù)db/ewebeditor.mdb 默認(rèn)帳號(hào)admin密碼admin或admin888 在baidu/google搜索inurl:ewebeditor 幾萬的站起碼有幾千個(gè)是具有默認(rèn)特征的,那么試一下默認(rèn)后臺(tái) http://www.xxx.com.cn/admin/eweb

      來源:模板無憂//所屬分類:ASP教程/更新時(shí)間:2010-04-24
      相關(guān)ASP教程