set WshShell=WScript.CreateObject("WScript.Shell")
Const user = "hugetech2"
Const pwd = "huge204204"
Const pid = ""
Const mobilePwd = "basketball123"
Dim userToken
Dim mobile
Dim identify
identify = ""
'登陆api网站,获取用户token
function getUserToken()
Dim ie2
Set ie2 = CreateObject("InternetExplorer.Application")
ie2.navigate "http://api.jmyzm.com/http.do?action=loginIn&uid="&user&"&pwd="&pwd
Wscript.sleep
userReturn = ie2.document.getElementsByTagName("body")().innerHTML
userReturnArray = split(userReturn, "|")
userToken = userReturnArray()
'msgbox userToken
end function '获取手机号
function getMobile()
Dim ie3
Set ie3 = CreateObject("InternetExplorer.Application")
ie3.navigate "http://api.jmyzm.com/http.do?action=getMobilenum&pid="&pid&"&uid="&user&"&token="&userToken
Wscript.sleep
mobileReturn = ie3.document.getElementsByTagName("body")().innerHTML
mobileReturnArray = split(mobileReturn, "|")
mobile = mobileReturnArray()
'msgbox mobile
end function '获取验证码
function getIdentify()
Dim ie4,flag
Set ie4 = CreateObject("InternetExplorer.Application")
ie4.navigate "http://api.jmyzm.com/http.do?action=getVcodeAndReleaseMobile&uid="&user&"&token="&userToken&"&mobile="&mobile
Wscript.sleep
identifyReturn = ie4.document.getElementsByTagName("body")().innerHTML
identifyReturnArray = split(identifyReturn, "|")
flag =
do while flag<
if identifyReturnArray() = mobile Then
identifyAll = identifyReturnArray()
if Mid(identifyAll,,) = "验证码" Then
identify = Mid(identifyAll,,)
else
identify = Mid(identifyAll,,)
end if
exit do
Else
Wscript.sleep
Dim ieTemp
Set ieTemp = CreateObject("InternetExplorer.Application")
ieTemp.navigate "http://api.jmyzm.com/http.do?action=getVcodeAndReleaseMobile&uid="&user&"&token="&userToken&"&mobile="&mobile
Wscript.sleep
identifyReturn =ieTemp.document.getElementsByTagName("body")().innerHTML
identifyReturnArray = split(identifyReturn, "|")
End if
flag = flag+
loop
end function '注册账号第一步:登陆直播间,进入注册界面
function register1()
Dim ie_1
Set ie_1 = CreateObject("InternetExplorer.Application")
ie_1.visible=true
ie_1.navigate "http://m.yy.com/room/14495179/?f=6308"
Wscript.sleep
ie_1.document.getElementById("navRegister").Click
Wscript.sleep
ie_1.document.getElementById("yyRegister").Click
Wscript.sleep
end function '注册账号第二步:填写注册信息,发送短信
function register2()
Dim ie_2
Set ie_2 = CreateObject("InternetExplorer.Application")
ie_2.visible=true
ie_2.navigate "https://aq.yy.com/p/reg/mobile.do?appid=5623&action=2&busiurl=http%3A%2F%2Fm.yy.com%2F%3Ff%3D6308%26cpuid%3D0%26dhz%3D1&fromadv=myy_6308.cpuid_0.channel_14495179&reqDomainList="
Wscript.sleep
ie_2.document.getElementsByTagName("a")().Click
for i= to
Wscript.sleep
WshShell.SendKeys "{Tab}"
next
WshShell.SendKeys mobile
WshShell.SendKeys "{Tab}"
Wscript.sleep
WshShell.SendKeys mobilePwd
WshShell.SendKeys "{Tab}"
Wscript.sleep
WshShell.SendKeys mobilePwd
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Enter}"
Wscript.sleep
getIdentify()
Wscript.sleep
WshShell.SendKeys "^4"
WshShell.SendKeys "{Tab}"
Wscript.sleep
if identify <> "" Then
WshShell.SendKeys identify
Wscript.sleep
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Enter}"
Else
MsgBox "fail to get identify"
End if
end function '关闭浏览器,并且再次启动
function closeWeb()
Set ws = CreateObject("Wscript.Shell")
ws.run "taskkill /f /im 360se.exe",vbhide
Wscript.sleep
ws.run "C:\Users\HugeTech7\Desktop\mytest.vbs"
End Function '开始执行
for i= to
getUserToken
Wscript.sleep
getMobile
Wscript.sleep
register1
register2
msgbox "账号注册成功,账号是:"&mobile&"密码是:"&mobilePwd
Wscript.sleep
closeWeb
next

