Aide Source Remember Login

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

PropreShow

Membre Banni
Aug 27, 2014
54
0
71
In your mind
Hey!

Voici un code source destiné a retenir votre nom de compte et vôtre mot de passe,si par flemme vous voulez plus le taper ou,si vous savez coder en autoit ou autre mettre une connexion automatique.
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIListBox.au3>

#include <GUIConstants.au3>


Local $aLinks[1], $iInd, $aLinks[2]

$sHtml = FileRead('C:\s4.ini')
$log = 'C:\s4.ini'


$hGUI = GUICreate("Form1", 187, 197, 192, 124)
$Input1 = GUICtrlCreateInput("", 8, 80, 121, 21)
$Label1 = GUICtrlCreateLabel("Login", 136, 80, 30, 17)
$Input2 = GUICtrlCreateInput("", 8, 112, 121, 21)
$Label2 = GUICtrlCreateLabel("Password", 136, 112, 50, 17)
__SetPasswordChar($hGUI,GUICtrlGetHandle($Input2),-1,9679)
$Input3 = GUICtrlCreateInput("", 8, 48, 121, 21)
$Label3 = GUICtrlCreateLabel("Inform", 136, 48, 33, 17)
$Checkbox1 = GUICtrlCreateCheckbox("Password", 8, 144, 97, 17)
$iCombo = GUICtrlCreateCombo("", 8, 8, 145, 25)
$Add = GUICtrlCreateButton("ADD",8, 168, 75, 25)


$vTmp = StringRegExp($sHtml, '<div class=><h1><a href=(.*?)>(.*?)</a>(.*?)</h1>', 3)
ReDim $aLinks[UBound($vTmp) / 3][3]
For $i = 0 To UBound($vTmp) - 1 Step 3
$aLinks[$iInd][0] = $vTmp[$i]
$aLinks[$iInd][1] = $vTmp[$i + 1]
$aLinks[$iInd][2] = $vTmp[$i + 2]
GUICtrlSetData($iCombo, $aLinks[$iInd][1], $aLinks[$iInd][1])
$iInd += 1
Next
$vTmp = UBound($aLinks) - 1
$iInd = 0

GUISetState(@SW_SHOW, $hGUI)
#EndRegion ### END Koda GUI section ###

While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Checkbox1
If BitAND(GUICtrlRead($Checkbox1),$gui_checked)=$gui_checked Then
__SetPasswordChar($hGUI,GUICtrlGetHandle($Input2),-1,0)
ElseIf BitAND(GUICtrlRead($Checkbox1),$gui_unchecked)=$gui_unchecked Then
__SetPasswordChar($hGUI,GUICtrlGetHandle($Input2),-1,9679)
EndIf
Case $iCombo
$iInd = GUICtrlSendMsg($iCombo, $CB_GETCURSEL, 0, 0)
Switch $iInd
Case 0 To $vTmp
$Login = $aLinks[$iInd][1]
$Pass = $aLinks[$iInd][0]
GUICtrlSetData($Input1, $aLinks[$iInd][1])
GUICtrlSetData($Input2, $aLinks[$iInd][0])
GUICtrlSetData($Input3, $aLinks[$iInd][2])
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(0x4,"S4 Client"," Run S4 Client?" & @CRLF)
Select
Case $iMsgBoxAnswer = 6;Yes
start()
Case $iMsgBoxAnswer = 7;No
EndSelect
Case Else
MsgBox(16, 'Error', 'Error')
EndSwitch
Case $Add
add()
EndSwitch
WEnd

