假设有一个文件ybx.txt有以下内容:
ffff_zhang@126.com***990403****
wll781103@163.com***wll781103****
wll781103@126.com***wll781103****
.................
批处理文件1(163.bat):
@echo on
setlocal enabledelayedexpansion
set Username=%1 set Password=%2
start
http://reg.163.com/in.jsp?url=http://fm163.163.com/coremail/fcg/ntesdoor2?verifycookie=1^&language=-1^&style=-1^&username=!Username!^&password=!Password!
批处理文件2(126.bat):
@echo off
set mail=126
::设置用户
set user=%1
:设置密码
set pass=%2
::126邮箱登录URL
set "126=https://entry.mail.126.com/cgi/login?&bCookie=&user=%user%&pass=%pass%"
::登录
cmd /c start "" "%%%mail%%%"
再建立一个批处理文件3(智能邮箱登陆器.bat)
@echo off
setlocal enabledelayedexpansion
for /f "tokens=1,2,3 delims==@,*" %%i in ('findstr @ ybx.txt') do (
if %%j==163.com (call 163.bat %%i %%k)
if %%j==126.com (call 126.bat %%i %%k)
if %%j==yeah.com (call yeah.bat %%i %%k)
if %%j==yahoo.com.cn (call yahoo.bat %%i %%k)
pause
)
pause
----经过试验已经成功登陆知道用户名和密码的邮箱.
执行智能邮箱登陆器.bat,读取用户名和密码作为参数,并且判断邮箱类型,调用相应的批处理文件126.bat或163.bat,并把参数传递给他们.
yahoo.bat 和yeah.bat同样可以加进去.
126.bat或163.bat我是完全借鉴别人的,只是使用了参数而已.
ybx.txt的内容是我虚构的,你应改为你知道的就可以.也有好的方法建立,假如你有大量用户名和密码的话.
Last edited by ybxcyx on 2007-12-26 at 08:07 AM ]