View difference between Paste ID: BB2R5rru and ZN5p6GkE
SHOW: | | - or go back to the newest paste.
1
#include <Mathematische Funktionen.au3>
2
;~	#include <Needed Libarys/JSON.au3>
3
4
MsgBox(0, "Test", _sendBinary(_binary(_getDezimal())))
5
6
Func _getDezimal()
7
	$oHTTP = ObjCreate('winhttp.winhttprequest.5.1')
8
	$oHTTP.open('GET', "https://cc.the-morpheus.de/challenges/6/")
9
	$oHTTP.send()
10
	$oHTTP.WaitForResponse()
11
	Return $oHTTP.ResponseText()
12
EndFunc
13
14
Func _sendBinary($Binary)
15
    $oJson = '{ "token": "' & $Binary & '" }'
16-
	$oHTTP.open('POST', "https://cc.the-morpheus.de/solutions/6/")
16+
17-
;~ 	$oHTTP.SetRequestHeader("Content-Type", "application/json")
17+
    $oHTTP = ObjCreate('winhttp.winhttprequest.5.1')
18-
	$oJson = "{'token': " & '"' & $Binary & '"}'
18+
	$oHTTP.open("POST", "https://cc.the-morpheus.de/solutions/6/", False)
19-
;~ 	$oJson = "token=" & $Binary
19+
    $oHTTP.SetRequestHeader("Content-Type", "application/json;charset=utf-8")
20-
;~ 	$oJson = StringToBinary($Binary, 4)
20+
21-
;~ 	$oJson = "{'token': " & '""}'
21+
22
	$oHTTP.send($oJson)
23
	$oHTTP.WaitForResponse()
24
25
	Return $oHTTP.ResponseText()
26
EndFunc