用ASP技術編制隱藏使用者密碼程式

2022-04-18 11:21:13 字數 953 閱讀 5458

internet(或intranet)上帶許可權的查詢,只有「合法使用者」才能進入。這種機制是通過web程式實現的。在訪問過程中,如果程式設計得不好,就會將使用者口令暴露在位址列裡(舉乙個例子: ?superusername=john&passwd=john123,使用者名稱john和密碼john123全露出來了),這樣系統就無保密和安全性可言了。怎樣避免這種現象的發生呢?本文將用一段asp(active server pages)程式,來說明隱藏使用者名稱和口令的方法。

asp是microsoft公司處理動態網路資料庫的最新技術之一,它可由windows nt 平台上的web server iis4.0(microsoft internet information server4.0)解釋並發布資訊,用活動資料物件ado(activex data object)元件並通過odbc(open database connectivity)訪問多種資料庫(後台)。本文中用到的資料庫為oracle(大型**資料庫平台)8,下邊這段asp程式(名字為default.asp)所實現的功能是對資料庫的查詢操作,僅取其隱藏使用者名稱和密碼的一部分進行說明。

(大型**資料庫平台)使用者名稱(orauser)及口令(orauser_passwd)%>

conn.open "odbcname","orauser","orauser_passwd"

%>

var_sql="select * from verifytab,dw_tab where verifytab.user_pd="&web_user_passwd&""

set rs = conn.execute(var_sql) 』符合條件的記錄生成於rs之中%>

〈〉else

if rs.eof then

response.redirect("default.htm")

end if

end if

%>

……大家不妨試一下,瀏覽器端無任何不安全資訊,保密效果很好。

用Asp隱藏檔案路徑,實現防盜煉

用asp隱藏檔案路徑,實現防盜煉 示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getf...

用Asp隱藏檔案路徑實現防盜煉

示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getfilename longname ...

用Asp隱藏檔案路徑實現防盜煉

示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getfilename longname ...