Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 10:56

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

Advertisement



WinHTTP Send Problem

Discussion on WinHTTP Send Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 2
Join Date: Nov 2011
Posts: 318
Received Thanks: 273
WinHTTP Send Problem

Ich hoffe mal ich hab die Überschrift treffen beschrieben.
Mein Problem ist liegt darin, das ich versuche einen Packtbot zumachen der mir die Belohnung eines Spiels abholt. Das klappt auch einwandfrei.
Das ist mein Script wenn ich es ohne Gui mache:

PHP Code:
#RequireAdmin
#include <WinHTTP.au3>
$Session _WinHttpOpen ("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0")
$Connect _WinhttpConnect ($Session,"www.aeriagames.com")
$HTML _WinHttpSimpleRequest ($Connect"Get","/user/login?destination=http%3A%2F%2Fde.edeneternal.aeriagames.com%2F")
FileWrite ("Test.html",$HTML)
$HTML2 _WinHttpSimpleRequest ($Connect"Post","/account/login/ajax","www.aeriagames.com","edit[id]=[COLOR="Red"]Zensiert[/COLOR]&edit[pass]=[COLOR="Red"]Zensiert[/COLOR]&ajax_close_button=Abbrechen&op=Einloggen&edit[form_id]=account_login&action=submit")
FileWrite ("Test2.html",$HTML2)
$HTML3 _WinHttpSimpleRequest ($Connect"GET","/itemmall/free-rewards")
FileWrite ("Test3.html",$HTML3)
$HTML4 _WinHttpSimpleRequest ($Connect"POST","/freerewards/play/197","de.edeneternal.aeriagames.com")
FileWrite ("Test4.html",$HTML4)
$HTML5 _WinHttpSimpleRequest ($Connect"POST","/freerewards/redeem/eede","de.edeneternal.aeriagames.com")
FileWrite ("Test5.html",$HTML5)
_WinHttpCloseHandle ($Connect)
_WinHttpCloseHandle ($Session
Wenn ich aber versuche, das ganze in eine Gui einzubauen und die Daten (im Script rot gekennzeichnet) durch Variablen ersetze funktioniert das Senden des Packetrequests aufeinmal nichtmehr. o.O

Hier mal das komplette Script:

PHP Code:
#RequireAdmin
#include <WinHTTP.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\AeriaGames\EdenEternal-DE\Form1.kxf
$Form1 GUICreate("RewardCollector"360163)
GUISetIcon("C:\AeriaGames\EdenEternal-DE\Uninst.exe", -1)
$List1 GUICtrlCreateList(""832121950)
$Label1 GUICtrlCreateLabel("ID:"881817)
$List2 GUICtrlCreateList(""12832121950)
$Label2 GUICtrlCreateLabel("PW:"13682517)
$Button1 GUICtrlCreateButton("Starten"2641048349)
$Input1 GUICtrlCreateInput("1000000"1761367321)
$Checkbox1 GUICtrlCreateCheckbox("Pausiere Bot nach Beendigung"813616917)
$Button2 GUICtrlCreateButton("Hinzufügen"26488325)
$Input2 GUICtrlCreateInput(""3288921)
$Input3 GUICtrlCreateInput(""16888121)
$Button3 GUICtrlCreateButton("Ausg. Löschen"264408325)
$Button4 GUICtrlCreateButton("Alles Löschen"264728325)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
            Case 
$Button2
            GUICtrlSetData 
($List1guictrlread ($Input2))
            
GUICtrlSetData ($List2guictrlread ($Input3))
            Case 
$Button3
            _GUICtrlListBox_DeleteString
($List1 ,_GUICtrlListBox_GetCurSel($List1))
            
_GUICtrlListBox_DeleteString($List2 ,_GUICtrlListBox_GetCurSel($List2))
            Case 
$Button4
            _GUICtrlListBox_ResetContent
($List1)
            
_GUICtrlListBox_ResetContent($List2)
        Case 
$Button1
            
For $i 0 to _GUICtrlListBox_GetCount($List1Step +1
        $ID 
_GUICtrlListBox_GetText($List1,$i)
        
$PW _GUICtrlListBox_GetText($List2,$i)

MsgBox (0,"",$ID " " $PW)
$Session _WinHttpOpen ("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0")
$Connect _WinhttpConnect ($Session,"www.aeriagames.com")
$HTML _WinHttpSimpleRequest ($Connect"Get","/user/login?destination=http%3A%2F%2Fde.edeneternal.aeriagames.com%2F")
FileWrite ("Test.html",$HTML)
$HTML2 _WinHttpSimpleRequest ($Connect"Post","/account/login/ajax","www.aeriagames.com","edit[id]=Zensiert&edit[pass]=Zensiert&ajax_close_button=Abbrechen&op=Einloggen&edit[form_id]=account_login&action=submit")
FileWrite ("Test2.html",$HTML2)
$HTML3 _WinHttpSimpleRequest ($Connect"GET","/itemmall/free-rewards")
FileWrite ("Test3.html",$HTML3)
$HTML4 _WinHttpSimpleRequest ($Connect"POST","/freerewards/play/197","de.edeneternal.aeriagames.com")
FileWrite ("Test4.html",$HTML4)
$HTML5 _WinHttpSimpleRequest ($Connect"POST","/freerewards/redeem/eede","de.edeneternal.aeriagames.com")
FileWrite ("Test5.html",$HTML5)
_WinHttpCloseHandle ($Connect)
_WinHttpCloseHandle ($Session)

            
Next
    
EndSwitch
WEnd 
Hat wer damit schonmal Erfahrung gemacht?
Kann mir da jmd helfen?
SingularPlex is offline  
Old 05/29/2012, 22:40   #2
 
elite*gold: 6
Join Date: Mar 2010
Posts: 584
Received Thanks: 81
In der Console wird nichts angezeigt?
Also Fehlermeldungen oder ähnliches...
Shrezz is offline  
Old 05/30/2012, 13:48   #3
 
elite*gold: 0
Join Date: Mar 2011
Posts: 8,645
Received Thanks: 3,454
Kannste und einen Testaccount zur Verfügung stellen? Ansonsten probier es mal so
For $i = 1 to _GUICtrlListBox_GetCount($List1) Step 1
Freddy​ is offline  
Old 05/30/2012, 23:05   #4
 
elite*gold: 2
Join Date: Nov 2011
Posts: 318
Received Thanks: 273
Hat jmd meinen Post gelöscht? o.O
Naja was ich sagen wollte es kommt keine Fehlermeldung beim starten.
Und auch wenn ich mir das LoginPacket ausgeben lasse und das Packet mit den Variablen und das Packet ohne Varibalen vergleiche sehe ich keinen Unterschied sprich die Packete sind exakt gleich. Funktionieren tut das ganze trotzdem nicht ;(
Edit:
Hier mal ein Testacc:
ID = EpvpTest
PW = EpvpTest12345
SingularPlex is offline  
Old 05/31/2012, 18:56   #5
 
elite*gold: 0
Join Date: Mar 2011
Posts: 8,645
Received Thanks: 3,454
PHP Code:
#RequireAdmin
#include <WinHTTP.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\AeriaGames\EdenEternal-DE\Form1.kxf
$Form1 GUICreate("RewardCollector"360163)
GUISetIcon("C:\AeriaGames\EdenEternal-DE\Uninst.exe", -1)
$List1 GUICtrlCreateList(""832121950)
$Label1 GUICtrlCreateLabel("ID:"881817)
$List2 GUICtrlCreateList(""12832121950)
$Label2 GUICtrlCreateLabel("PW:"13682517)
$Button1 GUICtrlCreateButton("Starten"2641048349)
$Input1 GUICtrlCreateInput("1000000"1761367321)
$Checkbox1 GUICtrlCreateCheckbox("Pausiere Bot nach Beendigung"813616917)
$Button2 GUICtrlCreateButton("Hinzufügen"26488325)
$Input2 GUICtrlCreateInput(""3288921)
$Input3 GUICtrlCreateInput(""16888121)
$Button3 GUICtrlCreateButton("Ausg. Löschen"264408325)
$Button4 GUICtrlCreateButton("Alles Löschen"264728325)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
            Case 
$Button2
            GUICtrlSetData 
($List1guictrlread ($Input2))
            
GUICtrlSetData ($List2guictrlread ($Input3))
            Case 
$Button3
            _GUICtrlListBox_DeleteString
($List1 ,_GUICtrlListBox_GetCurSel($List1))
            
_GUICtrlListBox_DeleteString($List2 ,_GUICtrlListBox_GetCurSel($List2))
            Case 
$Button4
            _GUICtrlListBox_ResetContent
($List1)
            
_GUICtrlListBox_ResetContent($List2)
        Case 
$Button1
            
For $i 1 to _GUICtrlListBox_GetCount($List1Step 1
               $ID 
_GUICtrlListBox_GetText($List1,$i)
               
$PW _GUICtrlListBox_GetText($List2,$i)
               
$Session _WinHttpOpen ("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0")
               
$Connect _WinhttpConnect ($Session,"www.aeriagames.com")
               
$HTML _WinHttpSimpleRequest ($Connect"Get","/user/login?destination=http%3A%2F%2Fde.edeneternal.aeriagames.com%2F")
               
FileWrite ("Test.html",$HTML)
               
$HTML2 _WinHttpSimpleRequest ($Connect"Post","/account/login/ajax","www.aeriagames.com","edit[id]="&$ID&"&edit[pass]="&$PW&"&ajax_close_button=Abbrechen&op=Einloggen&edit[form_id]=account_login&action=submit")
               
FileWrite ("Test2.html",$HTML2)
               
$HTML3 _WinHttpSimpleRequest ($Connect"GET","/itemmall/free-rewards")
               
FileWrite ("Test3.html",$HTML3)
               
$HTML4 _WinHttpSimpleRequest ($Connect"POST","/freerewards/play/197","de.edeneternal.aeriagames.com")
               
FileWrite ("Test4.html",$HTML4)
               
$HTML5 _WinHttpSimpleRequest ($Connect"POST","/freerewards/redeem/eede","de.edeneternal.aeriagames.com")
               
FileWrite ("Test5.html",$HTML5)
               
_WinHttpCloseHandle ($Connect)
               
_WinHttpCloseHandle ($Session
            
Next
    
EndSwitch
WEnd 
Laut FileWrite Nr.2 ist der Login erfoldreich aber die Kategorie wo das Item geholt werden soll existiert nicht.
Freddy​ is offline  
Old 05/31/2012, 19:33   #6
 
elite*gold: 2
Join Date: Nov 2011
Posts: 318
Received Thanks: 273
Jop das stimmt schon, jedoch ist $HTML2 eigentlich Sinnlos weil ich das Zufallsitem direkt per Packet aufrufen kann und somit $HTML2 einfach übersprungen wird.
Ich denke einfach das sich die Funktionen der Listbox nicht so wirklich mit WinHTTP vertragen. Mit ner stinknormalen Inputbox klappts nämlich auch.
SingularPlex is offline  
Reply


Similar Threads Similar Threads
AutoIT WinHTTP PacketBot Problem
05/30/2012 - AutoIt - 6 Replies
Hi, ich arbeite derzeit an einem kleinen Darkorbit Packet-Bot. Nur scheitere ich beim Login schon. Also bis zur Instance auswahl komm ich aber dann die Instance wählt es nicht aus. ich habe hier mal meinen Code gepostet ich hoffe ihr könnt mir schnell helfen. #include <WinHTTP.au3> $hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Firefox/12.0") $hConnect = _WinhttpConnect($hSession, "www.darkorbit.com")
send Problem
02/12/2012 - C/C++ - 29 Replies
edit
WinHTTP Proxy Problem
10/30/2011 - AutoIt - 8 Replies
Hallo com, habe folgendes Problem bei der Proxy Einstellung mit WinHTTP. Mein Code sieht wie folgt aus: #include <WinHTTP.au3> #include <String.au3> #include <Array.au3> $Proxy = "59.66.63.182:8909"
Send() Problem
06/14/2010 - AutoIt - 7 Replies
Hey Community, ich hab da ein Problem. Und zwar ist es nervig, dass ich meinen Namen immer per Lesezeichen (Google) kopieren muss und dann hier einfügen muss, weil er ja Sonderzeichen enthält. Deswegen hab ich mir gedacht, ich schreib mir ein Mini-Programm, dass ich in den Autostart-Ordner packe und sobald ich STRG + ALT + P drücke, soll das Programm für mich "Σternαl." in den Usernameinput auf e*pvpers schreiben.
[osds] problem send item & send weapon
11/12/2009 - Dekaron Private Server - 3 Replies
Hello i have 2 problems with osds control panel when i try to send weapon i have no more weapon available i cant choice i have nothing but i can send armor succesfully and my second problem is send item when i try to send item the browser say Login Error, Please login again.anyone can be fix that please? i post screenshots http://panzer.power-heberg.com/itembug.JPG http://panzer.power-heberg.com/noweapon.JPG



All times are GMT +2. The time now is 10:56.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.