Code della pagina per il login della parte amministratore:
code della pagina adm_check.aspcodice:<html> <head> <title></title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body background="graph/bg_page.jpg" topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5"> <div align="center"> <table width="60%" align="center" cellpadding="2" cellspacing="3"> <form action="adm_check.asp" method="post"> <tr> <td width="100%" colspan="2" align="center">Autenticazione Admin:</td> </tr> <tr> <td width="35%" align="right">User:</td> <td width="65%" align="left"><input type="text" name="adm_user" size="50"></td> </tr> <tr> <td width="35%" align="right">Pass:</td> <td width="65%" align="left"><input type="password" name="adm_pass" size="50"></td> </tr> <tr> <td width="100%" colspan="2" align="center"><input type="reset" value="Reset" class="pulsanti"><input class="pulsanti" type="submit" name="subm" value="Entra"></td> </tr> </form></table> </div> </body> </html>
Code del controllo su ogni pagina protettacodice:<%@ Language=VBscript %> <% Option explicit Response.buffer=true %> <html> <head> <title>Check Admin - Hide Page</title> </head> <body> <% Dim MySql_1, rs_1 set rs_1 = Server.createobject("ADODB.Recordset") MySql_1 = " SELECT * FROM login WHERE user = '" & APICE(Request("adm_user")) & "' AND pswd = '" & APICE(request("adm_pass")) & "'" 'response.write(mysql_1) rs_1.open MySql_1, Conn if ((rs_1.eof) and (rs_1.bof)) then %> <% Session("rst_adm") = FALSE %> <% response.redirect("adm_login.asp") else %> <% Session("rst_adm") = TRUE '--- Log user into DB Dim SQLLog, data, ip ip = Request.servervariables("REMOTE_ADDR") response.write(ip) response.write(time()) Dim orario orario = replace(Time(), ".", ":") 'response.end data = DatePart("d", Date()) & "/" & DatePart("m",Date()) & "/" & DatePart("yyyy",Date()) SQLLog = "INSERT INTO adminlog (UserName, TimeIn, DateIn, ip) VALUES ('" & Request("adm_user") & "', '" & orario & "', '" & data & "', '" & ip & "')" Conn.Execute(SQLLog) %> <% response.redirect("admin/index.asp?azione=clean_it") end if %> </body> </html>
Il database è di tipo mysql hostato su aruba gestito da loro.codice:<%@ Language=VBscript %> <% If Session("rst_adm") = FALSE or IsNull(Session("rst_adm")) then errore = "UTENTE NON RICONOSCIUTO" 'Redirect to unathorised user page response.redirect("../adm_login.asp") End If %>
Stanotte sono entrati con un ip Brasiliano (così dice shinystat). anche se non hanno fatto nulla non so darmi una spiegazione... un errore di asp ? un buco di msy ? o un genio del mondo hacker ?
Che ne pensate ?
grazie
ciao




Rispondi quotando
