The realization of one-time login password

Statement: 1. Everyone is welcome to criticize and correct

           2. Test environment: windows 7 32-bit + Internet + 163 mailboxes + Tencent butler + NetEase mailbox client test passed

 

Step 1: Open the win7 telnet client in the control panel, as shown in Figure 1:

 

Step 2: Turn on the SMTP service of 163 mailboxes, as shown in Figure 2:

 

Step 3: Set up user account control settings, as shown in Figure 3:

 

Step 4: Download the base64 encoding tool, and encode the mailbox name and password with base64, for example, dGVzdEAxNjMuY29t means [email protected], MTIzNDU2Nzg5MA== means password 1234567890:

http://www.jb51.net/softs/40129.html

 

Step 6: Write batch processing + data dictionary and put it in the same directory:

 

1. Batch code (save as quick shutdown & reset password.bat):

@echo off
setlocal enabledelayedexpansion
set key=
for /L %%i in (1,1,11) do (
set /a num=!random!%%56+1
set idx=1
for /F %%j in (字典表.txt) do (
if !num! EQU !idx! (
set key=!key!%%j
)
set /a idx+=1
)
)
@echo 密码是:!key!
echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "open smtp.163.com 25{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 1200 >>telnet_tmp.vbs
echo sh.SendKeys "helo mypc{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "auth login{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "dGVzdEAxNjMuY29t{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "MTIzNDU2Nzg5MA=={ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "mail from:<[email protected]>{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "rcpt to:<[email protected]>{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "data{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 400 >>telnet_tmp.vbs
echo sh.SendKeys "subject:%date:~0,10% %time:~0,8%{ENTER}{ENTER}" >>telnet_tmp.vbs
echo sh.SendKeys "!key!{ENTER}" >>telnet_tmp.vbs
echo sh.SendKeys ".{ENTER}" >>telnet_tmp.vbs
start telnet
cscript //nologo telnet_tmp.vbs && del telnet_tmp.vbs & net user test !key! && shutdown /f /s /t 0

 

Note: The following values ​​in the code can be modified, the others remain unchanged
1.for /L %%i in (1,1,11) do (where 11 means 11-digit password

2.set /a num=!random!%%56+1 in 56 means that the dictionary table. There are 56 characters and numbers in the txt. In order to avoid recognition, numbers and characters such as 0, O, I, 1 are removed

3. echo sh.SendKeys "dGVzdEAxNjMuY29t{ENTER}" >>dGVzdEAxNjMuY29t in telnet_tmp.vbs represents the base64 encoding of [email protected]

4. echo sh.SendKeys "MTIzNDU2Nzg5MA=={ENTER}" >>MTIzNDU2Nzg5MA== in telnet_tmp.vbs represents the base64 code of the mailbox 1234567890 password, if the second verification is turned on, it is the verified password

5.echo sh.SendKeys "mail from:<[email protected]>{ENTER}" >>Change [email protected] in telnet_tmp.vbs to your own mailbox

6.echo sh.SendKeys "rcpt to:<[email protected]>{ENTER}" >>Change [email protected] in telnet_tmp.vbs to your own mailbox

7.cscript //nologo telnet_tmp.vbs && del telnet_tmp.vbs & net user test !key! && shutdown /f /s /t 0 in net user test !key! test is the system user name, test is the administrator user

 

2. Dictionary code (save as dictionary table.txt in the same directory as the batch)

A
B
C
D
E
F
G
H
J
K
L
M
N
P
Q
R
S
T
U
V
W
X
Y
Z
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
g
h
j
k
m
n
p
q
r
s
t
u
v
w
x
y
z

 

Step 7: Add to the whitelist in the security software, as shown in Figure 4:

 

Step 8: Install the mobile mail client to send and receive emails. I installed the NetEase mail client, but you can also install other

 

(End of full text)



Guess you like

Origin blog.csdn.net/humors221/article/details/74858478