|
需要处理问题 :
1,登陆时会出现异常登陆那种验证码,不知道怎么处理
2,只能登陆1个账号,水平有限
先说下思路:程序运行时会读取配置文件里的用户和密码,然后登陆
我写成了2个脚本,
首先对密码加密,这是我在论坛里找到的脚本。。#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\Program Files (x86)\autoit3\Aut2Exe\Icons\lock.ico
#AutoIt3Wrapper_outfile=密码加密.exe
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
$sd = InputBox("密码加密", "请输入QQ密码进行加密", "", "*")
$jm=_jiami(1, $sd, '我的密码pass#$*_ (@',2) ;_jiami( 1加密 0解密 , 要加密字符, 密码 , 等级 ) 密码可以是任何字符(如中文或符号) 等级0-9
$qm=_jiami(0, $jm, '我的密码pass#$*_ (@',2)
$file = FileOpen(@DesktopDir & "\password.txt", 2)
FileWrite($file, "加密后的密码: " & $jm & @CRLF)
FileClose($file)
shellExecute (@DesktopDir & "\password.txt")
Func _jiami($jiami_lp, $jiami_txt,$jiami_pas,$jiami_lev)
Local $tlev,$bhb,$jjxc =1,$Num
Local $jh[100]
If $jiami_txt='' Or $jiami_pas='' Or StringLen ($jiami_pas) > 100 _
Or $jiami_lev > 9 Or Int($jiami_lev)<>$jiami_lev Or $jiami_lev < 0 Then Return -1
If $jiami_lp = 1 Then
$sosu=StringLen ($jiami_pas)
For $pa_s=1 To $sosu
$jh[$pa_s]=Asc(StringMid($jiami_pas,$pa_s,1))
$Num=$Num&$jh[$pa_s]
If $jjxc > 3 Then $jjxc=1
If $jjxc=1 Then
$bhb=Int($bhb+$jh[$pa_s])
ElseIf $jjxc=2 Then
$bhb=Int($bhb*$jh[$pa_s])
ElseIf $jjxc=3 Then
$bhb=Int($bhb-$jh[$pa_s])
EndIf
$jjxc +=1
Next
$Num=StringLeft($Num, $jiami_lev)&$bhb&StringRight($Num, $jiami_lev)
$jiami_txt=StringTrimLeft(StringToBinary($jiami_txt,2),2)
$y_si=$sosu
$j_si=1
Do
$vi=StringMid($jh[$j_si],1,1)+StringMid($jh[$y_si],StringLen ($jh[$y_si]),1)
$tempa=StringMid($jiami_txt,1,$vi-1)
$tempb=StringMid($jiami_txt,$vi)
$jiami_txt=$tempa&$jh[$j_si]&$tempb
$y_si -=1
$j_si +=1
Until $y_si <= 0 And $j_si >= $sosu
$st=StringLen ($Num)
$txtshi=StringLen ($jiami_txt)
For $kl=1 To $st
$rtemp=''
For $vn=1 To $txtshi Step StringMid($Num,$kl,1)+30
$rtemp = StringMid($jiami_txt,$vn,StringMid($Num,$kl,1)+30)&$rtemp
Next
$jiami_txt=$rtemp
Next
Return $jiami_txt
ElseIf $jiami_lp = 0 Then
$sosu=StringLen ($jiami_pas)
For $pa_s=1 To $sosu
$jh[$pa_s]=Asc(StringMid($jiami_pas,$pa_s,1))
$Num=$Num&$jh[$pa_s]
If $jjxc > 3 Then $jjxc=1
If $jjxc=1 Then
$bhb=Int($bhb+$jh[$pa_s])
ElseIf $jjxc=2 Then
$bhb=Int($bhb*$jh[$pa_s])
ElseIf $jjxc=3 Then
$bhb=Int($bhb-$jh[$pa_s])
EndIf
$jjxc +=1
Next
$Num=StringLeft($Num, $jiami_lev)&$bhb&StringRight($Num, $jiami_lev)
$st=StringLen ($Num)
Do
$txtshi=StringLen ($jiami_txt)
$rtemp=''
Do
$rtemp =$rtemp&StringRight ($jiami_txt, StringMid($Num,$st,1)+30)
$jiami_txt=StringTrimRight ($jiami_txt, StringMid($Num,$st,1)+30)
$txtshi -= StringMid($Num,$st,1)+30
Until $txtshi <= 0
$jiami_txt=$rtemp
$st -=1
Until $st <= 0
$y_si=$sosu
$j_si=1
Do
$vi=StringMid($jh[$y_si],1,1)+StringMid($jh[$j_si],StringLen ($jh[$j_si]),1)
$tempa=StringMid($jiami_txt,1,$vi-1)
$tempb=StringMid($jiami_txt,$vi+StringLen ($jh[$y_si]))
$jiami_txt=$tempa&$tempb
$y_si -=1
$j_si +=1
Until $y_si <= 0
$jiami_txt='0x'&$jiami_txt
$jiami_txt = BinaryToString($jiami_txt,2)
Return $jiami_txt
Else
Return -1
EndIf
EndFunc
然后将加密后的密码复制到配置文件中,这个暂时未添加,我是手动复制的~~~
然后运行登陆脚本,先读取配置文件信息,对密码解密#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\..\Program Files (x86)\autoit3\Aut2Exe\Icons\apple.ico
#AutoIt3Wrapper_outfile=QQ自动登录.exe
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
;QQ AutoLogin
;By : Blue Chen
;Time : 2012/04/21
Dim $ver = "QQ2010"
#comments-start
;Check QQ Process
If ProcessExists ("qq.exe") Then
ProcessClose ("qq.exe")
EndIf
#comments-end
$name = iniread(@ScriptDir & "\user.ini","QQ1","use1","")
$pw = _password()
;QQ AutoLogin
Run ("C:\Program Files (x86)\Tencent\QQ\Bin\QQ.exe")
WinWait($ver)
$hSound=WinGetHandle($ver)
WinActivate($hSound)
WinWaitActive($hSound)
Sleep (500)
ControlSend($ver, "", "[CLASS:ATL:30A561F0; INSTANCE:1]", $name)
Sleep (500)
ControlSend($ver, "", "[CLASS:Edit; INSTANCE:1]", $pw)
Sleep (500)
Send("{Enter}")
;解密
Func _password()
$sd = iniread(@ScriptDir & "\user.ini","QQ1","pw1","")
$qm=_jiami(0, $sd, '我的密码pass#$*_ (@',2)
$jm=_jiami(1, $qm, '我的密码pass#$*_ (@',2) ;_jiami( 1加密 0解密 , 要加密字符, 密码 , 等级 ) 密码可以是任何字符(如中文或符号) 等级0-9
Return $qm
EndFunc
Func _jiami($jiami_lp, $jiami_txt,$jiami_pas,$jiami_lev)
Local $tlev,$bhb,$jjxc =1,$Num
Local $jh[100]
If $jiami_txt='' Or $jiami_pas='' Or StringLen ($jiami_pas) > 100 _
Or $jiami_lev > 9 Or Int($jiami_lev)<>$jiami_lev Or $jiami_lev < 0 Then Return -1
If $jiami_lp = 1 Then
$sosu=StringLen ($jiami_pas)
For $pa_s=1 To $sosu
$jh[$pa_s]=Asc(StringMid($jiami_pas,$pa_s,1))
$Num=$Num&$jh[$pa_s]
If $jjxc > 3 Then $jjxc=1
If $jjxc=1 Then
$bhb=Int($bhb+$jh[$pa_s])
ElseIf $jjxc=2 Then
$bhb=Int($bhb*$jh[$pa_s])
ElseIf $jjxc=3 Then
$bhb=Int($bhb-$jh[$pa_s])
EndIf
$jjxc +=1
Next
$Num=StringLeft($Num, $jiami_lev)&$bhb&StringRight($Num, $jiami_lev)
$jiami_txt=StringTrimLeft(StringToBinary($jiami_txt,2),2)
$y_si=$sosu
$j_si=1
Do
$vi=StringMid($jh[$j_si],1,1)+StringMid($jh[$y_si],StringLen ($jh[$y_si]),1)
$tempa=StringMid($jiami_txt,1,$vi-1)
$tempb=StringMid($jiami_txt,$vi)
$jiami_txt=$tempa&$jh[$j_si]&$tempb
$y_si -=1
$j_si +=1
Until $y_si <= 0 And $j_si >= $sosu
$st=StringLen ($Num)
$txtshi=StringLen ($jiami_txt)
For $kl=1 To $st
$rtemp=''
For $vn=1 To $txtshi Step StringMid($Num,$kl,1)+30
$rtemp = StringMid($jiami_txt,$vn,StringMid($Num,$kl,1)+30)&$rtemp
Next
$jiami_txt=$rtemp
Next
Return $jiami_txt
ElseIf $jiami_lp = 0 Then
$sosu=StringLen ($jiami_pas)
For $pa_s=1 To $sosu
$jh[$pa_s]=Asc(StringMid($jiami_pas,$pa_s,1))
$Num=$Num&$jh[$pa_s]
If $jjxc > 3 Then $jjxc=1
If $jjxc=1 Then
$bhb=Int($bhb+$jh[$pa_s])
ElseIf $jjxc=2 Then
$bhb=Int($bhb*$jh[$pa_s])
ElseIf $jjxc=3 Then
$bhb=Int($bhb-$jh[$pa_s])
EndIf
$jjxc +=1
Next
$Num=StringLeft($Num, $jiami_lev)&$bhb&StringRight($Num, $jiami_lev)
$st=StringLen ($Num)
Do
$txtshi=StringLen ($jiami_txt)
$rtemp=''
Do
$rtemp =$rtemp&StringRight ($jiami_txt, StringMid($Num,$st,1)+30)
$jiami_txt=StringTrimRight ($jiami_txt, StringMid($Num,$st,1)+30)
$txtshi -= StringMid($Num,$st,1)+30
Until $txtshi <= 0
$jiami_txt=$rtemp
$st -=1
Until $st <= 0
$y_si=$sosu
$j_si=1
Do
$vi=StringMid($jh[$y_si],1,1)+StringMid($jh[$j_si],StringLen ($jh[$j_si]),1)
$tempa=StringMid($jiami_txt,1,$vi-1)
$tempb=StringMid($jiami_txt,$vi+StringLen ($jh[$y_si]))
$jiami_txt=$tempa&$tempb
$y_si -=1
$j_si +=1
Until $y_si <= 0
$jiami_txt='0x'&$jiami_txt
$jiami_txt = BinaryToString($jiami_txt,2)
Return $jiami_txt
Else
Return -1
EndIf
EndFunc
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|