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. 技术福利:mysql数据库的基本命令汇总整理

    一.创建数据库: create database database_name: php中创建数据库的两种方法:(mysql_create_db(),mysql_query()) $conn = mys ...

  2. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

    [2017-05-19 13:32:14,933] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) ...

  3. Day2-列表、字符串、字典、集合

    一.列表 定义列表:通过下标访问列表中的内容,从0开始 >>> name = ["zhang","wang","li",& ...

  4. hdu 1711---KMP

    题目链接 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...

  5. Fiddler中如何抓取app中https(443端口)数据

    Fiddler不但能截获各种浏览器发出的HTTP请求, 也可以截获手机发出的HTTP/HTTPS请求,总结下Fiddler截获IPhone和Android发出的HTTP/HTTPS包,前提条件是:安装 ...

  6. 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 ...

  7. glmnetUtils: quality of life enhancements for elastic net regression with glmnet

    The glmnetUtils package provides a collection of tools to streamline the process of fitting elastic ...

  8. 中文分词中的战斗机-jieba库

    英文分词的第三方库NLTK不错,中文分词工具也有很多(盘古分词.Yaha分词.Jieba分词等).但是从加载自定义字典.多线程.自动匹配新词等方面来看. 大jieba确实是中文分词中的战斗机. 请随意 ...

  9. sql备份(.mdf文件备份)

    第一步: 右键需要备份的数据库(这里以MyDB为例),选择“属性”. 第二步: 选择“文件”,复制路径 第三步: 打开文件所在目录,复制MyDB.mdf和MyDB_log.ldf 第四步: 把数据库停 ...

  10. NLTK学习笔记(一):语言处理和Python

    目录 [TOC] nltk资料下载 import nltk nltk.download() 其中,download() 参数默认是all,可以在脚本里面加上nltk.download(需要的资料库) ...