标题: VBS自动填随机用户名 [打印本页]
作者: zinet 时间: 2008-10-20 16:25 标题: VBS自动填随机用户名
我用vbs命令打开一个www.xxxx.com网页,并自动按TAB键到了填用户名的文本框,如图
请问能用vbs命令随机生成10位英文+数字的用户名,并自动填入
密码为固定的密码:12345678 ,
我初写的代码如下:
set ws=createobject("wscript.shell")
ws.run "www.xxxxx.com"
Set WshShell=createobject("wscript.shell")
wscript.sleep 1000
WshShell.SendKeys"{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}"
..............................................................................................
自动填随机用户名请高人帮忙
..............................................................................................
WshShell.SendKeys"{TAB}"
WshShell.sendkeys "12345678"
请有心人把以上的代码加予完善,谢谢!!!!!!!
作者: rat 时间: 2008-10-20 16:38
不会是要恶意注册吧,呵呵~
- set ws=createobject("wscript.shell")
- ws.run "www.xxxxx.com"
- Set WshShell=createobject("wscript.shell")
- wscript.sleep 1000
- WshShell.SendKeys"{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}"
-
- WshShell.SendKeys GetRandomStr()
-
- WshShell.SendKeys"{TAB}"
- WshShell.sendkeys "12345678"
-
-
-
-
- Function GetRandomStr()
- Dim sList, iHigh, i, sResult
- sList = "0123456789abcdefghijklmnopqrstuvwxyz"
- Randomize
- iHigh = 10
- For i = 1 To iHigh
- sResult = sResult & Mid(sList, Int(36 * Rnd() + 1) , 1)
- Next
- GetRandomStr = sResult
- End Function
复制代码
[ 本帖最后由 rat 于 2008-10-20 16:46 编辑 ]
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |