标题: [问题求助] VBS或则批处理自动登陆电影网站怎么写? [打印本页]
作者: xxwb808 时间: 2011-8-7 17:50 标题: VBS或则批处理自动登陆电影网站怎么写?
我想用VBS或则批处理运行记事本中的多个帐号和密码 来登陆电影网站 (电影网站是http://www.5151c.com/default.aspx 测试帐号xxwb01 密码是86115991ty285 还有N个帐号和密码 一直在论坛里逛 一直写起来的代码都不行
作者: broly 时间: 2011-8-7 20:43
记事本中的多个帐号和密码是什么格式的?比如:
username password
或者?
username
password
作者: xxwb808 时间: 2011-8-8 17:09
回复 3# broly
是这种格式的大哥
xxwb01 86115991ty285
xxwb1 86115991ty285
xxwb2 86115991ty285
作者: xxwb808 时间: 2011-8-8 17:17
我可以把电影网站的源文件 放出来
作者: xxwb808 时间: 2011-8-8 17:18
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鹿城影院</title>
<link href="style/index.css" rel="stylesheet" type="text/css" />
<script src="js/iepng.js" type="text/javascript"></script>
<script src="js/ChageMenu.js" type="text/javascript"></script>
<script src="js/ChangeSite.js" type="text/javascript"></script>
<script src="js/Special_js.js" type="text/javascript"></script>
<script src="js/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="js/jquery-1.6.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
var isIE = !!window.ActiveXObject;
var isIE6 = isIE && !window.XMLHttpRequest;
if (isIE6)
EvPNG.fix('div, ul, img, li, input,a,img,p');
function hide(id) {
document.getElementById(id).style.display = "none";
writeCookie(id, id,100000);
}
function showTip() {
$("div[id^='tip']").each(function () {
var id = $(this).attr("id");
var tipcookie = readCookie(id);
if (tipcookie == "") {
$("#" + id).show();
}
});
}
window.onload = function () { showTip(); }
</script>
</head>
<body>
<script type="text/javascript">
function closediv(i) {
document.getElementById(i).style.display = 'none';
}
function keyInput() {
}
</script>
<div id="hasIE_level2" style="background:#FFFFBB; text-align: center; padding:2px 0 3px; border-bottom:1px solid #ffd532; top:0; position:absolute; left:0; width:100%;"><div id="iewarning" style="width:19px; float:left;"><img align="absmiddle" src="images/2011news/warning.gif" border="0"></div><div id="closeimg" style="width:19px; float:right;"><a href="javascript:closediv('hasIE_level2');" title="关闭提示"><img src="images/2011news/close1.jpg" align="absmiddle" border="0"></a></div><div style=" margin-top:4px;marign-left:4px;font-size:12px;color:#092E20">本影院只限温州电信用户观看,谢谢合作</div></div>
<div class="warp960">
<div class="top_nav">
<div class="top_right">
<ul>
<li><a href="http://movie.5151c.com/User/GetPass.html">忘记密码</a></li>
<li><a href="http://movie.5151c.com/help/play.aspx">帮助中心</a></li>
<li><a href="http://movie.5151c.com/User/User.html">我要充值</a></li>
</ul>
</div>
<script src="js/checkuser.js" type="text/javascript"></script>
<script src="js/checkuser1.js" type="text/javascript"></script>
<div id="Head1_login_back" class="top_login">
<span class="c1"><strong>
xxwb01
</strong>欢迎您,</span> <span class="c2"><a href="UCIndex.aspx">
<img src="images/2011news/bt5.jpg" border="0" /></a></span> <span class="c2"><a style="cursor: hand" href="LoginOut.aspx">
<img src="images/2011news/bt6.jpg" border="0" /></a></span> <span class="c2">
<div class="move" id="my_movie" style="visibility: hidden" onmouseover="MM_showHideLayers('my_movie','','show')"
onmouseout="MM_showHideLayers('my_movie','','hide')">
<ul>
<li>暂无影片</li>
</ul>
</div>
<img src="images/2011news/bt8.jpg" border="0" style="cursor: hand" onmouseover="MM_showHideLayers('my_movie','','show')"
onmouseout="MM_showHideLayers('my_movie','','hide')" />
</span><span class="c2">
<div class="move" id="tj_movie" style="visibility: hidden" onmouseover="MM_showHideLayers('tj_movie','','show')"
onmouseout="MM_showHideLayers('tj_movie','','hide')">
<ul>
<li><a href="ClipDetails.aspx?TypeId=7&ClipId=13684"
title="蒙特卡罗">
蒙特卡罗</a></li>
作者: broly 时间: 2011-8-8 20:01
刚才写代码测试了,发现你给出的这个网站是自动保存登录状态一段时间的,也就是说,只能上一个帐号,多个帐号不能同时上- Const ForReading = 1
-
- Dim fso,f,objIE
- Dim strPath,username,password,ary,strLine,i
-
- '把下面的路径改为你的文本路径
- strPath = "C:\UsernamePassword.txt"
-
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set f = fso.OpenTextFile(strPath,ForReading,False)
-
- Set objIE = CreateObject("InternetExplorer.Application")
- objIE.Visible = True
- objIE.Navigate "http://www.5151c.com/default.aspx"
-
- While Not f.AtEndOfLine
- strLine = f.ReadLine
-
- If strLine <> "" Then
-
- ary = Split(strLine," ",-1)
-
- username = ary(0)
- For i = 1 To UBound(ary)
- If ary(i) <> " " Then
- password = ary(i)
- End If
- Next
-
- With objIE
- .Navigate "http://www.5151c.com/default.aspx" ,,"_blank"
-
- Do While .Busy Or .ReadyState <> 4
- WScript.Sleep 300
- Loop
-
- .Document.getElementById("Login").UserAccount.value = username
- .Document.getElementById("Login").Password.value = password
-
- WScript.Sleep 100
-
- .Document.getElementById("Login").submit()
- End With
-
- WScript.Sleep 300
-
- End if
- Wend
-
- f.Close
-
- Set fso = Nothing
- Set f = Nothing
- Set objIE = Nothing
复制代码
作者: xxwb808 时间: 2011-8-9 17:42
回复 6# broly
谢谢哦 大哥 我测试下
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |