Advertisement
agrippa1994

SSL Request

Apr 19th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include ssl_request.ahk
  2.  
  3. IniRead, Host, settings.ini, Optionen, Host, localhost
  4. IniRead, File, settings.ini, Optionen, File, index.php
  5. IniRead, Port, settings.ini, Optionen, Port, https
  6. IniRead, Post, settings.ini, Optionen, Post, %A_Space%
  7. IniRead, checkBox, settings.ini, Optionen, Base64, 0
  8.  
  9. Gui, Add, Text, x22 y70 w80 h20 , Remote-Datei
  10. Gui, Add, Text, x22 y110 w80 h20 , Port
  11. Gui, Add, Text, x22 y150 w80 h20 , Post-Daten
  12. Gui, Add, Text, x22 y370 w140 h20 , Serverantwort
  13. Gui, Add, Text, x22 y30 w80 h20 , Host / IP
  14.  
  15. Gui, Add, Edit, x102 y30 w320 h20 vHost, %Host%
  16. Gui, Add, Edit, x102 y70 w320 h20 vFile, %File%
  17. Gui, Add, Edit, x102 y110 w320 h20 vPort, %Port%
  18. Gui, Add, Edit, x22 y180 w400 h130 vPost, %Post%
  19. Gui, Add, Edit, x22 y390 w400 h230 vOutput +ReadOnly,
  20.  
  21. Gui, Add, Button, x262 y330 w160 h20 gButton, HTTPS-Request
  22. Gui, Add, CheckBox, x22 y330 w140 h20 vcheckBox, Base64
  23. Gui, Show, x425 y127 h645 w447, HTTPS-Request via SSL-Verschlüsselung
  24.  
  25. GuiControl,, checkBox, %checkBox%
  26. Return
  27.  
  28. GuiClose:
  29. ExitApp
  30.  
  31.  
  32. Button:
  33. Gui, Submit, NoHide
  34.  
  35. IniWrite, %Host%, settings.ini, Optionen, Host
  36. IniWrite, %File%, settings.ini, Optionen, File
  37. IniWrite, %Port%, settings.ini, Optionen, Port
  38. IniWrite, %Post%, settings.ini, Optionen, Post
  39. IniWrite, %checkBox%, settings.ini, Optionen, Base64
  40.  
  41. if(!StrLen(Host) || !StrLen(File) || !StrLen(Port))
  42. {
  43.     MsgBox Keine gültige Eingabe!
  44.     return
  45. }
  46.  
  47. if(ssl_request(Host, File, Post, Port, answer, checkBox))
  48. {
  49.     GuiControl, Text, Output, %answer%
  50. }
  51. else
  52. {
  53.     text := "Fehler in der Abfrage!`r`n" . answer
  54.     MsgBox %text%
  55.     GuiControl, Text, Output,
  56. }
  57. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement