六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

ASP+MS SQL在線更改Serv-u的密碼

[摘要]針對一些虛擬主機管理軟件 的確應該去深入了解 :)下面是以Serv-U 6.0和Sql Server 2000相結合的演示。 建表Sql 語句:CREATE TABLE [groupaccount...

針對一些虛擬主機管理軟件 的確應該去深入了解 :)

下面是以Serv-U 6.0和Sql Server 2000相結合的演示。

建表Sql 語句:

CREATE TABLE [groupaccounts] (

[id] int IDENTITY (1,1) PRIMARY KEY,

[Index] int Default 0,

[Name] nVarChar(50) default '''''''',

[Notes] nVarChar(255) default ''''''''

)

CREATE INDEX [Name] on [groupaccounts]([Name] )

CREATE TABLE [groupdiraccess] (

[id] int IDENTITY PRIMARY KEY,

[Access] nVarChar(255) default '''''''',

[Index] int Default 0,

[Name] nVarChar(50) default ''''''''

)

CREATE INDEX [Name] on [groupdiraccess]([Name] )

CREATE TABLE [groupipaccess] (

[id] int IDENTITY PRIMARY KEY,

[Access] nVarChar(255) default '''''''',

[Index] int Default 0,

[Name] nVarChar(50) default ''''''''

)

CREATE INDEX [Name] on [groupipaccess]([Name] )

CREATE TABLE [useraccounts] (

[id] int IDENTITY PRIMARY KEY,

[Access] nVarChar(255) default '''''''',

[AlwaysLogin] int Default 0,

[ChangePass] int Default 0,

[Disable] int Default 0,

[Expirationtype] int Default 0,

[Expiration] datetime Default ''''1980-1-1'''',

[Groups] nVarChar(50) default '''''''',

[HideHidden] int Default 0,

[HomeDir] nVarChar(100) default '''''''',

[idleTimeOut] int Default 0,

[LogMesfile] nVarChar(100) default '''''''',

[MaxIp] int Default -1,

[MaxSpeedDown] decimal Default 0,

[MaxSpeedUp] decimal Default 0,

[MaxUsers] int Default -1,

[Name] nVarChar(50) default '''''''',

[Needsecure] int Default 0,

[Notes] nVarChar(255) default '''''''',

[PassType] int Default 0,

[Password] nVarChar(50) default '''''''',

[Privilege] int Default 0,

[QuotaCurrent] decimal Default 0,

[QuotaEnable] int Default 0,

[QuotaMax] decimal Default 0,

[RatioCredit] decimal Default 0,

[RatioDown] int Default 0,

[RatioType] int Default 0,

[RatioUP] int Default 0,

[RelPaths] int Default 0,

[SessionTimeOut] int Default 0,

[SkeyValues] nVarChar(50) default ''''''''

)

CREATE INDEX [Name] on [useraccounts]([Name] )

CREATE TABLE [userdiraccess] (

[id] int IDENTITY PRIMARY KEY,

[Access] nVarChar(255) default '''''''',

[Index] int Default 0,

[Name] nVarChar(50) default ''''''''

)

CREATE INDEX [Name] on [userdiraccess]([Name] )

CREATE TABLE [useripaccess] (

[id] int IDENTITY PRIMARY KEY,

[Access] nVarChar(255) default '''''''',

[Index] int Default 0,

[Name] nVarChar(50) default ''''''''

)

CREATE INDEX [Name] on [useripaccess]([Name] )

ServUDaemon.ini中的ODBC信息:

ODBCSource=Serv-U

ODBCTables=useraccounts groupaccounts userdiraccess groupdiraccess useripaccess groupipaccess

ODBCColumns=Name Password SkeyValues HomeDir LogMesfile Access Disable Needsecure RelPaths HideHidden AlwaysLogin ChangePass QuotaEnable MaxIp MaxSpeedUp MaxSpeedDown MaxUsers idleTimeOut SessionTimeOut RatioUP RatioDown RatioCredit QuotaCurrent QuotaMax Expiration Privilege PassType RatioType Groups Notes Index

加密算法為隨機碼與MD5 32 位加密, 例如:

兩個隨機字母:ab

用戶輸入密碼:123456

生成的密碼為:ab + MD5(ab123456)

提示:代碼僅實現(xiàn)更改密碼的功能, 并不一定完全符合或達到您的需求。

<!--#include file=''''conn.asp''''-->

<!--#include file=''''include/md5.asp''''-->

<%

dim act,UserName,OldPassword,NewPassword,reNewPassword

act = Request.form("act")

if act = "update" then

UserName = Request.form("UserName")

OldPassword = Request.form("OldPassword")

NewPassword = Request.form("NewPassword")

reNewPassword = Request.form("reNewPassword")

UserName = Replace(UserName,"''''","''''")

if len(UserName)<1 or len(OldPassword)<1 or len(NewPassword)<1 or len(reNewPassword)<1 then

alert("表單沒有填寫完整")

end if

if trim(NewPassword)<>trim(reNewPassword) then

alert("密碼與確認密碼不一樣")

end if

Sql0 = "select top 1 name,[password] from [useraccounts] where name = ''''"& UserName &"''''"

set rs0 = conn.execute(Sql0)

if rs0.eof and rs0.bof then

alert("用戶名不存在")

else

dbname = rs0("name")

dbpassword = rs0("password")

end if

cdbpassword = left(dbpassword,2) & md5(left(dbpassword,2) & OldPassword)

if trim(cdbpassword) <> trim(dbpassword) then

alert("密碼錯誤")

else

rndstr = MyRandc(2) ''''兩位隨機字母

newdbpassword = rndstr & md5(rndstr & NewPassword)

sql2 = "update [useraccounts] set [password] = ''''"& newdbpassword &"'''' where name=''''"& UserName &"''''"

conn.execute(sql2)

alert("密碼已經(jīng)更改, 可能要幾鐘后才能生效")

end if

end if

function alert(x)

response.write "<script language=''''JavaScript''''>alert(''''"& replace(x,"""","\""") &"'''');history.go(-1);</script>"

conn.close

set conn = nothing

response.end

end function

function MyRandc(n)''''生成隨機字符, n為字符的個數(shù)

thechr = ""

for i=1 to n

Randomize timer

zNum = cint(25*Rnd)

if zNum mod 2 = 0 then

zNum = zNum + 97

else

zNum = zNum + 65

end if

thechr = thechr & chr(zNum)

next

MyRandc = thechr

end function

%>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<META NAME="Author" CONTENT="海娃(51windows)">

<META NAME="Keywords" CONTENT="windows.net/" target=_blank>http://www.51windows.Net">

<title>更改FTP (Serv-U) 密碼 - 51windows.net</title>

</head>

<body>

<form method="POST" action="" name="form" autocomplete="off">

<input type="hidden" name="act" value="update">

<div align="center">

<center>

  <table border="0" width="480" cellpadding="2" cellspacing="1" class="table" style="border: 1 solid #336699;font-size:14px;">

  <tr>

    <td width="100%" align="center" colspan="2" class="title" style="background:#336699;color:#FFFFFF;">更改FTP (Serv-U) 密碼</td>

  </tr>

  <tr>

    <td width="30%" align="left"> 用戶名[√]:

u無垠育I\h網(wǎng)D供i5d[I

e8A^qO]6`_vH

</td>

    <td width="70%"><input class="input" type="text" maxlength=20 name="UserName" size="25" value="" /> (FTP登陸用戶名)</td>

  </tr>

  <tr>

    <td width="30%" align="left"> 舊密碼[√]:

MSu)A#wEigy\@zK

</td>

    <td width="70%"><input class="input" type="password" maxlength=20 name="OldPassword" size="25" value="" /> (必須輸入舊密碼)</td>

  </tr>

  <tr>

    <td width="30%" align="left"> 新密碼[√]:

業(yè)2網(wǎng)z?中t]業(yè)s網(wǎng):

</td>

    <td width="70%"><input class="input" type="password" name="NewPassword" size="25" value="" /> (輸入新密碼)</td>

  </tr>

  <tr>

    <td width="30%" align="left"> 確 認[√]:</td>

    <td width="70%"><input class="input" type="password" name="reNewPassword" size="25" value="" /> (再次輸入新密碼)</td>

  </tr>

  <tr>

    <td width="100%" height="30" align="center" colspan="2"><input style="font-size:14px;" type="submit" size="10" value="確 定" class=button></td>

  </tr>

  </table>

</center>

</div>

</html>

<%

set rs = nothing

conn.close

set conn = nothing

%>


上面是電腦上網(wǎng)安全的一些基礎常識,學習了安全知識,幾乎可以讓你免費電腦中毒的煩擾。




主站蜘蛛池模板: 日韩中文字幕在线免费观看 | 三级国产4国语三级在线 | 日本一区二区三区在线 视频观看免费 | 奇米第四色888 | 日本 720p| 中文字幕福利 | 亚洲综合色区中文字幕 | 天干天干天啪啪夜爽爽色 | 天天干夜夜夜操 | 天天干天天干天天天天天天爽 | 深夜福利视频导航 | 天天干天天操天天玩 | 日韩毛片大全 | 亚洲人成网站色7799在线播放 | 五月婷婷导航 | 伊人久久免费视频 | 欧美一区中文字幕 | 午夜在线日韩免费精品福利 | 天天干天天爽天天射 | 青青视频网站 | 屁屁影院免费观看入口 | 日日夜夜婷婷 | 四虎播放 | 日本一二三区在线视频 | 亚洲男人天堂 | 涩狠狠狠狠色 | 亚洲欧美日韩一区高清中文字幕 | 天天色影 | 亚洲综合图色40p | 一级做a爰片性色毛片思念网 | 亚洲欧美日韩一级特黄在线 | 在线免费亚洲 | 亚洲九色| 午夜啪啪福利视频 | 中文字幕亚洲一区婷婷 | 亚洲国产成人久久综合一 | 一个色综合网站 | 日韩黄色在线观看 | 午夜精品久久久久久影视riav | 日韩在线视频第一页 | 天天干天天射天天舔 |