Guest User

Autoit Challange

a guest
Aug 9th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.83 KB | None | 0 0
  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.     $oHTTP = ObjCreate('winhttp.winhttprequest.5.1')
  16.     $oHTTP.open('POST', "https://cc.the-morpheus.de/solutions/6/")
  17. ;~  $oHTTP.SetRequestHeader("Content-Type", "application/json")
  18.     $oJson = "{'token': " & '"' & $Binary & '"}'
  19. ;~  $oJson = "token=" & $Binary
  20. ;~  $oJson = StringToBinary($Binary, 4)
  21. ;~  $oJson = "{'token': " & '""}'
  22.     ConsoleWrite("Send: " & $oJson & @CRLF)
  23.     $oHTTP.send($oJson)
  24.     $oHTTP.WaitForResponse()
  25.     Return $oHTTP.ResponseText()
  26. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment