Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 17:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



bau einer kleinen autologin.exe

Discussion on bau einer kleinen autologin.exe within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2013
Posts: 9
Received Thanks: 0
Question bau einer kleinen autologin.exe

moin liebe com

ich bin dabei für Darkorbit ne kleine login.exe zu baunen,
das einlogen ist nicht das prop was ich habe sonder die server aus wal
hir mal was ich bis jetzt habe

nu zur frage wie bekomme ich es hin mit der server aus wal und wo muss ich das einfügen???

Code:
#include <IE.au3>

$Url = 'http://www.darkorbit.bigpoint.com/'
$User = 'User'
$Pwd = 'pasword'


$test = _IEAutoLogin($Url, $User, $Pwd)

Func _IEAutoLogin($sUrl, $sUsername, $sPwd)
;funkey 09.09.09
$oIE = _IECreate($sUrl)
_IEErrorNotify(False)
_IEErrorHandlerRegister()
$oForms = _IEFormGetCollection($oIE)
If @error Then
  Return SetError(1, _IEErrorHandlerDeRegister(), $oIE) ;'no forms --> no login'
Else
  $Index = 0
  For $oForm In $oForms
   $oFormElements = _IEFormElementGetCollection($oForm)
   If IsObj($oFormElements) Then
    $IndexElement = 0
    For $oElement In $oFormElements
     If $oElement.Type = 'password' Then
      $oPwd = _IEFormElementGetObjByName($oForm, $oElement.Name)
      _IEFormElementSetValue($oPwd, $sPwd)
      For $i = $IndexElement - 1 To 0 Step -1
       $oUser = _IEFormElementGetCollection($oForm, $i)
       If $oUser.Type = 'text' Then
        _IEFormElementSetValue($oUser, $sUsername)
        ExitLoop
       EndIf
      Next
      If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then  ;submit
       _IEFormSubmit($oForm, 0)
       _IELoadWait($oIE)
      Else  ;click
       For $i = $IndexElement + 1 To $IndexElement + 10 ;check the next 10 elements
        $oButton = _IEFormElementGetCollection($oForm, $i)
        If $oButton.Type = 'submit' Then
         _IEAction($oButton, "click")
         ExitLoop
        EndIf
       Next
      EndIf
      Return SetExtended(_IEErrorHandlerDeRegister(), $oIE)
     EndIf
     $IndexElement += 1
    Next
   EndIf
   $Index += 1
  Next
EndIf
Return SetError(2, _IEErrorHandlerDeRegister(), $oIE) ;no password-field found
EndFunc   ;==>_IEAutoLogin
mfg Zonk
Zonk02 is offline  
Old 04/15/2013, 14:31   #2


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Code:
#Region Includes
#include <WinHttp.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#EndRegion
#Region GUI
$form = GUICreate("DarkOrbit Login", 220, 202, 453, 228)
$name = GUICtrlCreateInput("", 80, 48, 121, 21)
$label1 = GUICtrlCreateLabel("Please Login here!", 32, 8, 153, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$label2 = GUICtrlCreateLabel("Name:", 16, 48, 35, 17)
$label3 = GUICtrlCreateLabel("Password:", 16, 88, 53, 17)
$pw = GUICtrlCreateInput("", 80, 88, 121, 21, BitOR($gui_ss_default_input, $es_password))
$serv = GUICtrlCreateInput("", 80, 120, 121, 21)
$login = GUICtrlCreateButton("LOGIN ^__^", 16, 152, 187, 41)
$label4 = GUICtrlCreateLabel("Server:", 16, 120, 38, 17)
GUISetState(@SW_SHOW)
#EndRegion
While 1
	$nmsg = GUIGetMsg()
	Switch $nmsg
		Case $gui_event_close
			Exit
		Case $login
			$login = GuiCtrlRead($serv) & ".darkorbit.bigpoint.com"
			$logined = "loginForm_default_username=" & decode(GuiCtrlRead($name)) & "&loginForm_default_password=" & decode(GUICtrlRead($pw)) & "&loginForm_default_login_submit=Login"
			TrayTip("", "Open Connection", 10)
			$hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0")
			TrayTip("", "Connecting", 10)
			$hConnect = _WinHttpConnect($hSession, $login)
			TrayTip("", "Get Serverlist", 10)
			$sHtml = _WinHttpSimpleRequest($hConnect, "GET", "")
			$sHtml = _WinHttpSimpleRequest($hConnect, "POST", "?locale=de&aid=2997&aip=", $login, $logined)

			$aString = _StringBetween($sHtml,'class="serverSelection_ini ini_active" target="http://' & GUICtrlRead($serv),'" onclick="InstanceSelection.clickedIni(this);"')
			$aString = "http://" & GUICtrlRead($serv) & $aString[0]
			TrayTip("", "Loging in", 10)
			$sHtml = _WinHttpSimpleRequest($hConnect, "GET", $aString, $login)
			TrayTip("", "Get Startpage", 10)
			$sHtml = _WinHttpSimpleRequest($hConnect, "GET", "indexInternal.es?action=internalStart", $login, "indexInternal.es?action=internalStart")
	EndSwitch
WEnd

Func decode($string)
	$decoded = ""
	$temp = StringToBinary($string,4)
	$temp = StringTrimLeft($temp,2)
	for $i = 1 to StringLen($temp) Step 2
		$decoded = $decoded & "%" & StringMid($temp,$i,2)
	Next
	Return $decoded
EndFunc
Kompletter Login mit WinHttp (Include Download im Anhang)

Made by me

Viel Spaß damit
Attached Files
File Type: rar WinHttp.rar (21.8 KB, 4 views)
Requi is offline  
Reply


Similar Threads Similar Threads
Suche kleinen Rest einer PSC
11/12/2012 - Trading - 2 Replies
Hallo Zusammen (: Ich suche dringend eine PSC. Ist ne lange Geschichte allerdings fehlen mir gerade 60Cent für den Kauf eines Artikels via PSC. Hat jemand von euch hier eine PSC mit einem Rest von 60 Cent ? Ihr würdet mir wirklich sehr damit helfen , falls jemand wirklich eine hat würde ich mich auf eine PM sehr freuen (: Ich weiß nicht ich hab nicht viel anzubieten vllt gold in wow oder in guild wars 2. Wenigstens ich bekomme die 60 Cent einer anderen PSC zusammen :/
[KeksThread] Bezüglich einer kleinen Diskussion im Längsten
09/08/2012 - Off Topic - 1 Replies
Hi Guys, da wir eben im Längsten über Kekse eine kleine Diskussion hatten, hier eine kleine Umfrage. Welche Kekse? - Und mögt ihr Oreos?
Max Valor in few hours on Illum/Maximale Tapferkeit in einer kleinen Menge von Stunde
02/05/2012 - SWTOR Hacks, Bots, Cheats & Exploits - 7 Replies
This was posted on the official forums. I'm not sure if it will be removed or not. Original Link 1) Get an ops group together. There is no min/max limit of players you'll need, but the more the better. 2) Talk with someone from the opposite faction, have them form a group as well 3) Meet in the Illum "PvP" zone 4) Both groups go to the Republic base. The best spot to be is in the corner behind one of the cap points, closest to the outside wall of the Republic base 5) Everyone group up,...
Kann einer nochmal ne kleinen datei uppenfür mich pls?? :D
08/07/2010 - WarRock - 5 Replies
hallo, ich brache damaged.dds aus dem texture/ui/effect ordner. hab ausversehen kake gemoddet -.- wollte die warnig datei un damaged mischen, doch dann war alles rot



All times are GMT +1. The time now is 17:30.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.