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. springmvc缓存和mybatis缓存

    首先要有一个搭建好的ssm框架,笔者使用的是基于maven搭建的ssm框架. 加入springmvc缓存: 导入相关依赖包: <dependency> <groupId>org ...

  2. RecyclerView添加头部和底部视图的实现方法

    引用-- http://www.zhimengzhe.com/Androidkaifa/15072.html 在天下货crm----签到---签到记录中有使用

  3. 使用cmd来起一个服务器

    第一步:安装Node.js 下载地址:https://nodejs.org/en/ 第二步:打开cmd,输入node -v 确认是否安装成功,成功后显示版本号如下: 第三步:输入命令:ndoe ins ...

  4. javascript 面向对象基础 (1)

    常见的创建对象的方式有3种: ① 声明变量的方式 var obj1 = { key1: "val1", key1: "val2", show: function ...

  5. Servlet路径映射

    Serlvlet路径映射 当一个请求发送到servlet容器的时候,容器先会将请求的url减去当前应用上下文的路径作为servlet的映射url. 容器默认请求的是一个Servlet,所以不会直接根据 ...

  6. 《Android进阶》之第四篇 ViewPagerIndicator的使用

    1.先将这个开源框架下载到本地: Administrator@QH-20141231RFQJ /d/hixin $ cd ViewPagerIndicator/ Administrator@QH-20 ...

  7. 面试(1)-java-se-字符串

    http://blog.csdn.net/zhangerqing/article/details/8093919 hashCode和identityHashCode的区别 I. hashCode()方 ...

  8. spring-线程池(2)

    继承:http://www.cnblogs.com/crazylqy/p/4220743.html spring设置容器启动时运行线程类(可循环执行) 修改以下两文件, 1.spring设置容器启动时 ...

  9. 【2017-05-25】WebForm母版页

    母版页:可以把界面的部分代码进行重用 添加新项-母版页 在母版页中界面代码不要写在 <asp:ContentPlaceHolder ID="head" runat=" ...

  10. windows下Python 3.x图形图像处理库PIL的安装

    图像处理是一门应用非常广的技术,而拥有非常丰富第三方扩展库的 Python 当然不会错过这一门盛宴.PIL (Python Imaging Library)是 Python 中最常用的图像处理库,目前 ...