Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 22:43

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

Advertisement



AutoIt Nuttenspiel Login, Problem

Discussion on AutoIt Nuttenspiel Login, Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 37
Received Thanks: 2
AutoIt Nuttenspiel Login, Problem

Ich hoffe, dass sich auch an einem Samstag jemand mit meinem Problem beschäftigen könnte. Vor mehreren Tagen habe ich mich entschlossen AutoIt zu lernen. Dauern abhängig von jemandem zu sein, der coden kann war mir zu nervig, also....selbst ist der Mann. Mittlerweile habe ich mir soweit die Grundlagen angeeignet und arbeite an dem Tutorial von Shadow für Packetbots.

Ich habe mit parallel zu dem Tutorial einen Nuttenspielbot geschrieben und hänge nun beim Login

Code:
#include<String.au3>

$spielwelt=InputBox("Server?","Welcher Server")
$name=InputBox("Accountname","Gib deinen Accountnamen ein")
$passwort=InputBox("Passwort","Gib dein Passwort ein")  

TCPStartup()
$ip = TCPNameToIP('welt'&$spielwelt&'.nuttenspiel.de')
TCPShutdown() 

$post='spielwelt=$spielwelt&username=$name&password=$passwort&rulecheck=rulechecked&agecheck=agechecked&login=login&submit=LogIn'
$source=TCPRequest($ip,"welt"&$spielwelt&".nuttenspiel.de",0, "login.php",$post, "", 'http://nuttenspiel.de/') 
$cookies=GetCookies($source)  
MsgBox(0,"test",$source)

Func GetCookies($sQuellcode)
    Local $sCookies, $i, $aCookies
    $sCookies = ''
    $aCookies = _StringBetween($sQuellcode, 'Set-Cookie: ', ';', 1)
    For $i = 0 To UBound($aCookies) - 1
        $sCookies &= $aCookies[$i] & ';'
    Next
    Return $sCookies
EndFunc   ;==>GetCookies

Func TCPRequest($sIp, $sHost,$msg=0, $sSeite = "", $sPost = '', $sCookies = '', $sReferer = '', $iMaxTime = 10000)
    Local $sPacket, $iSocket, $iTimer

    If $sPost = '' Then
        $sPacket = 'GET /' & $sSeite & ' HTTP/1.1' & @CRLF
    Else
        $sPacket = 'POST /' & $sSeite & ' HTTP/1.1' & @CRLF
    EndIf
    $sPacket &= 'Host: ' & $sHost & @CRLF & _
            'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)' & @CRLF & _
            'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' & @CRLF & _
            'Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3' & @CRLF & _
            'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' & @CRLF & _
            'Keep-Alive: 300' & @CRLF & _
            'Content-Type: application/x-www-form-urlencoded' & @CRLF & _
            'Connection: keep-alive' & @CRLF
    If $sReferer <> '' Then
        $sPacket &= 'Referer: ' & $sReferer & @CRLF
    EndIf
    If $sCookies <> '' Then
        $sCookies=StringStripCR($sCookies)
        $sCookies=StringStripWS($sCookies,8)
        $sPacket &= 'Cookie: ' & $sCookies & @CRLF
    EndIf
    If $sPost <> '' Then
        $sPacket &= 'Content-Length: ' & StringLen($sPost) & @CRLF
    EndIf
    $sPacket &= @CRLF
    If $sPost <> '' Then
        $sPacket &= $sPost
    EndIf
    If $msg=1 Then
    MsgBox(0,"Packet",$sPacket)
    EndIf
    TCPStartup()
    If @error Then Return SetError(1, 0, "")
    $iSocket = TCPConnect($sIp, 80)
    If @error Then Return SetError(2, 0, "")
    TCPSend($iSocket, $sPacket)
    If @error Then Return SetError(3, 0, "")
    $iTimer = TimerInit()
    Do
        $sRecv = TCPRecv($iSocket, 1024)
        If TimerDiff($iTimer) > $iMaxTime Then Return SetError(4, 0, "")
    Until $sRecv <> ""
    Do
        $sRecv &= TCPRecv($iSocket, 1024)
    Until @error Or StringInStr($sRecv, '</html>')
    TCPCloseSocket($iSocket)
    TCPShutdown()
    Return $sRecv
EndFunc   ;==>TCPRequest

Func Change($string)
    $string = StringReplace($string, "%", "%25")
        $string = StringReplace($string, "†", "%E2%80%A0")
    $string = StringReplace($string, "ä", "%C3%A4")
    $string = StringReplace($string, "ö", "%C3%B6")
    $string = StringReplace($string, "ü", "%C3%BC")
    $string = StringReplace($string, "!", "%21")
    $string = StringReplace($string, '"', "%22")
    $string = StringReplace($string, "§", "%C2%A7")
    $string = StringReplace($string, "$", "%24")
    $string = StringReplace($string, "&", "%26")
    $string = StringReplace($string, "/", "%2F")
    $string = StringReplace($string, "+", "%2B")
    $string = StringReplace($string, " ", "+")
    $string = StringReplace($string, "(", "%28")
    $string = StringReplace($string, ")", "%29")
    $string = StringReplace($string, "=", "%3D")
    $string = StringReplace($string, "?", "%3F")
    $string = StringReplace($string, "[", "%5B")
    $string = StringReplace($string, "]", "%5D")
    $string = StringReplace($string, "{", "%7B")
    $string = StringReplace($string, "}", "%7D")
    $string = StringReplace($string, "ß", "%C3%9F")
    $string = StringReplace($string, ",", "%2C")
    $string = StringReplace($string, ":", "%3A")
    $string = StringReplace($string, ";", "%3B")
    $string = StringReplace($string, "#", "%23")
    $string = StringReplace($string, "~", "%7E")
    $string = StringReplace($string, "²", "%C2%B2")
    $string = StringReplace($string, "³", "%C2%B3")
    $string = StringReplace($string, "<", "%3C")
    $string = StringReplace($string, ">", "%3E")
    $string = StringReplace($string, "|", "%7C")
    $string = StringReplace($string, "^", "%5E")
    $string = StringReplace($string, "°", "%C2%B0")
    $string = StringReplace($string, "´", "%C2%B4")
    $string = StringReplace($string, "@", "%40")
    $string = StringReplace($string, "€", "%E2%82%AC")
    Return $string
 EndFunc   ;==>Change
Die Message Box bleibt leer, was mcih eigentlich wundert. :S

Irgendwelche Ideen?

Hier das Ergebniss beim auslesen der Seite mit Live Http Headers.

Attached Images
File Type: jpg Live Http.jpg (159.4 KB, 81 views)
mikaxxl is offline  
Old 01/07/2012, 18:14   #2


 
Lawliet's Avatar
 
elite*gold: 2
Join Date: Jul 2009
Posts: 14,456
Received Thanks: 4,685
Machs mit _WinHTTP oder so.
Da würde ein
Code:
$html = _WinHTTPSimpleRequest($connection, "POST", $Server, "anhang.... "& $ID & "awkdw" & $ PW & "jwd")
reichen. Also so nach dem Prinzip Gibt dazu viele Tutorials.
Der Anhang wäre das $post in deinem Script.
Lawliet is offline  
Thanks
1 User
Old 01/08/2012, 13:11   #3
 
elite*gold: 0
Join Date: Sep 2007
Posts: 37
Received Thanks: 2
Dankeschön ....werde mich da mal reinfuchsen und mal gucken
mikaxxl is offline  
Old 01/09/2012, 18:21   #4
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
Im Post werden auch Cookies angegeben, die du nicht mit sendest.
BlackHybrid is offline  
Reply


Similar Threads Similar Threads
NuttenSpiel
04/21/2012 - Browsergames - 1 Replies
Hallo Ich suche ein AutoSkill Bot für Nuttenspiel.com Natürlich habe ch gegoogelt ohne ende aber da sind leider nur faks. Hier habe ich immer gute sachen gefunden aber den bot leider noch nicht. Ich will das der bot meine nutte skillt. Habt ihr sowas ? Also geld bekomme ich mit dem Hitfacker und ner proxy liste. (das ist kein thema)
[AutoIt, Help] parse/login problem
04/11/2011 - AutoIt - 5 Replies
Hey I´m playing around with AutoIt since a few Weeks, now I wanted to try to make a Bot for Ogame(yeah a another one...) Well as the Theme says I have a few Prolems, which I couldn´t eliminate with Google and the Helpfile. So hoping that someone of you can help me. While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE
[AutoIt] Problem: Non-Script-Login überwinden (für Browsergamebot)
02/10/2011 - AutoIt - 3 Replies
Hallo epvp*coders, ich will einen kleinen IE-Bot für das Browsergame Die Stämme schreiben. Mein Bot fügt Benutzername und Passwort in die Inputs ein und betätigt den Login-Button. Jetzt soll ein vorher angegebene Server ausgewählt werden. (z.B.: de61) *g* Leider scheitere ich an diesem "non_script_login": <div id="non_script_login"> <label for="server_select" id="server_select_label"> <strong >Welt:</strong> <select id="server_select"...



All times are GMT +1. The time now is 22:43.


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.