Dealing with the database is linked to the horse has a trick

  

My website is always reporting this poison trojandownloader, some people say that the database may be hanging, but the database I do not understand, please help, teach me how to solve the problem What? The database is being hanged, I believe many people have encountered it. Here, Xiaobian talks about the programming method of the ASP database being hung up. You can try it out and help you.

Step 1: Make a backup for the existing database.

Step 2: Execute the following ASP file, so you can remove the JS Trojan in the database:

Note: conn.asp wrote it yourself.

& rsquo; Here to put JS Trojan content: Please remember to change the JS Trojan content in your database.

If there are a lot of database tables, the above traversal database structure is not executed and is stopped by IIS. At this time, you can:

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

Add a range of k values, such as:

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

In this case, only 9 tables are operated at a time.

Step 3:

According to the characteristics of the database JS injection (which will include characters such as http://), put the following code in conn.asp:

Function Cheack_Sqljs()’Prevents out-of-database JS injection: true for finding out-of-chain JS injection.

Dim F_Post,F_Get

Cheack_Sqljs=False

If Request.Form<>"" Then’Detecting Form Submitting 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’Check for QueryString commit 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< Br>

End Function

Function CheckDataFrom()’Check Submit Data Source: True is a number

SubmitDataFrom=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

Generally there is a table in the database that reads the database or The server code, caused by the connection with the management database software, deletes the records in the table.

Copyright © Windows knowledge All Rights Reserved