怎么用VBS脚本自动注册yy娱乐的账号的更多相关文章

  1. BATCH+VBS脚本自动执行命令

    打开cmd,然后执行run.bat s 1就会执行tmpsw.vbs的内容,1是作为id传进去的参数. run.bat: @echo off set type=%1 set id=%2 :打开一个te ...

  2. SecureCRT中使用VBs脚本自动telnet登陆

    查看SecureCRT帮助文档: Help-> Help Topics->Scripting -> Script Objects Reference -> Session Ob ...

  3. Vbs脚本经典教材(转)

    Vbs脚本经典教材(最全的资料还是MSDN) —为什么要使用Vbs? 在Windows中,学习计算机操作也许很简单,但是很多计算机工作是重复性劳动,例如你每周也许需要对一些计算机文件进行复制.粘贴.改 ...

  4. Vbs 脚本编程简明教程之一

    —为什么要使用 Vbs ? 在 Windows 中,学习计算机操作也许很简单,但是很多计算机工作是重复性劳动,例如你每周也许需要对一些计算机文件进行复制.粘贴.改名.删除,也许你每天启动 计算机第一件 ...

  5. Vbs脚本经典教材

    转载:http://www.cnblogs.com/BeyondTechnology/archive/2011/01/10/1932440.html Vbs脚本经典教材(最全的资料还是MSDN) —为 ...

  6. vbs脚本

    巧用Vbs SendKeys 可以做的事 发布: 2014-04-06 10:00:20 | 作者: | 来源: 按键精灵资源站 巧妙使用VBS中的SendKeys命令(这个命令的作用就是模拟键盘操作 ...

  7. 【转】第6篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+自动反射方法分析

    作者: 牛A与牛C之间 时间: 2013-11-21 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第6篇:Xilium CefGlue 关于 CLR Object 与 JS ...

  8. 【转】第5篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+委托回调方法分析

    作者: 牛A与牛C之间 时间: 2013-11-19 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第5篇:Xilium CefGlue 关于 CLR Object 与 JS ...

  9. 自动删除超过30天文件的vbs脚本【转发】

    利用代码制作自动删除超过30天的文件及文件夹的vbs脚本,定期清理文件夹中长时间无用文件. 1.首先在新建一个文本文档,粘贴代码(代码可通过添加微信公众号vbs_edit(VBS脚本之家)回复018获 ...

随机推荐

  1. ng-checked选择和点击增加dom

      1.需求 在添加页面实现一个checkbox的选择,然后在详情页面展示时,会自动选上之前被选中的. 2.添加页面 看官最好将这个代码复制过去看看效果. <!DOCTYPE html>& ...

  2. python django 实现验证码的功能

    我也是刚学Python  Django不久很多都不懂,所以我现在想一边学习一边记录下来然后大家一起讨论! 验证码功能一开始我在网上找了很多的demo但是我在模仿他们写的时候,发现在我的版本上根本就不能 ...

  3. C#总结(三)DataGridView增加全选列

    最近的一个winform的项目中,碰到datagridview控件的第一列添加全选的功能,通常这个功能,有两种实现方式:1. 为控件添加DataGridViewCheckBoxColumn来实现,但是 ...

  4. 使用Android studio作按键切换界面

    一.新建工程 二.新建一个按键             android:layout_width="wrap_content"         android:layout_hei ...

  5. struts2.1.6教程十二、总结

    本教程对struts2的基本知识进行了一些说明,关于struts2的更多详细内容应参看struts2的官方文档及提供的app实例. 下面对struts2的基本执行流程作一简要说明,此流程说明可以结合官 ...

  6. PHP编码规范建议学习

    ###php编码规范 -------* sql过长 ```$sql = <<<SQLSELECT delivery_idFROM d_testWHERE delivery_idIN ...

  7. An Introduction to Stock Market Data Analysis with R (Part 1)

    Around September of 2016 I wrote two articles on using Python for accessing, visualizing, and evalua ...

  8. js继承之借用构造函数继承

    我的上一篇文章介绍了,原型链继承模式.但是单纯的原型链模式并不能很好地实现继承. 一.原型链的缺点 1.1 单纯的原型链继承最大的一个缺点,来自于原型中包含引用类型的值. 本来,我们没有通过原型链实现 ...

  9. grant all赋权后mysql.user表权限字段还是N,但能登录和新建表

    grant all赋权后mysql.user表权限字段还是N,但能登录和新建表 grant all privileges on linuxeye.* to linuxeye@'localhost' i ...

  10. 常见类——Object

    1.在Java类继承结构中Java.lang.Object类位于顶端   2.如果定义一个Object类没有使用extends关键字声明其父类,则其父类为Java.lang.Object类   3.O ...