Login für Fritzbox via URL

  • Hallo, ich habe hier eine Zeile,

    `echo -n 53855f40-testpass | iconv -f ISO8859-1 -t UTF-16LE | md5sum -b`

    die unter Linux Folgendes Liefert

    963d7d2ff477b5a9b332e2f5938472e0
    Ohne die Convertierung kommt:

    eab1e005f474e90f2d66a95d0943df01

    in Autoit ist das Ergebenis:

    eab1e005f474e90f2d66a95d0943df01

    dort Fehlt mir ja die Convertierung.


    Ich habe da mal mit dem UDF von Progandy rum gespielt: https://autoit.de/index.php?page=Thread&threadID=11350

    hat aber leider keinen Erfolggebracht.

    • Offizieller Beitrag

    Hi,

    probier mal :

    Spoiler anzeigen
    [autoit]


    Global $_MD5Opcode = '0xC85800005356576A006A006A008D45A850E8280000006A00FF750CFF75088D45A850E8440000006A006A008D45A850FF7510E8710700005F5E5BC9C210005589E58B4D0831C0894114894110C70101234567C7410489ABCDEFC74108FEDCBA98C7410C765432105DC21000C80C0000538B5D088B4310C1E80383E03F8945F88B4510C1E0030143103943107303FF43148B4510C1E81D0143146A40582B45F88945F4394510724550FF750C8B45F88D44031850E8A00700008D43185053E84E0000008B45F48945FC8B45FC83C03F39451076138B450C0345FC5053E8300000008345FC40EBE28365F800EB048365FC008B45102B45FC508B450C0345FC508B45F88D44031850E84D0700005BC9C21000C84000005356576A40FF750C8D45C050E8330700008B45088B088B50048B70088B780C89D021F089D3F7D321FB09D801C1034DC081C178A46AD7C1C10701D189C821D089CBF7D321F309D801C7037DC481C756B7C7E8C1C70C01CF89F821C889FBF7D321D309D801C60375C881C6DB702024C1C61101FE89F021F889F3F7D321CB09D801C20355CC81C2EECEBDC1C1C21601F289D021F089D3F7D321FB09D801C1034DD081C1AF0F7CF5C1C10701D189C821D089CBF7D321F309D801C7037DD481C72AC68747C1C70C01CF89F821C889FBF7D321D309D801C60375D881C6134630A8C1C61101FE89F021F889F3F7D321CB09D801C20355DC81C2019546FDC1C21601F289D021F089D3F7D321FB09D801C1034DE081C1D8988069C1C10701D189C821D089CBF7D321F309D801C7037DE481C7AFF7448BC1C70C01CF89F821C889FBF7D321D309D801C60375E881C6B15BFFFFC1C61101FE89F021F889F3F7D321CB09D801C20355EC81C2BED75C89C1C21601F289D021F089D3F7D321FB09D801C1034DF081C12211906BC1C10701D189C821D089CBF7D321F309D801C7037DF481C7937198FDC1C70C01CF89F821C889FBF7D321D309D801C60375F881C68E4379A6C1C61101FE89F021F889F3F7D321CB09D801C20355FC81C22108B449C1C21601F289D021F889FBF7D321F309D801C1034DC481C162251EF6C1C10501D189C821F089F3F7D321D309D801C7037DD881C740B340C0C1C70901CF89F821D089D3F7D321CB09D801C60375EC81C6515A5E26C1C60E01FE89F021C889CBF7D321FB09D801C20355C081C2AAC7B6E9C1C21401F289D021F889FBF7D321F309D801C1034DD481C15D102FD6C1C10501D189C821F089F3F7D321D309D801C7037DE881C753144402C1C70901CF89F821D089D3F7D321CB09D801C60375FC81C681E6A1D8C1C60E01FE89F021C889CBF7D321FB09D801C20355D081C2C8FBD3E7C1C21401F289D021F889FBF7D321F309D801C1034DE481C1E6CDE121C1C10501D189C821F089F3F7D321D309D801C7037D'
    $_MD5Opcode &= 'F881C7D60737C3C1C70901CF89F821D089D3F7D321CB09D801C60375CC81C6870DD5F4C1C60E01FE89F021C889CBF7D321FB09D801C20355E081C2ED145A45C1C21401F289D021F889FBF7D321F309D801C1034DF481C105E9E3A9C1C10501D189C821F089F3F7D321D309D801C7037DC881C7F8A3EFFCC1C70901CF89F821D089D3F7D321CB09D801C60375DC81C6D9026F67C1C60E01FE89F021C889CBF7D321FB09D801C20355F081C28A4C2A8DC1C21401F289D031F031F801C1034DD481C14239FAFFC1C10401D189C831D031F001C7037DE081C781F67187C1C70B01CF89F831C831D001C60375EC81C622619D6DC1C61001FE89F031F831C801C20355F881C20C38E5FDC1C21701F289D031F031F801C1034DC481C144EABEA4C1C10401D189C831D031F001C7037DD081C7A9CFDE4BC1C70B01CF89F831C831D001C60375DC81C6604BBBF6C1C61001FE89F031F831C801C20355E881C270BCBFBEC1C21701F289D031F031F801C1034DF481C1C67E9B28C1C10401D189C831D031F001C7037DC081C7FA27A1EAC1C70B01CF89F831C831D001C60375CC81C68530EFD4C1C61001FE89F031F831C801C20355D881C2051D8804C1C21701F289D031F031F801C1034DE481C139D0D4D9C1C10401D189C831D031F001C7037DF081C7E599DBE6C1C70B01CF89F831C831D001C60375FC81C6F87CA21FC1C61001FE89F031F831C801C20355C881C26556ACC4C1C21701F289F8F7D009D031F001C1034DC081C1442229F4C1C10601D189F0F7D009C831D001C7037DDC81C797FF2A43C1C70A01CF89D0F7D009F831C801C60375F881C6A72394ABC1C60F01FE89C8F7D009F031F801C20355D481C239A093FCC1C21501F289F8F7D009D031F001C1034DF081C1C3595B65C1C10601D189F0F7D009C831D001C7037DCC81C792CC0C8FC1C70A01CF89D0F7D009F831C801C60375E881C67DF4EFFFC1C60F01FE89C8F7D009F031F801C20355C481C2D15D8485C1C21501F289F8F7D009D031F001C1034DE081C14F7EA86FC1C10601D189F0F7D009C831D001C7037DFC81C7E0E62CFEC1C70A01CF89D0F7D009F831C801C60375D881C6144301A3C1C60F01FE89C8F7D009F031F801C20355F481C2A111084EC1C21501F289F8F7D009D031F001C1034DD081C1827E53F7C1C10601D189F0F7D009C831D001C7037DEC81C735F23ABDC1C70A01CF89D0F7D009F831C801C60375C881C6BBD2D72AC1C60F01FE89C8F7D009F031F801C20355E481C291D386EBC1C21501F28B4508010801500401700801780C5F5E5BC9C20800C814000053E840000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008F45EC8B5D0C6A088D4310508D'
    $_MD5Opcode &= '45F850E8510000008B4310C1E80383E03F8945F483F838730B6A38582B45F48945F0EB096A78582B45F48945F0FF75F0FF75ECFF750CE831F8FFFF6A088D45F850FF750CE823F8FFFF6A1053FF7508E8050000005BC9C210005589E55156578B7D088B750C8B4D10FCF3A45F5E595DC20C00'
    Global $_MD5CodeBuffer

    [/autoit] [autoit][/autoit] [autoit]

    Global $txt = "53855f40-testpass"
    Global $buffer = StringToBinary($txt, 2)
    Global $Hash = _MD5($buffer)
    ConsoleWrite($Hash & @CRLF & '0x' & StringUpper('963d7d2ff477b5a9b332e2f5938472e0') & @CRLF)

    [/autoit] [autoit][/autoit] [autoit]

    Func _MD5($Data)
    Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($_MD5Opcode) & "]")
    DllStructSetData($CodeBuffer, 1, $_MD5Opcode)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]")
    DllStructSetData($Input, 1, $Data)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Digest = DllStructCreate("byte[16]")

    [/autoit] [autoit][/autoit] [autoit]

    DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _
    "ptr", DllStructGetPtr($Input), _
    "int", BinaryLen($Data), _
    "ptr", DllStructGetPtr($Digest), _
    "int", 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Ret = DllStructGetData($Digest, 1)
    $Input = 0
    $Digest = 0
    $CodeBuffer = 0
    Return $Ret
    EndFunc ;==>_MD5

    [/autoit]

    Mega

  • Also hier mal ein Beispiel wie man sich an der Fritz!Box Anmelden kann.

    Spoiler anzeigen
    [autoit]


    #include <http.au3>
    #include <MD5.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $host = "fritz.box"
    $Fritzpass = "Password"
    $Challenge=StringRegExp(_INetGetSource("http://" & $host & "/cgi-bin/webcm?getpage=../html/login_sid.xml"),"<Challenge>(.*)</Challenge>",1)
    $Challenge=$Challenge[0]
    $CPSTR=$Challenge & "-" & $Fritzpass
    $MD5 = StringLower(StringReplace(_MD5(StringToBinary($CPSTR, 2)),"0x",""))
    $RESPONSE = $Challenge & "-" & $MD5
    $POSTDATA="login:command/response=" & $RESPONSE & "&getpage=../html/de/menus/menu2.html"
    $httpsocet = _HTTPConnect($host)
    $RC = _HTTPPost($host, "http://" & $host & "/cgi-bin/webcm", $httpsocet,$POSTDATA)
    sleep(1000)
    $RC = _HTTPRead($httpsocet,0)
    $SID = StringRegExp($RC,'[nNaAmMeE]+="[sSiIdD]+"\s*[vVaAlLuUeE]+\s*=\s*"(.*)"\s+',1)
    $SID = $SID[0]
    if $SID == "" Then
    $ErrorMessage = StringRegExp($RC,'errorMessage">(.*)<',1)
    $ErrorMessage = $ErrorMessage[0]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ErrorMessage = ' & $ErrorMessage & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    EndIf
    $RC = _HTTPPost($host, "http://" & $host & "/cgi-bin/webcm?sid=" & $SID & " &getpage=../html/de/menus/menu2.html&errorpage=../html/de/menus/menu2.html&var:pagename=foncalls&var:errorpagename=foncalls&var:menu=home&var:pagemaster=&var:activtype=pppoe&var:tabInetstat=0&var:weckernr=&logger:settings/filter=2", $httpsocet)
    sleep(2000)
    $CallList=_INetGetSource("http://" & $host & "/cgi-bin/webcm?sid=" & $SID & "&getpage=../html/de/FRITZ!Box_Anrufliste.csv")
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CallList = ' & $CallList & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]

    Als nächste die beiden Include Files http.au3

    Spoiler anzeigen
    [autoit]

    ; ===================================================================
    ; HTTP UDF's
    ; v0.5
    ;
    ; By: Greg "Overload" Laabs
    ; Last Updated: 07-22-06
    ; Tested with AutoIt Version 3.1.1.131
    ; Extra requirements: Nothing!
    ;
    ; A set of functions that allow you to download webpages and submit
    ; POST requests.
    ;
    ; Main functions:
    ; _HTTPConnect - Connects to a webserver
    ; _HTTPGet - Submits a GET request to a webserver
    ; _HTTPPost - Submits a POST request to a webserver
    ; _HTTPRead - Reads the response from a webserver
    ; ===================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    TCPStartup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $_HTTPUserAgent = "AutoItScript/"&@AutoItVersion
    Global $_HTTPLastSocket = -1
    Global $_HTTPRecvTimeout = 30000

    [/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPSetUserAgent($Program, $Version)
    ;
    ; Sets the User-Agent that will be sent with all future _HTTP
    ; functions. If this is never called, the user agent is set to
    ; AutoItScript/[YourAutoItVersion]
    ; Parameters:
    ; $Program - IN - The name of the program
    ; $Version - IN - The version number of the program
    ; Returns:
    ; None
    ; ===================================================================
    Func _HTTPSetUserAgent($Program, $Version)
    $_HTTPUserAgent = $Program&"/"&$Version
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPConnect($host, [$port])
    ;
    ; Opens a connection to $host on the port you supply (or 80 if you don't supply a port. Returns the socket of the connection.
    ; Parameters:
    ; $host - IN - The hostname you want to connect to. This should be in the format "www.google.com" or "localhost"
    ; $port - OPTIONAL IN - The port to connect on. 80 is default.
    ; Returns:
    ; The socket of the connection.
    ; Remarks:
    ; Possible @errors:
    ; 1 - Unable to open socket - @extended is set to Windows API WSAGetLasterror return
    ; ===================================================================
    Func _HTTPConnect($host, $port = 80)
    Dim $ip = TCPNameToIP ( $host )
    Dim $socket = TCPConnect ( $ip, 80 )

    [/autoit] [autoit][/autoit] [autoit]

    If ($socket == -1) Then
    SetError(1, @error)
    Return -1
    EndIf

    $_HTTPLastSocket = $socket
    SetError(0)
    Return $socket
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; Possible @errors:
    ; 1 - No socket
    Func _HTTPClose($socket = -1)
    If $socket == -1 Then
    If $_HTTPLastSocket == -1 Then
    SetError(1)
    Return 0
    EndIf
    $socket = $_HTTPLastSocket
    EndIf
    TCPCloseSocket($socket)

    SetError(0)
    Return 1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPGet($host, $page, [$socket])
    ;
    ; Executes a GET request on an open socket.
    ; Parameters:
    ; $host - IN - The hostname you want to get the page from. This should be in the format "www.google.com" or "localhost"
    ; $page - IN - The the file you want to get. This should always start with a slash. Examples: "/somepage.php" or "/somedirectory/somefile.zip"
    ; $socket - OPTIONAL IN - The socket opened by _HTTPConnect. If this is not supplied, the last socket opened with _HTTPConnect will be used.
    ; Returns:
    ; The number of bytes sent in the request.
    ; Remarks:
    ; Possible @errors:
    ; 1 - No socket supplied and no current socket exists
    ; 2 - Error sending to socket. Check @extended for Windows API WSAGetError return
    ; ===================================================================
    Func _HTTPGet($host, $page, $socket = -1)
    Dim $command

    If $socket == -1 Then
    If $_HTTPLastSocket == -1 Then
    SetError(1)
    Return
    EndIf
    $socket = $_HTTPLastSocket
    EndIf

    $command = "GET "&$page&" HTTP/1.1"&@CRLF
    $command &= "Host: " &$host&@CRLF
    $command &= "User-Agent: "&$_HTTPUserAgent&@CRLF
    $command &= "Connection: close"&@CRLF
    $command &= ""&@CRLF

    Dim $bytessent = TCPSend($socket, $command)

    If $bytessent == 0 Then
    SetExtended(@error)
    SetError(2)
    return 0
    EndIf

    SetError(0)
    Return $bytessent
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPPost($host, $page, [$socket])
    ;
    ; Executes a POST request on an open socket.
    ; Parameters:
    ; $host - IN - The hostname you want to get the page from. This should be in the format "www.google.com" or "localhost"
    ; $page - IN - The the file you want to get. This should always start with a slash. Examples: "/" or "/somedirectory/submitform.php"
    ; $socket - OPTIONAL IN - The socket opened by _HTTPConnect. If this is not supplied, the last socket opened with _HTTPConnect will be used.
    ; $data - OPTIONAL IN - The data to send in the post request. This should first be run through _HTTPEncodeString()
    ; Returns:
    ; The number of bytes sent in the request.
    ; Remarks:
    ; Possible @errors:
    ; 1 - No socket supplied and no current socket exists
    ; 2 - Error sending to socket. Check @extended for Windows API WSAGetError return
    ; ===================================================================
    Func _HTTPPost($host, $page, $socket = -1, $data = "")
    Dim $command

    If $socket == -1 Then
    If $_HTTPLastSocket == -1 Then
    SetError(1)
    Return
    EndIf
    $socket = $_HTTPLastSocket
    EndIf

    Dim $datasize = StringLen($data)

    $command = "POST "&$page&" HTTP/1.1"&@CRLF
    $command &= "Host: " &$host&@CRLF
    $command &= "User-Agent: "&$_HTTPUserAgent&@CRLF
    $command &= "Connection: close"&@CRLF
    $command &= "Content-Type: application/x-www-form-urlencoded"&@CRLF
    $command &= "Content-Length: "&$datasize&@CRLF
    $command &= ""&@CRLF
    $command &= $data&@CRLF

    Dim $bytessent = TCPSend($socket, $command)

    If $bytessent == 0 Then
    SetExtended(@error)
    SetError(2)
    return 0
    EndIf

    SetError(0)
    Return $bytessent
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPRead([$socket], [$flag])
    ;
    ; Retrieves data from an open socket. This should only be called after _HTTPGet or _HTTPPost is called.
    ; Parameters:
    ; $socket - OPTIONAL IN - The socket you want to receive data from. If this is not supplied, the last socket opened with _HTTPConnect will be used.
    ; $flag - OPTIONAL IN - Determines how the data will be returned. See Remarks.
    ; Returns:
    ; See "Flags" in remarks, below.
    ; Remarks:
    ; Possible @errors:
    ; 1 - No socket
    ; 3 - Timeout reached before any data came through the socket
    ; 4 - Some data came through, but not all of it. Return value is the number of bytes received.
    ; 5 - Unable to parse HTTP Response from server. Return value is the HTTP Response line
    ; 6 - Unexpected header data returned. Return value is the line that caused the error
    ; 7 - Invalid flag
    ; 8 - Unable to parse chunk size. Return value is the line that caused the error
    ; Flags:
    ; 0 - Return value is the body of the page (default)
    ; 1 - Return value is an array:
    ; [0] = HTTP Return Code
    ; [1] = HTTP Return Reason (human readable return code like "OK" or "Forbidden"
    ; [2] = HTTP Version
    ; [3] = Two dimensional array with the headers. Each item has:
    ; [0] = Header name
    ; [1] = Header value
    ; [4] = The body of the page
    ; ===================================================================
    Func _HTTPRead($socket = -1, $flag = 0)
    If $socket == -1 Then
    If $_HTTPLastSocket == -1 Then
    SetError(1)
    Return
    EndIf
    $socket = $_HTTPLastSocket
    EndIf

    Dim $timer = TimerInit()
    Dim $performancetimer = TimerInit()
    Dim $downloadtime = 0

    Dim $headers[1][2] ; An Array of the headers found
    Dim $numheaders = 0 ; The number of headers found
    Dim $body = "" ; The body of the message
    Dim $HTTPVersion ; The HTTP version of the server (almost always 1.1)
    Dim $HTTPResponseCode ; The HTTP response code like 200, or 404
    Dim $HTTPResponseReason ; The human-readable response reason, like "OK" or "Not Found"
    Dim $bytesreceived = 0 ; The total number of bytes received
    Dim $data = "" ; The entire raw message gets put in here.
    Dim $chunked = 0 ; Set to 1 if we get the "Transfer-Encoding: chunked" header.
    Dim $chunksize = 0 ; The size of the current chunk we are processing.
    Dim $chunkprocessed = 0 ; The amount of data we have processed on the current chunk.
    Dim $contentlength ; The size of the body, if NOT using chunked transfer mode.
    Dim $part = 0 ; Refers to what part of the data we're currently parsing:
    ; 0 - Nothing parsed, so HTTP response should come next
    ; 1 - Currently parsing headers
    ; 2 - Currently waiting for the next chunk size - this is skipped if the transfer-encoding is not chunked
    ; 3 - Currently waiting for or parsing body data
    ; 4 - Currently parsing footers
    ;While 1
    Sleep(10)
    Dim $recv = TCPRecv($socket,16)
    If @error <> 0 Then
    ;ConsoleWrite("Server closed connection")
    ;@error appears to be -1 after the server closes the connection. A good way to tell that we're finished, because we always send
    ;the "Connection: close" header to the server.
    ; !!! This is no longer used because we can now tell that we're done by checking the content-length header or properly handling
    ; chunked data.
    EndIf

    While $recv <> ""
    ;If $recv <> "" Then
    $bytesreceived = $bytesreceived + StringLen($recv)
    $timer = TimerInit()
    $data &= $recv
    ;ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $data = ' & $data & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ;ConsoleWrite("Bytes downloaded: "&$bytesreceived&@CRLF)
    ;EndIf
    $recv = TCPRecv($socket,2048)
    WEnd

    Dim $split = StringSplit($data,@CRLF,1)
    $data = ""
    Dim $i
    For $i=1 To $split[0]
    If $i=$split[0] Then
    If $part < 2 OR $chunked = 1 Then
    ; This is tricky. The last line we've received might be truncated, so we only want to process it under special cases.
    ; Non chunked data doesn't always send a CRLF at the end so there's no way to tell if this is truly the last line without parsing it.
    ; However, we don't want to parse it if it's only a partial header or something.
    ; The solution: We will only process this last line if we're at the body section and the transfer-encoding is NOT chunked.
    $data = $split[$i]
    ExitLoop
    EndIf
    EndIf

    Dim $newpart = $part
    Switch $part
    Case 0 ; Nothing parsed, so HTTP response should come next
    If $split[$i] <> "" Then
    Dim $regex = StringRegExp($split[$i],"^HTTP/([0-9.]+) ([0-9]+) ([a-zA-Z0-9 ]+)$",3)
    If @error <> 0 Then
    SetError(5)
    Return $split[$i]
    Else
    $HTTPVersion = $regex[0]
    $HTTPResponseCode = $regex[1]
    $HTTPResponseReason = $regex[2]
    If $HTTPResponseCode <> 100 Then
    $newpart = 1
    EndIf
    EndIf
    EndIf
    Case 1, 4 ; Currently parsing headers or footers
    ;If the line is blank, then we're done with headers and the body is next
    If $split[$i] == "" Then
    If $part = 1 Then
    If $chunked Then
    $newpart = 2
    Else
    $newpart = 3
    EndIf
    ElseIf $part = 4 Then
    ; If $part is 4 then we're processing footers, so we're all done now.
    ExitLoop 2
    EndIf
    Else ;The line wasn't blank
    ;Check to see if the line begins with whitespace. If it does, it's actually
    ;a continuation of the previous header
    Dim $regex = StringRegExp($split[$i], "^[ \t]+([^ \t].*)$", 3)
    If @error <> 1 Then
    If $numheaders == 0 Then
    SetError(6)
    Return $split[$i]
    EndIf
    $headers[$numheaders-1][1] &= $regex[0]
    Else;The line didn't start with a space
    Dim $regex = StringRegExp($split[$i],"^([^ :]+):[ \t]*(.*)$",3)
    If @error <> 1 Then
    ;This is a new header, so add it to the array
    $numheaders = $numheaders + 1
    ReDim $headers[$numheaders][2]
    $headers[$numheaders-1][0] = $regex[0]
    $headers[$numheaders-1][1] = $regex[1]

    ; There are a couple headers we need to know about. We'll process them here.
    If $regex[0] = "Transfer-Encoding" AND $regex[1] = "chunked" Then
    $chunked = 1
    ElseIf $regex[0] = "Content-Length" Then
    $contentlength = Int($regex[1])
    EndIf
    Else
    SetError(6)
    Return $split[$i]
    EndIf
    EndIf
    EndIf
    Case 2 ; Awaiting chunk size
    $regex = StringRegExp($split[$i],"^([0-9a-f]+);?.*$",3)
    If @error <> 0 Then
    SetError(8)
    Return $split[$i]
    EndIf
    $chunksize = $regex[0]
    $chunksize = Dec($chunksize)
    $chunkprocessed = 0

    If $chunksize == 0 Then
    $newpart = 4
    Else
    $newpart = 3
    EndIf
    Case 3 ; Awaiting body data
    $body &= $split[$i]

    $chunkprocessed = $chunkprocessed + StringLen($split[$i])

    If $chunked Then
    If $chunkprocessed >= $chunksize Then
    $newpart = 2
    Else
    $body &= @CRLF
    $chunkprocessed = $chunkprocessed + 2; We add 2 for the CRLF we stipped off.
    EndIf
    Else
    If not $chunkprocessed >= $contentlength Then
    If $i < $split[0] Then
    ; Only add a CRLF if this is not the last line received.
    $body &= @CRLF
    $chunkprocessed = $chunkprocessed + 2; We add 2 for the CRLF we stipped off.
    EndIf
    EndIf
    EndIf
    Case Else
    ; This should never happen
    EndSwitch
    $part = $newpart
    Next

    If $bytesreceived == 0 AND TimerDiff($timer) > $_HTTPRecvTimeout Then
    SetError(3)
    Return 0
    ElseIf $bytesreceived > 0 AND TimerDiff($timer) > $_HTTPRecvTimeout Then
    ConsoleWrite($body)
    SetError(4)
    Return $bytesreceived
    EndIf
    ;WEnd
    $downloadtime = TimerDiff($performancetimer)
    ;ConsoleWrite("Performance: Download time: "&$downloadtime&@CRLF)

    Switch $flag
    Case 0
    SetError(0)
    Return $body
    Case 1
    Dim $return[5]
    $return[0] = $HTTPResponseCode
    $return[1] = $HTTPResponseReason
    $return[2] = $HTTPVersion
    $return[3] = $headers
    $return[4] = $body
    SetError(0)
    Return $return
    Case Else
    SetError(7)
    Return 0
    EndSwitch
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; ===================================================================
    ; _HTTPEncodeString($string)
    ;
    ; Encodes a string so it can safely be transmitted via HTTP
    ; Parameters:
    ; $string - IN - The string to encode
    ; Returns:
    ; A valid encoded string that can be used as GET or POST variables.
    ; ===================================================================
    Func _HTTPEncodeString($string)
    Local Const $aURIValidChars[256] = _
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, _
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, _
    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Local $sEncoded = ""
    For $i = 1 To StringLen($string)
    Local $c = StringMid($string, $i, 1)
    If $c = " " Then $c = "+"
    If Number($aURIValidChars[Asc($c) ]) Then
    $sEncoded &= $c
    Else
    $sEncoded &= StringFormat("%%X", Asc($c))
    EndIf
    Next

    Return $sEncoded
    EndFunc ;==>_WebComposeURL

    [/autoit]

    Und die MD5 Includedatei mit Freundlicher Unterstützung von Xenobiologist

    Spoiler anzeigen
    [autoit]

    Func _MD5($Data)
    Local $_MD5CodeBuffer
    Local $_MD5Opcode = '0xC85800005356576A006A006A008D45A850E8280000006A00FF750CFF75088D45A850E8440000006A006A008D45A850FF7510E8710700005F5E5BC9C210005589E58B4D0831C0894114894110C70101234567C7410489ABCDEFC74108FEDCBA98C7410C765432105DC21000C80C0000538B5D088B4310C1E80383E03F8945F88B4510C1E0030143103943107303FF43148B4510C1E81D0143146A40582B45F88945F4394510724550FF750C8B45F88D44031850E8A00700008D43185053E84E0000008B45F48945FC8B45FC83C03F39451076138B450C0345FC5053E8300000008345FC40EBE28365F800EB048365FC008B45102B45FC508B450C0345FC508B45F88D44031850E84D0700005BC9C21000C84000005356576A40FF750C8D45C050E8330700008B45088B088B50048B70088B780C89D021F089D3F7D321FB09D801C1034DC081C178A46AD7C1C10701D189C821D089CBF7D321F309D801C7037DC481C756B7C7E8C1C70C01CF89F821C889FBF7D321D309D801C60375C881C6DB702024C1C61101FE89F021F889F3F7D321CB09D801C20355CC81C2EECEBDC1C1C21601F289D021F089D3F7D321FB09D801C1034DD081C1AF0F7CF5C1C10701D189C821D089CBF7D321F309D801C7037DD481C72AC68747C1C70C01CF89F821C889FBF7D321D309D801C60375D881C6134630A8C1C61101FE89F021F889F3F7D321CB09D801C20355DC81C2019546FDC1C21601F289D021F089D3F7D321FB09D801C1034DE081C1D8988069C1C10701D189C821D089CBF7D321F309D801C7037DE481C7AFF7448BC1C70C01CF89F821C889FBF7D321D309D801C60375E881C6B15BFFFFC1C61101FE89F021F889F3F7D321CB09D801C20355EC81C2BED75C89C1C21601F289D021F089D3F7D321FB09D801C1034DF081C12211906BC1C10701D189C821D089CBF7D321F309D801C7037DF481C7937198FDC1C70C01CF89F821C889FBF7D321D309D801C60375F881C68E4379A6C1C61101FE89F021F889F3F7D321CB09D801C20355FC81C22108B449C1C21601F289D021F889FBF7D321F309D801C1034DC481C162251EF6C1C10501D189C821F089F3F7D321D309D801C7037DD881C740B340C0C1C70901CF89F821D089D3F7D321CB09D801C60375EC81C6515A5E26C1C60E01FE89F021C889CBF7D321FB09D801C20355C081C2AAC7B6E9C1C21401F289D021F889FBF7D321F309D801C1034DD481C15D102FD6C1C10501D189C821F089F3F7D321D309D801C7037DE881C753144402C1C70901CF89F821D089D3F7D321CB09D801C60375FC81C681E6A1D8C1C60E01FE89F021C889CBF7D321FB09D801C20355D081C2C8FBD3E7C1C21401F289D021F889FBF7D321F309D801C1034DE481C1E6CDE121C1C10501D189C821F089F3F7D321D309D801C7037D'
    $_MD5Opcode &= 'F881C7D60737C3C1C70901CF89F821D089D3F7D321CB09D801C60375CC81C6870DD5F4C1C60E01FE89F021C889CBF7D321FB09D801C20355E081C2ED145A45C1C21401F289D021F889FBF7D321F309D801C1034DF481C105E9E3A9C1C10501D189C821F089F3F7D321D309D801C7037DC881C7F8A3EFFCC1C70901CF89F821D089D3F7D321CB09D801C60375DC81C6D9026F67C1C60E01FE89F021C889CBF7D321FB09D801C20355F081C28A4C2A8DC1C21401F289D031F031F801C1034DD481C14239FAFFC1C10401D189C831D031F001C7037DE081C781F67187C1C70B01CF89F831C831D001C60375EC81C622619D6DC1C61001FE89F031F831C801C20355F881C20C38E5FDC1C21701F289D031F031F801C1034DC481C144EABEA4C1C10401D189C831D031F001C7037DD081C7A9CFDE4BC1C70B01CF89F831C831D001C60375DC81C6604BBBF6C1C61001FE89F031F831C801C20355E881C270BCBFBEC1C21701F289D031F031F801C1034DF481C1C67E9B28C1C10401D189C831D031F001C7037DC081C7FA27A1EAC1C70B01CF89F831C831D001C60375CC81C68530EFD4C1C61001FE89F031F831C801C20355D881C2051D8804C1C21701F289D031F031F801C1034DE481C139D0D4D9C1C10401D189C831D031F001C7037DF081C7E599DBE6C1C70B01CF89F831C831D001C60375FC81C6F87CA21FC1C61001FE89F031F831C801C20355C881C26556ACC4C1C21701F289F8F7D009D031F001C1034DC081C1442229F4C1C10601D189F0F7D009C831D001C7037DDC81C797FF2A43C1C70A01CF89D0F7D009F831C801C60375F881C6A72394ABC1C60F01FE89C8F7D009F031F801C20355D481C239A093FCC1C21501F289F8F7D009D031F001C1034DF081C1C3595B65C1C10601D189F0F7D009C831D001C7037DCC81C792CC0C8FC1C70A01CF89D0F7D009F831C801C60375E881C67DF4EFFFC1C60F01FE89C8F7D009F031F801C20355C481C2D15D8485C1C21501F289F8F7D009D031F001C1034DE081C14F7EA86FC1C10601D189F0F7D009C831D001C7037DFC81C7E0E62CFEC1C70A01CF89D0F7D009F831C801C60375D881C6144301A3C1C60F01FE89C8F7D009F031F801C20355F481C2A111084EC1C21501F289F8F7D009D031F001C1034DD081C1827E53F7C1C10601D189F0F7D009C831D001C7037DEC81C735F23ABDC1C70A01CF89D0F7D009F831C801C60375C881C6BBD2D72AC1C60F01FE89C8F7D009F031F801C20355E481C291D386EBC1C21501F28B4508010801500401700801780C5F5E5BC9C20800C814000053E840000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008F45EC8B5D0C6A088D4310508D'
    $_MD5Opcode &= '45F850E8510000008B4310C1E80383E03F8945F483F838730B6A38582B45F48945F0EB096A78582B45F48945F0FF75F0FF75ECFF750CE831F8FFFF6A088D45F850FF750CE823F8FFFF6A1053FF7508E8050000005BC9C210005589E55156578B7D088B750C8B4D10FCF3A45F5E595DC20C00'
    Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($_MD5Opcode) & "]")
    DllStructSetData($CodeBuffer, 1, $_MD5Opcode)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]")
    DllStructSetData($Input, 1, $Data)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Digest = DllStructCreate("byte[16]")

    [/autoit] [autoit][/autoit] [autoit]

    DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _
    "ptr", DllStructGetPtr($Input), _
    "int", BinaryLen($Data), _
    "ptr", DllStructGetPtr($Digest), _
    "int", 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $Ret = DllStructGetData($Digest, 1)
    $Input = 0
    $Digest = 0
    $CodeBuffer = 0
    Return $Ret
    EndFunc ;==>_MD5

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    So nun hoffe ich natürlich das hier viele nützliche Tools für dei Fritz!Box raus kommen. ;)