Board logo

标题: 用P处理,如何自动登录论坛 [打印本页]

作者: dslz666     时间: 2008-2-20 19:58    标题: 用P处理,如何自动登录论坛

如果。,我想用批处理自动登录论坛
http://www.cn-dos.net      http://www.emb666.com

用户:都市浪子666
密码:XXX
该如何写呀。请大侠们帮帮忙
作者: huahua0919     时间: 2008-2-20 20:42

set Shell=CreateObject("Wscript.Shell")
set WshShell = WScript.CreateObject("WScript.Shell")
Shell.run "www.cn-dos.net/forum"
WshShell.sendkeys "{tab}"
Wscript.sleep 5000
WshShell.sendkeys "{tab}"
Wscript.sleep 2000
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{enter}"
Wscript.sleep 5000
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "都市浪子666"
Wscript.sleep 200
WshShell.sendkeys "{tab}"
Wscript.sleep 200
WshShell.sendkeys "XXX"
Wscript.sleep 200
WshShell.sendkeys "{enter}"

作者: dslz666     时间: 2008-2-21 01:41
huahua0919 你好
我照你上面的代码复制保存为VBS,

但是有一个问题,如果用户是中文字,那在网页里输入的就是乱码了
如果是英文和数字,那就能正确地输入




作者: HAT     时间: 2008-2-21 06:27
多搜索一下嘛,呵呵。
@echo off
::::::::CN-DOS BBS Login {s11ss 2007-10-13}::::::::
setlocal enabledelayedexpansion
if "%1" equ "" (
        echo 参数一:用户名,如user
        echo 参数二:密码,如123456
        echo 参数三:是否将当前文件夹下生成的文件cn-dos.hta移到收藏夹/m(移)或/f(不移)
        echo 例如:%0 user 123456 /m
        pause>nul
        goto :eof
)
set u=%1
set p=%2
set a=%3
< "%~f0" more +44 >cn-dos.hta
set t=^>^>t.vbs echo
call :e %u%
set user=de^(array^(!encoded!^)^)
call :e %p%
set pwd=de^(array^(!encoded!^)^)
del t.t
set t=^>^>cn-dos.hta echo
%t% location="http://www.cn-dos.net/forum/logging.php?action=login"+"&"+"cookietime=0"+"&"+"username="+%user%+"&"+"password="+%pwd%+"&"+"loginsubmit=."
%t% close()
%t% ^</script^>
%t% ^<hta:application
%t% showInTaskBar=no
%t% /^>
if not "%a%" equ "/m" goto :eof
move cn-dos.hta "%userprofile%"\Favorites
goto :eof
:e
%t% for i=1 to len("%1")
%t%         one=mid("%1",i,1)
%t%         if i=1 then
%t%                        encoded=asc(one)+100*5+20
%t%         else
%t%                        encoded=encoded^&chr(44)^&(asc(one)+100*5+20)
%t%                end if
%t% next
%t% CreateObject("Scripting.FileSystemObject").CreateTextFile("t.t").write(encoded)
cscript //nologo t.vbs & del t.vbs
set/p encoded=<t.t
goto :eof
<script language="javascript">
window.moveTo(screen.width,screen.height);
</script>
<script language="vbscript">
function de(x)
        decoded=x
        for i=0 to ubound(decoded)
                s=s&chr(decoded(i)-100*5-20)
        next
        de=s
end function

作者: abcd     时间: 2008-2-21 10:06
简单问题复杂化了


请参考批处理自动登陆邮箱
作者: dslz666     时间: 2008-2-21 14:32
4楼的,看不懂,偶太菜了,
我去找下处理自动登陆邮箱 的贴子
作者: ngd     时间: 2008-3-7 17:49
分析一下登陆界面http://www.cn-dos.net/forum/logging.php?action=login
查看一下源码 从验证表单中得出 分析构造URL

  Quote:
用户:都市浪子666
密码:XXX
该如何写呀。请大侠们帮帮忙


http://www.cn-dos.net/forum/logging.php?action=login&cookietime=0&username=都市浪子666&password=XXX&loginsubmit=.

作者: dslz666     时间: 2008-3-8 11:37
哦,谢谢。我去试试