欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

如何做一个随机密码产生器?

程序员文章站 2022-10-28 12:10:02
<%genpassword = ""randomizefor i = 1 to 8intnum = int...

<%
genpassword = ""
randomize
for i = 1 to 8
intnum = int(10 * rnd + 48)
intupper = int(26 * rnd + 65)
intlower = int(26 * rnd + 97)
intrand = int(3 * rnd + 1)
select case intrand
case 1
strpartpass = chr(intnum)
case 2
strpartpass = chr(intupper)
case 3
strpartpass = chr(intlower)
end select
genpassword = genpassword & strpartpass
next
response.write(genpassword & "<br>")
%>

'
显示浏览器表头信息和服务器变量
<%
for each name in request.servervariables
response.write("<b>"&name&"</b>:<br>")
response.write(request.servervariables(name))
next
%>

[1]