代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
VBS
】
VBScript实现密码生成器
作者:
欧阳隐风
/ 发布于
2012/6/25
/
1584
<div><!--filename : password generator -2.hta--> <!--Date : 2012/6/20--> <!--author : moose--> <html> <head> <title>Password Generator</title> <HTA:APPLICATION APPLICATIONNAME="Password Generator" ID="PasswordGenerator" VERSION="1.0"/> </head></div> <div><script language="VBScript"> '检查用户输入信息是否合法 Sub checkInfo On Error Resume Next '判断长度和个数是否为空 If pwNumber.value = "" Or pwLength.value="" Then errorinfo.innerHTML = "Number and Length must be typed !" Else '判断是否为数字,如果不是,则会出错 pn = CInt(pwNumber.value) pw = CInt(pwLength.value) End If</div> <div> sum = "" '数字 If number.Checked Then sum = sum & "1" Else sum = sum & "0" End If '小写字母 If lletter.Checked Then sum = sum & "1" Else sum = sum & "0" End If '大写字母 If uletter.Checked Then sum = sum & "1" Else sum = sum & "0" End If '特殊字符 If specials.Checked Then sum = sum & "1" Else sum = sum & "0" End If</div> <div>'如果没有选择,则提示没有输入 If sum = "0000" Then errorinfo.innerHTML = "No Input !" End If</div> <div>'长度和个数必须是数字 If Err.Number <> 0 Then errorinfo.innerHTML = "Must be numeric !" Else generatorPW sum,pwNumber.value,pwLength.value End If End Sub</div> <div> Sub generatorPW(plusNum,totalNum,plength) On Error Resume Next</div> <div>tempArray= Array("0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","1","3","5","7","8","9",_ "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",_ "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",_ "~","!","@","#","$","%","^","&","*","(",")","_","+","-","=","<",">",".","/","?","'",":","[","]","{","}")</div> <div>Dim codeArray(25,3) For i=0 To 3 For j=0 To 25 codeArray(j,i) = tempArray(i*26+j) Next Next</div> <div>pwstr = "" For i=1 To totalNum Randomize() For j=1 To plength row = CInt((Rnd*4)+1) If Mid(plusNum,row,1) = "1" Then col = CInt((Rnd*26)+1) Else row = InStr(plusNum,"1") col = CInt((Rnd*26)+1) End If pwstr = pwstr & codeArray(col-1,row-1) Next pwstr = pwstr & "" Next pwText.innerHTML = pwstr End Sub</div> <div></script></div> <div><body bgcolor="white"> <fieldset> <legend>Password Generator</legend><br/> Number: <input type="text" name="pwNumber" value="1" /><br/> Length: <input type="text" name="pwLength" value="8" /><br/> <br/> <input type="checkbox" name="number" value="1" />Number <input type="checkbox" name="lletter" value="2" />Lower Letter <input type="checkbox" name="uletter" value="4" />Upper Letter <input type="checkbox" name="specials" value="8" />Specials<br/> <input type="button" name="ok_btn" value="Generator" onclick="checkInfo" /> <br/><br/> </fieldset> <br/> <span id="pwText" style="font-size:2em"></span> <span id="errorinfo" style="color:red"></span> </body> </html></div>
试试其它关键字
密码生成器
同语言下
.
使用脚本将域账号添加到客户机的本地管理员组
.
删除服务器上文件
.
主动ping服务器是否宕机
.
自动 服务器检查 的vbs脚本
.
VBS脚本发送邮件,密送多人,带附件,可更换账号密码
.
根据文件路径复制文件
.
VBA操作数据库
.
双击获取公网IP到剪贴板
.
定时运行ie浏览执行网址不显示浏览器窗口
.
批处理生成日历
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
欧阳隐风
贡献的其它代码
(
1
)
.
VBScript实现密码生成器
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3