Func add()
$hForm2 = GUICreate("Form2", 220, 135, -1, -1)
$nLogin2 = GUICtrlCreateInput("Login", 10, 10)
$nPass2 = GUICtrlCreateInput("Pass", 10, 40,0,0, $ES_PASSWORD)
$nInfo = GUICtrlCreateInput("Inform", 10, 70)
$nAdd = GUICtrlCreateButton("Add", 10, 100, 200, 25)
GUISetState()
While 1
Switch GUIGetMsg()
Case $nAdd
FileWrite($log,@CRLF & "<div class=><h1><a href=" & GUICtrlRead($nPass2) & ">" & GUICtrlRead($nLogin2) & "</a>" & GUICtrlRead($nInfo) & "</h1>")
$sHtml = FileRead('C:\s4.ini')
$vTmp = StringRegExp($sHtml, '<div class=><h1><a href=(.*?)>(.*?)</a>(.*?)</h1>', 3)
ReDim $aLinks[UBound($vTmp) / 3][3]
For $i = 0 To UBound($vTmp) - 1 Step 3
$aLinks[$iInd][0] = $vTmp[$i]
$aLinks[$iInd][1] = $vTmp[$i + 1]
$aLinks[$iInd][2] = $vTmp[$i + 2]
GUICtrlSetData($iCombo, $aLinks[$iInd][1], $aLinks[$iInd][1])
$iInd += 1
Next
$vTmp = UBound($aLinks) - 1
$iInd = 0
Case -3
ExitLoop
EndSwitch
WEnd
GUIDelete($hForm2)
EndFunc

Func start()
$oIE = _IECreate ("https://www.aeriagames.com/dialog/oauth?response_type=code&client_id=a354ab1d0894ba2ecaac12bf5ad86fd905373a07f&state=36424314&redirect_uri=https://www.aeriagames.com/content_only_launcher&theme=api_ignite")

$oForm = _IEFormGetCollection($oIE,0)
$oLogin = _IEFormElementGetObjByName($oForm,"edit[id]")
$oPass = _IEFormElementGetObjByName($oForm,"edit[pass]")
_IEFormElementSetValue($oLogin,$Login)
_IEFormElementSetValue($oPass,$Pass)
_IEFormSubmit($oForm)

$sUrl = _IEPropertyGet( $oIE, "locationurl" )
$str=StringRegExpReplace($sUrl,'.*code=','\1')
run("S4Client.exe -rc:eu -lac:ger -auth_server_ip:83.220.134.84 -aeria_acc_code:" & $str)

ProcessClose("iexplore.exe")
EndFunc

Func __SetPasswordChar($hWnd,$hCtrl,$iToggleState,$sPassChar)
If Not IsHWnd($hWnd) Then
$hWnd = WinGetHandle($hWnd)
EndIf
If Not IsHWnd($hCtrl) Then
$hCtrl = ControlGetHandle($hWnd, "", $hCtrl)
EndIf
Local Const $EM_SETPASSWORDCHAR = 0xCC
Local Const $EM_GETPASSWORDCHAR = 0xD2
Local $iGet_Pass_Char, $iSet_Pass_Char, $iDef_Pass_Char = 9679
Local $aRet = DllCall("user32.dll", "long", "SendMessageW", "hwnd", $hCtrl, "int", $EM_GETPASSWORDCHAR, "int", 0, "int", 0)
If Not @error And $aRet[0] Then
$iGet_Pass_Char = $aRet[0]
EndIf
If $sPassChar = -1 Then
$iSet_Pass_Char = $iGet_Pass_Char
Else
If StringLen($sPassChar) = 1 And IsString($sPassChar) Then
$iSet_Pass_Char = Asc($sPassChar)
Else
$iSet_Pass_Char = Number($sPassChar)
EndIf
$iDef_Pass_Char = $iSet_Pass_Char
EndIf
If $iToggleState = -1 Then
If $iGet_Pass_Char <> 0 Then
$iSet_Pass_Char = 0
Else
$iSet_Pass_Char = $iDef_Pass_Char
EndIf
ElseIf $iToggleState = 0 Then
$iSet_Pass_Char = 0
ElseIf $iToggleState = 1 Then
$iSet_Pass_Char = $iDef_Pass_Char
EndIf
DllCall("user32.dll", "none", "SendMessageW", "hwnd", $hCtrl, "int", $EM_SETPASSWORDCHAR, "int", $iSet_Pass_Char, "int", 0)
DllCall("user32.dll", "none", "InvalidateRect", "hwnd", $hCtrl, "ptr", 0, "int", 1)
EndFunc

Edit : Voilà autoit -V3 setup.exe pour Windows
N’hésitez pas a lâcher un petit merci si cela vous a aider
(demander si besoin d'un VirusTotal pour le autoit)
Enjoy it !