• <tbody id="9je1r"></tbody><tbody id="9je1r"><acronym id="9je1r"><rp id="9je1r"></rp></acronym></tbody>
      • <acronym id="9je1r"><acronym id="9je1r"><rp id="9je1r"></rp></acronym></acronym>

        亚洲无码Aⅴ,视频1页精品,欧美系列一区二区,曰韩色999

        數(shù)據(jù)庫(kù)被掛馬的ASP處理方法

        2012/9/13 13:49:55   閱讀:2813    發(fā)布者:2813

        第一步:為現(xiàn)有數(shù)據(jù)庫(kù)做好備份。

        第二步:

        執(zhí)行如下ASP文件,這樣就可以去掉數(shù)據(jù)庫(kù)當(dāng)中的JS木馬:
        注:conn.asp自己去寫(xiě)了。

        '這里放入JS木馬內(nèi)容:請(qǐng)記得改為自己數(shù)據(jù)庫(kù)中的JS木馬內(nèi)容。

         

        如果數(shù)據(jù)庫(kù)表很多的話,上面的遍歷數(shù)據(jù)庫(kù)結(jié)構(gòu)未執(zhí)行完就被IIS給停止了。在這時(shí)候可以在

        If rstSchema("TABLE_TYPE")="TABLE" Then

        當(dāng)中適當(dāng)加入k值的范圍,如:

        If rstSchema("TABLE_TYPE")="TABLE" k>10 and k<20 Then

        這樣的話就一次只操作9個(gè)表。

        第三步:

        根據(jù)數(shù)據(jù)庫(kù)JS注入的特性(會(huì)包括和http://這樣的字符),
        在conn.asp里面放入如下代碼:

        Function Cheack_Sqljs()'防止數(shù)據(jù)庫(kù)外鏈JS注入:true為發(fā)現(xiàn)外鏈JS注入。
            Dim F_Post,F_Get
            Cheack_Sqljs=False
            If Request.Form<>"" Then'表單提交時(shí)的檢測(cè)
                For Each F_Post In Request.Form
                    If (Instr(LCase(Request.Form(F_Post)),"0 or Instr(LCase(Request.Form(F_Post)),"")<>0) and Instr(LCase(Request.Form(F_Post)),"http://")<>0 Then
                        Cheack_Sqljs=True
                        Exit For
                    End If
                Next
            End If
            If Request.QueryString<>"" Then'QueryString提交時(shí)的檢測(cè)
                For Each F_Get In Request.QueryString
                    If (Instr(LCase(Request.Form(F_Get)),"0 or Instr(LCase(Request.Form(F_Get)),"")<>0) and Instr(LCase(Request.Form(F_Get)),"http://")<>0 Then
                        Cheack_Sqljs=True
                        Exit For
                    End If
                Next
            End If
        End Function
        Function CheckDataFrom()'檢查提交數(shù)據(jù)來(lái)源:True為數(shù)據(jù)從站外提交過(guò)來(lái)的
            CheckDataFrom=True
            server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
            server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
            if mid(server_v1,8,len(server_v2))<>server_v2 then
                CheckDataFrom=False
            end if
        End Function
        If Cheack_Sqljs or CheckDataFrom Then
           Response.Write " "
           Response.End()
        End If

        亚洲无码Aⅴ,视频1页精品,欧美系列一区二区,曰韩色999
            • <tbody id="9je1r"></tbody><tbody id="9je1r"><acronym id="9je1r"><rp id="9je1r"></rp></acronym></tbody>
            • <acronym id="9je1r"><acronym id="9je1r"><rp id="9je1r"></rp></acronym></acronym>
              来安县| 宁国市| 共和县| 安徽省| 始兴县| 永仁县| 温泉县| 商南县| 闽侯县| 张家口市| 平顺县| 分宜县| 枣强县| 阳江市| 彭州市| 沁水县| 武邑县| 安远县| 安塞县| 鄂托克前旗| 芦溪县| 井陉县| 炎陵县| 睢宁县| 辛集市| 宁明县| 水富县| 育儿| 当涂县| 石阡县| 渝北区| 遵义县| 永福县| 仙桃市| 景洪市| 额济纳旗| 新邵县| 射洪县| 惠水县| 昂仁县| 孟津县|