AutoIT - Script-to-OOP-Script-Converter

      AutoIT - Script-to-OOP-Script-Converter

      Hallo liebe Leute,

      Seitdem ich die AutoITObject.au3 für mich entdeckt habe (greetings an die ersteller),
      komm ich von den Objekten nichtmehr weg...

      Standartmäßig, konvertier ich erst alles Mühsam per Hand STUNDEN(2,3,4,5..[-open end] manchmal ;( ),
      da das kein Zustand war, hab ich mir gedacht ich schreib nen "CLASS_Parser", der mir wenigstens die CLASS parst..

      Der CLASS_Parser war super einfach und schnell fertig, darum jetzt ein "OBJECT&CLASS - PARSER + CODE ERSTELLER" 8| ...

      Kurz und knapp gesagt, man gibt der UDF einen Link zu einer Datei [bsp. X:\Data\convert.au3] und schreibt dazu noch den Wunschnamen seiner neuen Classe [bsp. ich_werde] (( das Programm hängt hinten noch _converted dran, sodass der komplette Name dann lautet [ich_werde_converted() // $ich_werde_obj // $ich_werde_class]

      Die Bedienung ist fast leichter als ne MsgBox zu erzeugen

      Und ACHTUNG: Dieser Parser ist kein "1-klick-ich-mach-die-ganze-arbeit-für-dich-parser". Er befindet sich noch im Alpha Stadium und wird warscheinlich von Bugs und Fehlern nur so geplagt....
      Aufjedenfall Konvertiert er erstmal alles was er schafft, was er nicht muss man mit der Hand nachtragen. Sparrt trotzdem einen HAUFEN Arbeit, z.B. bei der WinHTTPConstants.au3 mussten 330 Zeilen in diesem Stil umgeschrieben werden :

      Von:

      Quellcode

      1. Global CONST $WINHTTP_AUTO_DETECT_TYPE_DNS_A = 0x00000002

      Auf:

      Quellcode

      1. '.AddProperty ("WINHTTP_AUTO_DETECT_TYPE_DNS_A",$ELSCOPE_READONLY, 0x00000002)'

      Das z.B. schafft das Programm (bei einzeiliger deklarierung) schon soziemlich perfekt.

      (Der Code ist noch etwas unordentlich 8o ) (Es gibt auch Ordentlich DEBUG-Optionen bei Fehlern)

      Programm: "AutoIT - [Script]-to-[OOP-Script]-[Converter] .au3"

      Beispiel Benutzung:

      AutoIt Quelltext: Example of Usage

      1. ;================================================;
      2. ;| AutoIT - Script-to-OOP-Script-Converter |;
      3. ;| (c)2017 by busti_ownz@me.com |;
      4. ;| feel free to use this UDF, its free 2 use |;
      5. ;================================================;
      6. ;| just dont be an dumbass and sell this |;
      7. ;================================================;
      8. ;| released on: autoit.de/codebot.de |;
      9. ;| By: Busti |;
      10. ;================================================;
      11. ;| usage: |;
      12. ;| _ParseAndMerge_Script_to_Object_and_Class( |;
      13. ;| -$o = Path to File you wish to Convert |;
      14. ;| -$classname = New Name of the Class&Object |;
      15. ;| -$DEBUG = Boolean TRUE/FALSE |;
      16. ;| -$TIDY = Boolean TRUE/FALSE |;
      17. ;| -$useHeader= Boolean TRUE/FALSE ) |;
      18. ;================================================;
      19. ;==============================USEHEADER -> EXAMPLE==;
      20. ;This is an example of an Header, |;
      21. ;this will just be included into the parsed |;
      22. ;script if $useHeader = TRUE |;
      23. ;====================================================,
      24. ; ;================================================;
      25. ; ;| AutoIT - Script-to-OOP-Converter |;
      26. ; ;| (c)2017 by busti_ownz@me.com |;
      27. ; ;================================================;
      28. ; ;| Converted with AutoIT "3.3.14.2" |;
      29. ; ;| WinHttp_test.au3 [>>] WinHTTP_converted.au3 |;
      30. ; ;================================================;
      31. ; ;| released on: autoit.de/codebot.de |;
      32. ; ;================================================;
      33. ; END OF EXAMPLE
      34. ;====================================================;
      35. #include <Array.au3>
      36. #include <String.au3>
      37. Local $DIRECTORY_WITH_FILES_TO_CONVERT = @ScriptDir & '\', $old_FILE_NAME_TO_PARSE = 'convertconverter_lol.au3', $file = $DIRECTORY_WITH_FILES_TO_CONVERT & $old_FILE_NAME_TO_PARSE
      38. Local $new_CLASS_AND_FILE_NAME = 'ParseAndMergeScript_into_Object_and_Class'
      39. _ParseAndMerge_Script_to_Object_and_Class($file, $new_CLASS_AND_FILE_NAME&"_false_dbg_true_tdy") ;[Convert] File ["$file"] into ["$newfilename"], [without DEBUGGING] and [RUN] [TIDY] after completion
      40. _ParseAndMerge_Script_to_Object_and_Class($file, $new_CLASS_AND_FILE_NAME&"_true_dbg_true_tdy",True) ;[Convert] File ["$file"] into ["$newfilename"], [with DEBUGGING] and [RUN] [TIDY] after completion
      41. _ParseAndMerge_Script_to_Object_and_Class($file, $new_CLASS_AND_FILE_NAME&"_true_dbg_false_tdy",True,False) ;[Convert] File ["$file"] into ["$newfilename"], [with DEBUGGING] and [DONT RUN!] [TIDY] after completion


      Kompletter Sourcecode:
      >>als Anhang

      Eine BeispielDatei die ich umkonvertiert habe, das ist die WinHTTPConstants.au3

      Diese Datei wurde von 'AutoIT - Script-to-OOP-Converter' automatisch generiert.

      Quellcode

      1. ;================================================;
      2. ;| AutoIT - Script-to-OOP-Converter |;
      3. ;| (c)2017 by busti_ownz@me.com |;
      4. ;================================================;
      5. ;| Converted with AutoIT "3.3.14.2" |;
      6. ;| WinHttp_test.au3 [>>] WinHTTP_converted.au3 |;
      7. ;================================================;
      8. ;| released on: autoit.de/codebot.de |;
      9. ;================================================;
      10. ;=============] [Include [-once] / [AutoitObject.au3]] [>>]
      11. #include-once
      12. #include "AutoItObject.au3"
      13. ;=============] [Includes] [End] [<<]
      14. ;=============] [Variable-Declaration], [Object-Initialization] [>>]
      15. Global $oWinHTTP, $cWinHTTP ;
      16. _AutoIt_ObjectStartup() ;
      17. If @error Then Exit ; exit on error
      18. ;=============] [Variables-declared], [Object-Initialized] <<
      19. ;=============] [Creating-Object] [>>]
      20. $oWinHTTP = WinHTTP_obj()
      21. ;=============] [Created] [<<]
      22. ;=============] ;=============] [main()] ~ [{Code Here//use File as Include}] [>>]
      23. ;
      24. ;
      25. ;;=============] ;=============] [main()][end] [<<]
      26. ;=============] [Object-Definition] [>>]
      27. Func WinHTTP_obj()
      28. Global $WinHTTP_obj = _AutoitObject_Create() ; create obj
      29. Global $WinHTTP_class = WinHTTP_class() ;using class in every obj
      30. With $WinHTTP_obj
      31. ;============>>START>>[EXTRACTION] OF [FUNCTION VARIABLES]
      32. .AddProperty("File", $ELSCOPE_PUBLIC, '')
      33. .AddProperty("aPosts", $ELSCOPE_PUBLIC, '')
      34. .AddProperty("aLinks", $ELSCOPE_PUBLIC, '')
      35. .AddProperty("counter", $ELSCOPE_PUBLIC, '')
      36. .AddProperty("sHost", $ELSCOPE_PUBLIC, '')
      37. .AddProperty("ContentLength", $ELSCOPE_PUBLIC, '')
      38. .AddProperty("Content", $ELSCOPE_PUBLIC, '')
      39. .AddProperty("Link", $ELSCOPE_PUBLIC, '')
      40. .AddProperty("counter2", $ELSCOPE_PUBLIC, '')
      41. .AddProperty("HostsHtml", $ELSCOPE_PUBLIC, '')
      42. .AddProperty("winhttpCode", $ELSCOPE_PUBLIC, '')
      43. .AddProperty("winhttpCode&", $ELSCOPE_PUBLIC, '')
      44. .AddProperty("sReferrer", $ELSCOPE_PUBLIC, '')
      45. .AddProperty("aHosts[" & .cHost & "]", $ELSCOPE_PUBLIC, '')
      46. .AddProperty("aHosts[" & .cHost & "]", $ELSCOPE_PUBLIC, '')
      47. .AddProperty("hConnect", $ELSCOPE_PUBLIC, '')
      48. .AddProperty("sHTML", $ELSCOPE_PUBLIC, '')
      49. ;============>>END>>[EXTRACTION] OF [FUNCTION VARIABLES]
      50. ;============>>START>>[CREATE METHODS] -> [OUT OF FUNCS]
      51. .AddMethod ("test_new1", "test")
      52. .AddMethod ("_Arbeiten_new2", "_Arbeiten")
      53. .AddMethod ("_RefferalLink_new3", "_RefferalLink")
      54. .AddMethod ("_Host_new4", "_Host")
      55. .AddMethod ("_Get_new5", "_Get")
      56. .AddMethod ("_Post_new6", "_Post")
      57. .AddMethod ("_FileErstellen_new7", "_FileErstellen")
      58. .AddMethod ("_ende_new8", "_ende")
      59. ;============>>END>>[CREATE METHODS] -> [OUT OF FUNCS]
      60. EndWith
      61. Return $WinHTTP_obj
      62. EndFunc ;==>WinHTTP_obj
      63. ;=============] [Class-Definition] [>>]
      64. Func WinHTTP_class() ;class-name
      65. Local $WinHTTP = _AutoItObject_Class() ;create_class
      66. With $WinHTTP
      67. ;============>>START>>[GLOBAL/CONST VARIABLES] -> [PUBLIC/PRIVATE PROPERTYS]
      68. .AddProperty("test2", $ELSCOPE_PUBLIC, 2)
      69. .AddProperty("x", $ELSCOPE_PUBLIC, '3333')
      70. .AddProperty("yamama", $ELSCOPE_PUBLIC, "testz0r")
      71. .AddProperty("yodaddy", $ELSCOPE_READONLY, 'tiiiiieeek12345')
      72. .AddProperty("doingsome", $ELSCOPE_PUBLIC, "AWESOME TESTI" & "NG" & $oSelf.yodaddy)
      73. .AddProperty("doingsome2", $ELSCOPE_READONLY, "AWESOME CONST TESTI" & "NG" & $oSelf.yodaddy)
      74. .AddProperty("INTERNET_DEFAULT_PORT", $ELSCOPE_READONLY, 0)
      75. .AddProperty("INTERNET_DEFAULT_HTTP_PORT", $ELSCOPE_READONLY, 80)
      76. .AddProperty("INTERNET_DEFAULT_HTTPS_PORT", $ELSCOPE_READONLY, 443)
      77. .AddProperty("WINHTTP_FLAG_ASYNC", $ELSCOPE_READONLY, 0x10000000)
      78. .AddProperty("WINHTTP_FLAG_ESCAPE_PERCENT", $ELSCOPE_READONLY, 0x00000004)
      79. .AddProperty("WINHTTP_FLAG_NULL_CODEPAGE", $ELSCOPE_READONLY, 0x00000008)
      80. .AddProperty("WINHTTP_FLAG_ESCAPE_DISABLE", $ELSCOPE_READONLY, 0x00000040)
      81. .AddProperty("WINHTTP_FLAG_ESCAPE_DISABLE_QUERY", $ELSCOPE_READONLY, 0x00000080)
      82. .AddProperty("WINHTTP_FLAG_BYPASS_PROXY_CACHE", $ELSCOPE_READONLY, 0x00000100)
      83. .AddProperty("WINHTTP_FLAG_REFRESH", $ELSCOPE_READONLY, $oSe)
      84. .AddProperty("WINHTTP_FLAG_SECURE", $ELSCOPE_READONLY, 0x00800000)
      85. .AddProperty("WINHTTP_ACCESS_TYPE_DEFAULT_PROXY", $ELSCOPE_READONLY, 0)
      86. .AddProperty("WINHTTP_ACCESS_TYPE_NO_PROXY", $ELSCOPE_READONLY, 1)
      87. .AddProperty("WINHTTP_ACCESS_TYPE_NAMED_PROXY", $ELSCOPE_READONLY, 3)
      88. .AddProperty("WINHTTP_NO_PROXY_NAME", $ELSCOPE_READONLY, "")
      89. .AddProperty("WINHTTP_NO_PROXY_BYPASS", $ELSCOPE_READONLY, "")
      90. .AddProperty("WINHTTP_NO_REFERER", $ELSCOPE_READONLY, "")
      91. .AddProperty("WINHTTP_DEFAULT_ACCEPT_TYPES", $ELSCOPE_READONLY, 0)
      92. .AddProperty("WINHTTP_NO_ADDITIONAL_HEADERS", $ELSCOPE_READONLY, "")
      93. .AddProperty("WINHTTP_NO_REQUEST_DATA", $ELSCOPE_READONLY, "")
      94. .AddProperty("WINHTTP_HEADER_NAME_BY_INDEX", $ELSCOPE_READONLY, "")
      95. .AddProperty("WINHTTP_NO_OUTPUT_BUFFER", $ELSCOPE_READONLY, 0)
      96. .AddProperty("WINHTTP_NO_HEADER_INDEX", $ELSCOPE_READONLY, 0)
      97. .AddProperty("WINHTTP_ADDREQ_INDEX_MASK", $ELSCOPE_READONLY, 0x0000FFFF)
      98. .AddProperty("WINHTTP_ADDREQ_FLAGS_MASK", $ELSCOPE_READONLY, 0xFFFF0000)
      99. .AddProperty("WINHTTP_ADDREQ_FLAG_ADD_IF_NEW", $ELSCOPE_READONLY, 0x10000000)
      100. .AddProperty("WINHTTP_ADDREQ_FLAG_ADD", $ELSCOPE_READONLY, 0x20000000)
      101. .AddProperty("WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA", $ELSCOPE_READONLY, 0x40000000)
      102. .AddProperty("WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON", $ELSCOPE_READONLY, 0x01000000)
      103. .AddProperty("WINHTTP_ADDREQ_FLAG_COALESCE", $ELSCOPE_READONLY, $oSe)
      104. .AddProperty("WINHTTP_ADDREQ_FLAG_REPLACE", $ELSCOPE_READONLY, 0x80000000)
      105. .AddProperty("WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH", $ELSCOPE_READONLY, 0)
      106. .AddProperty("WINHTTP_OPTION_CALLBACK", $ELSCOPE_READONLY, 1)
      107. .AddProperty("WINHTTP_FIRST_OPTION", $ELSCOPE_READONLY, $oSelf.)
      108. .AddProperty("WINHTTP_OPTION_RESOLVE_TIMEOUT", $ELSCOPE_READONLY, 2)
      109. .AddProperty("WINHTTP_OPTION_CONNECT_TIMEOUT", $ELSCOPE_READONLY, 3)
      110. .AddProperty("WINHTTP_OPTION_CONNECT_RETRIES", $ELSCOPE_READONLY, 4)
      111. .AddProperty("WINHTTP_OPTION_SEND_TIMEOUT", $ELSCOPE_READONLY, 5)
      112. .AddProperty("WINHTTP_OPTION_RECEIVE_TIMEOUT", $ELSCOPE_READONLY, 6)
      113. .AddProperty("WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT", $ELSCOPE_READONLY, 7)
      114. .AddProperty("WINHTTP_OPTION_HANDLE_TYPE", $ELSCOPE_READONLY, 9)
      115. .AddProperty("WINHTTP_OPTION_READ_BUFFER_SIZE", $ELSCOPE_READONLY, 12)
      116. .AddProperty("WINHTTP_OPTION_WRITE_BUFFER_SIZE", $ELSCOPE_READONLY, 13)
      117. .AddProperty("WINHTTP_OPTION_PARENT_HANDLE", $ELSCOPE_READONLY, 21)
      118. .AddProperty("WINHTTP_OPTION_EXTENDED_ERROR", $ELSCOPE_READONLY, 24)
      119. .AddProperty("WINHTTP_OPTION_SECURITY_FLAGS", $ELSCOPE_READONLY, 31)
      120. .AddProperty("WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT", $ELSCOPE_READONLY, 32)
      121. .AddProperty("WINHTTP_OPTION_URL", $ELSCOPE_READONLY, 34)
      122. .AddProperty("WINHTTP_OPTION_SECURITY_KEY_BITNESS", $ELSCOPE_READONLY, 36)
      123. .AddProperty("WINHTTP_OPTION_PROXY", $ELSCOPE_READONLY, 38)
      124. .AddProperty("WINHTTP_OPTION_USER_AGENT", $ELSCOPE_READONLY, 41)
      125. .AddProperty("WINHTTP_OPTION_CONTEXT_VALUE", $ELSCOPE_READONLY, 45)
      126. .AddProperty("WINHTTP_OPTION_CLIENT_CERT_CONTEXT", $ELSCOPE_READONLY, 47)
      127. .AddProperty("WINHTTP_OPTION_REQUEST_PRIORITY", $ELSCOPE_READONLY, 58)
      128. .AddProperty("WINHTTP_OPTION_HTTP_VERSION", $ELSCOPE_READONLY, 59)
      129. .AddProperty("WINHTTP_OPTION_DISABLE_FEATURE", $ELSCOPE_READONLY, 63)
      130. .AddProperty("WINHTTP_OPTION_CODEPAGE", $ELSCOPE_READONLY, 68)
      131. .AddProperty("WINHTTP_OPTION_MAX_CONNS_PER_SERVER", $ELSCOPE_READONLY, 73)
      132. .AddProperty("WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER", $ELSCOPE_READONLY, 74)
      133. .AddProperty("WINHTTP_OPTION_AUTOLOGON_POLICY", $ELSCOPE_READONLY, 77)
      134. .AddProperty("WINHTTP_OPTION_SERVER_CERT_CONTEXT", $ELSCOPE_READONLY, 78)
      135. .AddProperty("WINHTTP_OPTION_ENABLE_FEATURE", $ELSCOPE_READONLY, 79)
      136. .AddProperty("WINHTTP_OPTION_WORKER_THREAD_COUNT", $ELSCOPE_READONLY, 80)
      137. .AddProperty("WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT", $ELSCOPE_READONLY, 81)
      138. .AddProperty("WINHTTP_OPTION_PASSPORT_COBRANDING_URL", $ELSCOPE_READONLY, 82)
      139. .AddProperty("WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH", $ELSCOPE_READONLY, 83)
      140. .AddProperty("WINHTTP_OPTION_SECURE_PROTOCOLS", $ELSCOPE_READONLY, 84)
      141. .AddProperty("WINHTTP_OPTION_ENABLETRACING", $ELSCOPE_READONLY, 85)
      142. .AddProperty("WINHTTP_OPTION_PASSPORT_SIGN_OUT", $ELSCOPE_READONLY, 86)
      143. .AddProperty("WINHTTP_OPTION_PASSPORT_RETURN_URL", $ELSCOPE_READONLY, 87)
      144. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY", $ELSCOPE_READONLY, 88)
      145. .AddProperty("WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS", $ELSCOPE_READONLY, 89)
      146. .AddProperty("WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE", $ELSCOPE_READONLY, 90)
      147. .AddProperty("WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE", $ELSCOPE_READONLY, 91)
      148. .AddProperty("WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE", $ELSCOPE_READONLY, 92)
      149. .AddProperty("WINHTTP_OPTION_CONNECTION_INFO", $ELSCOPE_READONLY, 93)
      150. .AddProperty("WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST", $ELSCOPE_READONLY, 94)
      151. .AddProperty("WINHTTP_OPTION_SPN", $ELSCOPE_READONLY, 96)
      152. .AddProperty("WINHTTP_OPTION__PROXY_CREDS", $ELSCOPE_READONLY, 97)
      153. .AddProperty("WINHTTP_OPTION__SERVER_CREDS", $ELSCOPE_READONLY, 98)
      154. .AddProperty("WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT", $ELSCOPE_READONLY, 99)
      155. .AddProperty("WINHTTP_OPTION_REJECT_USERPWD_IN_URL", $ELSCOPE_READONLY, 100)
      156. .AddProperty("WINHTTP_OPTION_USE__SERVER_CREDENTIALS", $ELSCOPE_READONLY, 101)
      157. .AddProperty("WINHTTP_OPTION_RECEIVE_PROXY_CONNECT_RESPONSE", $ELSCOPE_READONLY, 103)
      158. .AddProperty("WINHTTP_OPTION_IS_PROXY_CONNECT_RESPONSE", $ELSCOPE_READONLY, 104)
      159. .AddProperty("WINHTTP_OPTION_SERVER_SPN_USED", $ELSCOPE_READONLY, 106)
      160. .AddProperty("WINHTTP_OPTION_PROXY_SPN_USED", $ELSCOPE_READONLY, 107)
      161. .AddProperty("WINHTTP_OPTION_SERVER_CBT", $ELSCOPE_READONLY, 108)
      162. .AddProperty("WINHTTP_OPTION_UNSAFE_HEADER_PARSING", $ELSCOPE_READONLY, 110)
      163. .AddProperty("WINHTTP_OPTION_DECOMPRESSION", $ELSCOPE_READONLY, 118)
      164. .AddProperty("WINHTTP_LAST_OPTION", $ELSCOPE_READONLY, $oSelf.WINHT)
      165. .AddProperty("WINHTTP_OPTION_USERNAME", $ELSCOPE_READONLY, 0x1000)
      166. .AddProperty("WINHTTP_OPTION_PASSWORD", $ELSCOPE_READONLY, 0x1001)
      167. .AddProperty("WINHTTP_OPTION_PROXY_USERNAME", $ELSCOPE_READONLY, 0x1002)
      168. .AddProperty("WINHTTP_OPTION_PROXY_PASSWORD", $ELSCOPE_READONLY, 0x1003)
      169. .AddProperty("WINHTTP_CONNS_PER_SERVER_UNLIMITED", $ELSCOPE_READONLY, 0xFFFFFFFF)
      170. .AddProperty("WINHTTP_DECOMPRESSION_FLAG_GZIP", $ELSCOPE_READONLY, 0x00000001)
      171. .AddProperty("WINHTTP_DECOMPRESSION_FLAG_DEFLATE", $ELSCOPE_READONLY, 0x00000002)
      172. .AddProperty("WINHTTP_DECOMPRESSION_FLAG_ALL", $ELSCOPE_READONLY, 0x00000003)
      173. .AddProperty("WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM", $ELSCOPE_READONLY, 0)
      174. .AddProperty("WINHTTP_AUTOLOGON_SECURITY_LEVEL_LOW", $ELSCOPE_READONLY, 1)
      175. .AddProperty("WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH", $ELSCOPE_READONLY, 2)
      176. .AddProperty("WINHTTP_AUTOLOGON_SECURITY_LEVEL_DEFAULT", $ELSCOPE_READONLY, $oSel)
      177. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY_NEVER", $ELSCOPE_READONLY, 0)
      178. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP", $ELSCOPE_READONLY, 1)
      179. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS", $ELSCOPE_READONLY, 2)
      180. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY_LAST", $ELSCOPE_READONLY, $oSel)
      181. .AddProperty("WINHTTP_OPTION_REDIRECT_POLICY_DEFAULT", $ELSCOPE_READONLY, $oS)
      182. .AddProperty("WINHTTP_DISABLE_PASSPORT_AUTH", $ELSCOPE_READONLY, 0x00000000)
      183. .AddProperty("WINHTTP_ENABLE_PASSPORT_AUTH", $ELSCOPE_READONLY, 0x10000000)
      184. .AddProperty("WINHTTP_DISABLE_PASSPORT_KEYRING", $ELSCOPE_READONLY, 0x20000000)
      185. .AddProperty("WINHTTP_ENABLE_PASSPORT_KEYRING", $ELSCOPE_READONLY, 0x40000000)
      186. .AddProperty("WINHTTP_DISABLE_COOKIES", $ELSCOPE_READONLY, 0x00000001)
      187. .AddProperty("WINHTTP_DISABLE_REDIRECTS", $ELSCOPE_READONLY, 0x00000002)
      188. .AddProperty("WINHTTP_DISABLE_AUTHENTICATION", $ELSCOPE_READONLY, 0x00000004)
      189. .AddProperty("WINHTTP_DISABLE_KEEP_ALIVE", $ELSCOPE_READONLY, 0x00000008)
      190. .AddProperty("WINHTTP_ENABLE_SSL_REVOCATION", $ELSCOPE_READONLY, 0x00000001)
      191. .AddProperty("WINHTTP_ENABLE_SSL_REVERT_IMPERSONATION", $ELSCOPE_READONLY, 0x00000002)
      192. .AddProperty("WINHTTP_DISABLE_SPN_SERVER_PORT", $ELSCOPE_READONLY, 0x00000000)
      193. .AddProperty("WINHTTP_ENABLE_SPN_SERVER_PORT", $ELSCOPE_READONLY, 0x00000001)
      194. .AddProperty("WINHTTP_OPTION_SPN_MASK", $ELSCOPE_READONLY, $oS)
      195. .AddProperty("WINHTTP_ERROR_BASE", $ELSCOPE_READONLY, 12000)
      196. .AddProperty("ERROR_WINHTTP_OUT_OF_HANDLES", $ELSCOPE_READONLY, 12001)
      197. .AddProperty("ERROR_WINHTTP_TIMEOUT", $ELSCOPE_READONLY, 12002)
      198. .AddProperty("ERROR_WINHTTP_INTERNAL_ERROR", $ELSCOPE_READONLY, 12004)
      199. .AddProperty("ERROR_WINHTTP_INVALID_URL", $ELSCOPE_READONLY, 12005)
      200. .AddProperty("ERROR_WINHTTP_UNRECOGNIZED_SCHEME", $ELSCOPE_READONLY, 12006)
      201. .AddProperty("ERROR_WINHTTP_NAME_NOT_RESOLVED", $ELSCOPE_READONLY, 12007)
      202. .AddProperty("ERROR_WINHTTP_INVALID_OPTION", $ELSCOPE_READONLY, 12009)
      203. .AddProperty("ERROR_WINHTTP_OPTION_NOT_SETTABLE", $ELSCOPE_READONLY, 12011)
      204. .AddProperty("ERROR_WINHTTP_SHUTDOWN", $ELSCOPE_READONLY, 12012)
      205. .AddProperty("ERROR_WINHTTP_LOGIN_FAILURE", $ELSCOPE_READONLY, 12015)
      206. .AddProperty("ERROR_WINHTTP_OPERATION_CANCELLED", $ELSCOPE_READONLY, 12017)
      207. .AddProperty("ERROR_WINHTTP_INCORRECT_HANDLE_TYPE", $ELSCOPE_READONLY, 12018)
      208. .AddProperty("ERROR_WINHTTP_INCORRECT_HANDLE_STATE", $ELSCOPE_READONLY, 12019)
      209. .AddProperty("ERROR_WINHTTP_CANNOT_CONNECT", $ELSCOPE_READONLY, 12029)
      210. .AddProperty("ERROR_WINHTTP_CONNECTION_ERROR", $ELSCOPE_READONLY, 12030)
      211. .AddProperty("ERROR_WINHTTP_RESEND_REQUEST", $ELSCOPE_READONLY, 12032)
      212. .AddProperty("ERROR_WINHTTP_SECURE_CERT_DATE_INVALID", $ELSCOPE_READONLY, 12037)
      213. .AddProperty("ERROR_WINHTTP_SECURE_CERT_CN_INVALID", $ELSCOPE_READONLY, 12038)
      214. .AddProperty("ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED", $ELSCOPE_READONLY, 12044)
      215. .AddProperty("ERROR_WINHTTP_SECURE_INVALID_CA", $ELSCOPE_READONLY, 12045)
      216. .AddProperty("ERROR_WINHTTP_SECURE_CERT_REV_FAILED", $ELSCOPE_READONLY, 12057)
      217. .AddProperty("ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN", $ELSCOPE_READONLY, 12100)
      218. .AddProperty("ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND", $ELSCOPE_READONLY, 12101)
      219. .AddProperty("ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND", $ELSCOPE_READONLY, 12102)
      220. .AddProperty("ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN", $ELSCOPE_READONLY, 12103)
      221. .AddProperty("ERROR_WINHTTP_HEADER_NOT_FOUND", $ELSCOPE_READONLY, 12150)
      222. .AddProperty("ERROR_WINHTTP_INVALID_SERVER_RESPONSE", $ELSCOPE_READONLY, 12152)
      223. .AddProperty("ERROR_WINHTTP_INVALID_HEADER", $ELSCOPE_READONLY, 12153)
      224. .AddProperty("ERROR_WINHTTP_INVALID_QUERY_REQUEST", $ELSCOPE_READONLY, 12154)
      225. .AddProperty("ERROR_WINHTTP_HEADER_ALREADY_EXISTS", $ELSCOPE_READONLY, 12155)
      226. .AddProperty("ERROR_WINHTTP_REDIRECT_FAILED", $ELSCOPE_READONLY, 12156)
      227. .AddProperty("ERROR_WINHTTP_SECURE_CHANNEL_ERROR", $ELSCOPE_READONLY, 12157)
      228. .AddProperty("ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT", $ELSCOPE_READONLY, 12166)
      229. .AddProperty("ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT", $ELSCOPE_READONLY, 12167)
      230. .AddProperty("ERROR_WINHTTP_SECURE_INVALID_CERT", $ELSCOPE_READONLY, 12169)
      231. .AddProperty("ERROR_WINHTTP_SECURE_CERT_REVOKED", $ELSCOPE_READONLY, 12170)
      232. .AddProperty("ERROR_WINHTTP_NOT_INITIALIZED", $ELSCOPE_READONLY, 12172)
      233. .AddProperty("ERROR_WINHTTP_SECURE_FAILURE", $ELSCOPE_READONLY, 12175)
      234. .AddProperty("ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR", $ELSCOPE_READONLY, 12178)
      235. .AddProperty("ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE", $ELSCOPE_READONLY, 12179)
      236. .AddProperty("ERROR_WINHTTP_AUTODETECTION_FAILED", $ELSCOPE_READONLY, 12180)
      237. .AddProperty("ERROR_WINHTTP_HEADER_COUNT_EXCEEDED", $ELSCOPE_READONLY, 12181)
      238. .AddProperty("ERROR_WINHTTP_HEADER_SIZE_OVERFLOW", $ELSCOPE_READONLY, 12182)
      239. .AddProperty("ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW", $ELSCOPE_READONLY, 12183)
      240. .AddProperty("ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW", $ELSCOPE_READONLY, 12184)
      241. .AddProperty("ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY", $ELSCOPE_READONLY, 12185)
      242. .AddProperty("ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY", $ELSCOPE_READONLY, 12186)
      243. .AddProperty("WINHTTP_ERROR_LAST", $ELSCOPE_READONLY, 12186)
      244. .AddProperty("WINHTTP_QUERY_MIME_VERSION", $ELSCOPE_READONLY, 0)
      245. .AddProperty("WINHTTP_QUERY_CONTENT_TYPE", $ELSCOPE_READONLY, 1)
      246. .AddProperty("WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING", $ELSCOPE_READONLY, 2)
      247. .AddProperty("WINHTTP_QUERY_CONTENT_ID", $ELSCOPE_READONLY, 3)
      248. .AddProperty("WINHTTP_QUERY_CONTENT_DESCRIPTION", $ELSCOPE_READONLY, 4)
      249. .AddProperty("WINHTTP_QUERY_CONTENT_LENGTH", $ELSCOPE_READONLY, 5)
      250. .AddProperty("WINHTTP_QUERY_CONTENT_LANGUAGE", $ELSCOPE_READONLY, 6)
      251. .AddProperty("WINHTTP_QUERY_ALLOW", $ELSCOPE_READONLY, 7)
      252. .AddProperty("WINHTTP_QUERY_PUBLIC", $ELSCOPE_READONLY, 8)
      253. .AddProperty("WINHTTP_QUERY_DATE", $ELSCOPE_READONLY, 9)
      254. .AddProperty("WINHTTP_QUERY_EXPIRES", $ELSCOPE_READONLY, 10)
      255. .AddProperty("WINHTTP_QUERY_LAST_MODIFIED", $ELSCOPE_READONLY, 11)
      256. .AddProperty("WINHTTP_QUERY_MESSAGE_ID", $ELSCOPE_READONLY, 12)
      257. .AddProperty("WINHTTP_QUERY_URI", $ELSCOPE_READONLY, 13)
      258. .AddProperty("WINHTTP_QUERY_DERIVED_FROM", $ELSCOPE_READONLY, 14)
      259. .AddProperty("WINHTTP_QUERY_COST", $ELSCOPE_READONLY, 15)
      260. .AddProperty("WINHTTP_QUERY_LINK", $ELSCOPE_READONLY, 16)
      261. .AddProperty("WINHTTP_QUERY_PRAGMA", $ELSCOPE_READONLY, 17)
      262. .AddProperty("WINHTTP_QUERY_VERSION", $ELSCOPE_READONLY, 18)
      263. .AddProperty("WINHTTP_QUERY_STATUS_CODE", $ELSCOPE_READONLY, 19)
      264. .AddProperty("WINHTTP_QUERY_STATUS_TEXT", $ELSCOPE_READONLY, 20)
      265. .AddProperty("WINHTTP_QUERY_RAW_HEADERS", $ELSCOPE_READONLY, 21)
      266. .AddProperty("WINHTTP_QUERY_RAW_HEADERS_CRLF", $ELSCOPE_READONLY, 22)
      267. .AddProperty("WINHTTP_QUERY_CONNECTION", $ELSCOPE_READONLY, 23)
      268. .AddProperty("WINHTTP_QUERY_ACCEPT", $ELSCOPE_READONLY, 24)
      269. .AddProperty("WINHTTP_QUERY_ACCEPT_CHARSET", $ELSCOPE_READONLY, 25)
      270. .AddProperty("WINHTTP_QUERY_ACCEPT_ENCODING", $ELSCOPE_READONLY, 26)
      271. .AddProperty("WINHTTP_QUERY_ACCEPT_LANGUAGE", $ELSCOPE_READONLY, 27)
      272. .AddProperty("WINHTTP_QUERY_AUTHORIZATION", $ELSCOPE_READONLY, 28)
      273. .AddProperty("WINHTTP_QUERY_CONTENT_ENCODING", $ELSCOPE_READONLY, 29)
      274. .AddProperty("WINHTTP_QUERY_FORWARDED", $ELSCOPE_READONLY, 30)
      275. .AddProperty("WINHTTP_QUERY_FROM", $ELSCOPE_READONLY, 31)
      276. .AddProperty("WINHTTP_QUERY_IF_MODIFIED_SINCE", $ELSCOPE_READONLY, 32)
      277. .AddProperty("WINHTTP_QUERY_LOCATION", $ELSCOPE_READONLY, 33)
      278. .AddProperty("WINHTTP_QUERY_ORIG_URI", $ELSCOPE_READONLY, 34)
      279. .AddProperty("WINHTTP_QUERY_REFERER", $ELSCOPE_READONLY, 35)
      280. .AddProperty("WINHTTP_QUERY_RETRY_AFTER", $ELSCOPE_READONLY, 36)
      281. .AddProperty("WINHTTP_QUERY_SERVER", $ELSCOPE_READONLY, 37)
      282. .AddProperty("WINHTTP_QUERY_TITLE", $ELSCOPE_READONLY, 38)
      283. .AddProperty("WINHTTP_QUERY_USER_AGENT", $ELSCOPE_READONLY, 39)
      284. .AddProperty("WINHTTP_QUERY_WWW_AUTHENTICATE", $ELSCOPE_READONLY, 40)
      285. .AddProperty("WINHTTP_QUERY_PROXY_AUTHENTICATE", $ELSCOPE_READONLY, 41)
      286. .AddProperty("WINHTTP_QUERY_ACCEPT_RANGES", $ELSCOPE_READONLY, 42)
      287. .AddProperty("WINHTTP_QUERY_SET_COOKIE", $ELSCOPE_READONLY, 43)
      288. .AddProperty("WINHTTP_QUERY_COOKIE", $ELSCOPE_READONLY, 44)
      289. .AddProperty("WINHTTP_QUERY_REQUEST_METHOD", $ELSCOPE_READONLY, 45)
      290. .AddProperty("WINHTTP_QUERY_REFRESH", $ELSCOPE_READONLY, 46)
      291. .AddProperty("WINHTTP_QUERY_CONTENT_DISPOSITION", $ELSCOPE_READONLY, 47)
      292. .AddProperty("WINHTTP_QUERY_AGE", $ELSCOPE_READONLY, 48)
      293. .AddProperty("WINHTTP_QUERY_CACHE_CONTROL", $ELSCOPE_READONLY, 49)
      294. .AddProperty("WINHTTP_QUERY_CONTENT_BASE", $ELSCOPE_READONLY, 50)
      295. .AddProperty("WINHTTP_QUERY_CONTENT_LOCATION", $ELSCOPE_READONLY, 51)
      296. .AddProperty("WINHTTP_QUERY_CONTENT_MD5", $ELSCOPE_READONLY, 52)
      297. .AddProperty("WINHTTP_QUERY_CONTENT_RANGE", $ELSCOPE_READONLY, 53)
      298. .AddProperty("WINHTTP_QUERY_ETAG", $ELSCOPE_READONLY, 54)
      299. .AddProperty("WINHTTP_QUERY_HOST", $ELSCOPE_READONLY, 55)
      300. .AddProperty("WINHTTP_QUERY_IF_MATCH", $ELSCOPE_READONLY, 56)
      301. .AddProperty("WINHTTP_QUERY_IF_NONE_MATCH", $ELSCOPE_READONLY, 57)
      302. .AddProperty("WINHTTP_QUERY_IF_RANGE", $ELSCOPE_READONLY, 58)
      303. .AddProperty("WINHTTP_QUERY_IF_UNMODIFIED_SINCE", $ELSCOPE_READONLY, 59)
      304. .AddProperty("WINHTTP_QUERY_MAX_FORWARDS", $ELSCOPE_READONLY, 60)
      305. .AddProperty("WINHTTP_QUERY_PROXY_AUTHORIZATION", $ELSCOPE_READONLY, 61)
      306. .AddProperty("WINHTTP_QUERY_RANGE", $ELSCOPE_READONLY, 62)
      307. .AddProperty("WINHTTP_QUERY_TRANSFER_ENCODING", $ELSCOPE_READONLY, 63)
      308. .AddProperty("WINHTTP_QUERY_UPGRADE", $ELSCOPE_READONLY, 64)
      309. .AddProperty("WINHTTP_QUERY_VARY", $ELSCOPE_READONLY, 65)
      310. .AddProperty("WINHTTP_QUERY_VIA", $ELSCOPE_READONLY, 66)
      311. .AddProperty("WINHTTP_QUERY_WARNING", $ELSCOPE_READONLY, 67)
      312. .AddProperty("WINHTTP_QUERY_EXPECT", $ELSCOPE_READONLY, 68)
      313. .AddProperty("WINHTTP_QUERY_PROXY_CONNECTION", $ELSCOPE_READONLY, 69)
      314. .AddProperty("WINHTTP_QUERY_UNLESS_MODIFIED_SINCE", $ELSCOPE_READONLY, 70)
      315. .AddProperty("WINHTTP_QUERY_PROXY_SUPPORT", $ELSCOPE_READONLY, 75)
      316. .AddProperty("WINHTTP_QUERY_AUTHENTICATION_INFO", $ELSCOPE_READONLY, 76)
      317. .AddProperty("WINHTTP_QUERY_PASSPORT_URLS", $ELSCOPE_READONLY, 77)
      318. .AddProperty("WINHTTP_QUERY_PASSPORT_CONFIG", $ELSCOPE_READONLY, 78)
      319. .AddProperty("WINHTTP_QUERY_MAX", $ELSCOPE_READONLY, 78)
      320. .AddProperty("WINHTTP_QUERY_CUSTOM", $ELSCOPE_READONLY, 65535)
      321. .AddProperty("WINHTTP_QUERY_FLAG_REQUEST_HEADERS", $ELSCOPE_READONLY, 0x80000000)
      322. .AddProperty("WINHTTP_QUERY_FLAG_SYSTEMTIME", $ELSCOPE_READONLY, 0x40000000)
      323. .AddProperty("WINHTTP_QUERY_FLAG_NUMBER", $ELSCOPE_READONLY, 0x20000000)
      324. .AddProperty("WINHTTP_CALLBACK_STATUS_RESOLVING_NAME", $ELSCOPE_READONLY, 0x00000001)
      325. .AddProperty("WINHTTP_CALLBACK_STATUS_NAME_RESOLVED", $ELSCOPE_READONLY, 0x00000002)
      326. .AddProperty("WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER", $ELSCOPE_READONLY, 0x00000004)
      327. .AddProperty("WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER", $ELSCOPE_READONLY, 0x00000008)
      328. .AddProperty("WINHTTP_CALLBACK_STATUS_SENDING_REQUEST", $ELSCOPE_READONLY, 0x00000010)
      329. .AddProperty("WINHTTP_CALLBACK_STATUS_REQUEST_SENT", $ELSCOPE_READONLY, 0x00000020)
      330. .AddProperty("WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE", $ELSCOPE_READONLY, 0x00000040)
      331. .AddProperty("WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED", $ELSCOPE_READONLY, 0x00000080)
      332. .AddProperty("WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION", $ELSCOPE_READONLY, 0x00000100)
      333. .AddProperty("WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED", $ELSCOPE_READONLY, 0x00000200)
      334. .AddProperty("WINHTTP_CALLBACK_STATUS_HANDLE_CREATED", $ELSCOPE_READONLY, 0x00000400)
      335. .AddProperty("WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING", $ELSCOPE_READONLY, 0x00000800)
      336. .AddProperty("WINHTTP_CALLBACK_STATUS_DETECTING_PROXY", $ELSCOPE_READONLY, 0x00001000)
      337. .AddProperty("WINHTTP_CALLBACK_STATUS_REDIRECT", $ELSCOPE_READONLY, 0x00004000)
      338. .AddProperty("WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE", $ELSCOPE_READONLY, 0x00008000)
      339. .AddProperty("WINHTTP_CALLBACK_STATUS_SECURE_FAILURE", $ELSCOPE_READONLY, 0x00010000)
      340. .AddProperty("WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE", $ELSCOPE_READONLY, 0x00020000)
      341. .AddProperty("WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE", $ELSCOPE_READONLY, 0x00040000)
      342. .AddProperty("WINHTTP_CALLBACK_STATUS_READ_COMPLETE", $ELSCOPE_READONLY, 0x00080000)
      343. .AddProperty("WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE", $ELSCOPE_READONLY, 0x00100000)
      344. .AddProperty("WINHTTP_CALLBACK_STATUS_REQUEST_ERROR", $ELSCOPE_READONLY, 0x00200000)
      345. .AddProperty("WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE", $ELSCOPE_READONLY, 0x00400000)
      346. .AddProperty("WINHTTP_CALLBACK_FLAG_RESOLVE_NAME", $ELSCOPE_READONLY, 0x00000003)
      347. .AddProperty("WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER", $ELSCOPE_READONLY, 0x0000000C)
      348. .AddProperty("WINHTTP_CALLBACK_FLAG_SEND_REQUEST", $ELSCOPE_READONLY, 0x00000030)
      349. .AddProperty("WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE", $ELSCOPE_READONLY, 0x000000C0)
      350. .AddProperty("WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION", $ELSCOPE_READONLY, 0x00000300)
      351. .AddProperty("WINHTTP_CALLBACK_FLAG_HANDLES", $ELSCOPE_READONLY, 0x00000C00)
      352. .AddProperty("WINHTTP_CALLBACK_FLAG_DETECTING_PROXY", $ELSCOPE_READONLY, $oSe)
      353. .AddProperty("WINHTTP_CALLBACK_FLAG_REDIRECT", $ELSCOPE_READONLY, $oSelf.)
      354. .AddProperty("WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE", $ELSCOPE_READONLY, $oSelf.)
      355. .AddProperty("WINHTTP_CALLBACK_FLAG_SECURE_FAILURE", $ELSCOPE_READONLY, $oSelf)
      356. .AddProperty("WINHTTP_CALLBACK_FLAG_SENDREQUEST_COMPLETE", $ELSCOPE_READONLY, $oSelf.)
      357. .AddProperty("WINHTTP_CALLBACK_FLAG_HEADERS_AVAILABLE", $ELSCOPE_READONLY, $oSelf.W)
      358. .AddProperty("WINHTTP_CALLBACK_FLAG_DATA_AVAILABLE", $ELSCOPE_READONLY, $oSelf.W)
      359. .AddProperty("WINHTTP_CALLBACK_FLAG_READ_COMPLETE", $ELSCOPE_READONLY, $oSelf.)
      360. .AddProperty("WINHTTP_CALLBACK_FLAG_WRITE_COMPLETE", $ELSCOPE_READONLY, $oSelf.)
      361. .AddProperty("WINHTTP_CALLBACK_FLAG_REQUEST_ERROR", $ELSCOPE_READONLY, $oSe)
      362. .AddProperty("WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS", $ELSCOPE_READONLY, 0x007E0000)
      363. .AddProperty("WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS", $ELSCOPE_READONLY, 0xFFFFFFFF)
      364. .AddProperty("API_RECEIVE_RESPONSE", $ELSCOPE_READONLY, 1)
      365. .AddProperty("API_QUERY_DATA_AVAILABLE", $ELSCOPE_READONLY, 2)
      366. .AddProperty("API_READ_DATA", $ELSCOPE_READONLY, 3)
      367. .AddProperty("API_WRITE_DATA", $ELSCOPE_READONLY, 4)
      368. .AddProperty("API_SEND_REQUEST", $ELSCOPE_READONLY, 5)
      369. .AddProperty("WINHTTP_HANDLE_TYPE_SESSION", $ELSCOPE_READONLY, 1)
      370. .AddProperty("WINHTTP_HANDLE_TYPE_CONNECT", $ELSCOPE_READONLY, 2)
      371. .AddProperty("WINHTTP_HANDLE_TYPE_REQUEST", $ELSCOPE_READONLY, 3)
      372. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED", $ELSCOPE_READONLY, 0x00000001)
      373. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT", $ELSCOPE_READONLY, 0x00000002)
      374. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_CERT_REVOKED", $ELSCOPE_READONLY, 0x00000004)
      375. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA", $ELSCOPE_READONLY, 0x00000008)
      376. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_CERT_CN_INVALID", $ELSCOPE_READONLY, 0x00000010)
      377. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID", $ELSCOPE_READONLY, 0x00000020)
      378. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_CERT_WRONG_USAGE", $ELSCOPE_READONLY, 0x00000040)
      379. .AddProperty("WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR", $ELSCOPE_READONLY, 0x80000000)
      380. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_SSL2", $ELSCOPE_READONLY, 0x00000008)
      381. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_SSL3", $ELSCOPE_READONLY, 0x00000020)
      382. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_TLS1", $ELSCOPE_READONLY, 0x00000080)
      383. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1", $ELSCOPE_READONLY, 0x00000200)
      384. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2", $ELSCOPE_READONLY, 0x00000800)
      385. .AddProperty("WINHTTP_FLAG_SECURE_PROTOCOL_ALL", $ELSCOPE_READONLY, 0x000000A8)
      386. .AddProperty("WINHTTP_AUTH_SCHEME_BASIC", $ELSCOPE_READONLY, 0x00000001)
      387. .AddProperty("WINHTTP_AUTH_SCHEME_NTLM", $ELSCOPE_READONLY, 0x00000002)
      388. .AddProperty("WINHTTP_AUTH_SCHEME_PASSPORT", $ELSCOPE_READONLY, 0x00000004)
      389. .AddProperty("WINHTTP_AUTH_SCHEME_DIGEST", $ELSCOPE_READONLY, 0x00000008)
      390. .AddProperty("WINHTTP_AUTH_SCHEME_NEGOTIATE", $ELSCOPE_READONLY, 0x00000010)
      391. .AddProperty("WINHTTP_AUTH_TARGET_SERVER", $ELSCOPE_READONLY, 0x00000000)
      392. .AddProperty("WINHTTP_AUTH_TARGET_PROXY", $ELSCOPE_READONLY, 0x00000001)
      393. .AddProperty("WINHTTP_AUTOPROXY_AUTO_DETECT", $ELSCOPE_READONLY, 0x00000001)
      394. .AddProperty("WINHTTP_AUTOPROXY_CONFIG_URL", $ELSCOPE_READONLY, 0x00000002)
      395. .AddProperty("WINHTTP_AUTOPROXY_RUN_INPROCESS", $ELSCOPE_READONLY, 0x00010000)
      396. .AddProperty("WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY", $ELSCOPE_READONLY, 0x00020000)
      397. .AddProperty("WINHTTP_AUTO_DETECT_TYPE_DHCP", $ELSCOPE_READONLY, 0x00000001)
      398. .AddProperty("WINHTTP_AUTO_DETECT_TYPE_DNS_A", $ELSCOPE_READONLY, 0x00000002)
      399. ;============>>END>>[GLOBAL/CONST] -> [PUBLIC/PRIVATE PROPERTYS]
      400. EndWith
      401. Return $WinHTTP.Object
      402. EndFunc ;==>WinHTTP_class
      403. Func test($oSelf)
      404. #forceref $oSelf ;
      405. With $oSelf ;
      406. EndWith ;
      407. EndFunc ;==>test
      408. Func _Arbeiten($oSelf, hFile, $Speichern, $Erstellen = 0) ;
      409. #forceref $oSelf ;
      410. With $oSelf ;
      411. .winhttpCode = "#include <winhttp.au3>" & @CRLF & '$hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0")' & @CRLF & '#NoTrayIcon' & @CRLF & @CRLF & 'osnb nrpvzreöenwlozusücr+' & @CRLF & ';Pakete' & @CRLF
      412. .counter = 0
      413. .counter2 = 0
      414. .File = FileRead($hFile) ;Mitsch nitt auslesen
      415. .aPosts = StringSplit($File, "----------------------------------------------------------" & @CRLF, 1) ;pakete trennen
      416. For $c = 1 To UBound($aPosts) - 2 ;Pakete durchlaufen
      417. .aLinks = StringSplit($aPosts[$c], @CRLF, 1) ;Zeilen trennen
      418. If (StringInStr($aLinks[3], '.png') = True) Or (StringInStr($aLinks[3], '.jpg') = True) Or (StringInStr($aLinks[3], '.css') = True) Or (StringInStr($aLinks[3], '.js') = True) Or (StringInStr($aLinks[3], '.xml') = True) Or (StringInStr($aLinks[3], '.gif') = True) Or (StringInStr($aLinks[3], '.swf') = True) Or (StringInStr($aLinks[3], '.ico') = True) Or (StringInStr($aLinks[1], 'safebrowsing.') = True) Then ;Bilder und Java scripts ecetera überspringen
      419. .counter = .counter + 1 ;Zählen der Ausgelassenen Pakete
      420. Else
      421. .sHost = StringReplace($aLinks[4], 'Host: ', "") ;Host lesen
      422. .hConnect = _Host($aLinks, $sHost)
      423. .sReferrer = _RefferalLink($aLinks)
      424. If StringTrimRight($aLinks[3], StringLen($aLinks[3]) - 3) = 'GET' Then
      425. .Link = StringReplace(StringReplace($aLinks[3], "GET ", ""), " HTTP/1.1", "") ; Link lesen
      426. If StringInStr($aLinks[1], "https://") Then
      427. If $Erstellen = 1 Then .winhttpCode = .winhttpCode & '.sHTML = _WinHttpSimpleSSLRequest( $aHosts[' & .hConnect & '][1]' & ', "GET", "' & .Link & '", "' & .sReferrer & '")' & @CRLF & '_FileWrite($sHTML, "", 1)' & @CRLF
      428. Else
      429. If $Erstellen = 1 Then .winhttpCode = .winhttpCode & '.sHTML = _WinHttpSimpleRequest( $aHosts[' & .hConnect & '][1]' & ', "GET", "' & .Link & '", "' & .sReferrer & '")' & @CRLF & '_FileWrite($sHTML, "", 1)' & @CRLF
      430. EndIf
      431. Else
      432. For $cContentLen = 4 To UBound($aLinks) - 2
      433. If StringInStr($aLinks[$cContentLen], 'Content-Length: ') Then
      434. .ContentLength = StringReplace($aLinks[$cContentLen], 'Content-Length: ', "")
      435. ExitLoop
      436. EndIf
      437. .ContentLength = 0
      438. Next
      439. For $cContent = $cContentLen To UBound($aLinks) - 2
      440. If StringLen($aLinks[$cContent]) = .ContentLength Then
      441. .Content = $aLinks[$cContent]
      442. ExitLoop
      443. EndIf
      444. .Content = ""
      445. Next
      446. .Link = StringReplace(StringReplace($aLinks[3], "POST ", ""), " HTTP/1.1", "") ; Link lesen
      447. If StringInStr($aLinks[1], "https://") Then
      448. If $Erstellen = 1 Then .winhttpCode = .winhttpCode & '.sHTML = _WinHttpSimpleSSLRequest( $aHosts[' & .hConnect & '][1]' & ', "POST", "' & .Link & '", "' & .sReferrer & '", "' & .Content & '")' & @CRLF & '_FileWrite($sHTML, "", 1)' & @CRLF
      449. Else
      450. If $Erstellen = 1 Then .winhttpCode = .winhttpCode & '.sHTML = _WinHttpSimpleRequest( $aHosts[' & .hConnect & '][1]' & ', "POST", "' & .Link & '", "' & .sReferrer & '", "' & .Content & '")' & @CRLF & '_FileWrite($sHTML, "", 1)' & @CRLF
      451. EndIf
      452. EndIf
      453. .counter2 = .counter2 + 1 ;Zählen der Geholten Packete
      454. EndIf
      455. Next ;nächstes Packet
      456. If $hFile = '' Then
      457. MsgBox(0, 'ACHTUNG', "Bitte wähle zuerst eine Datei aus")
      458. Else
      459. MsgBox(0, "Resultat", .counter & " Pakete ausgelassen und " & .counter2 & " Pakete geholt von " & .counter2 + .counter & "Paketen")
      460. EndIf
      461. If $Erstellen = 1 Then
      462. .HostsHtml = 'Dim $aHosts[51][2]' & @CRLF & ";Host Array" & @CRLF
      463. For $cHostWrite = 0 To 50
      464. If $aHosts[$cHostWrite][0] = "" Then
      465. .HostsHtml = StringReplace($HostsHtml, 'Dim $aHosts[51][2]' & @CRLF & ";Host Array", 'Dim $aHosts[' & $cHostWrite & '][2]' & @CRLF & ";Host Array")
      466. ExitLoop
      467. EndIf
      468. .HostsHtml = .HostsHtml & '$aHosts[' & $cHostWrite & '][0] = "' & $aHosts[$cHostWrite][0] & '"' & @CRLF
      469. .HostsHtml = .HostsHtml & '$aHosts[' & $cHostWrite & '][1] = ' & '_WinHttpConnect($hSession, $aHosts[' & $cHostWrite & '][0])' & @CRLF
      470. Next
      471. .winhttpCode = StringReplace($winhttpCode, 'osnb nrpvzreöenwlozusücr+', $HostsHtml)
      472. .winhttpCode &= @CRLF & @CRLF & _
      473. 'Func _FileWrite($sHTML, $Zusatz = "", $Write = 0)' & @CRLF & _
      474. ' If Not IsDeclared("c_Filewrite") Then Global $c_Filewrite = 1' & @CRLF & _
      475. ' ConsoleWrite($c_Filewrite & "LikeNet" & $Zusatz & @CRLF)' & @CRLF & _
      476. ' If $Write = 1 Then' & @CRLF & _
      477. ' FileDelete($c_Filewrite & "LikeNet" & $Zusatz & ".html")' & @CRLF & _
      478. ' FileWrite($c_Filewrite & "LikeNet" & $Zusatz & ".html", $sHTML) ' & @CRLF & _
      479. ' EndIf' & @CRLF & _
      480. ' $c_Filewrite += 1' & @CRLF & _
      481. 'EndFunc ;==>_FileWrite' & @CRLF
      482. FileDelete(@ScriptDir & '\Testhtml.au3')
      483. FileWrite(@ScriptDir & '\Testhtml.au3', $winhttpCode)
      484. EndIf
      485. EndWith ;
      486. EndFunc ;==>_Arbeiten
      487. Func _RefferalLink($oSelf, aLinks) ;
      488. #forceref $oSelf ;
      489. With $oSelf ;
      490. For $cRefer = 4 To UBound($aLinks) - 2 ;RefferalLink
      491. If StringInStr($aLinks[$cRefer], 'Referer:') Then ;RefferalLink
      492. .sReferrer = StringReplace($aLinks[$cRefer], 'Referer: ', "") ;RefferalLink
      493. ExitLoop ;RefferalLink
      494. EndIf ;RefferalLink
      495. .sReferrer = ""
      496. Next ;RefferalLink
      497. Return $sReferrer
      498. EndWith ;
      499. EndFunc ;==>_RefferalLink
      500. Func _Host($oSelf, aLinks, $sHost) ;
      501. #forceref $oSelf ;
      502. With $oSelf ;
      503. For $cHost = 0 To 50 ;HostArray
      504. If $aHosts[$cHost][0] = .sHost Then
      505. .hConnect = $cHost
      506. ExitLoop
      507. Else
      508. If $aHosts[$cHost][0] = "" Then
      509. $aHosts[$cHost][1] = _WinHttpConnect($hSession, $sHost)
      510. $aHosts[$cHost][0] = $sHost
      511. .hConnect = $cHost
      512. ExitLoop
      513. EndIf
      514. EndIf
      515. Next
      516. Return $hConnect
      517. EndWith ;
      518. EndFunc ;==>_Host
      519. Func _Get($oSelf, Host, $sLink, $sReferrer) ;
      520. #forceref $oSelf ;
      521. With $oSelf ;
      522. .sHTML = _WinHttpSimpleRequest($Host, "GET", $sLink, $sReferrer)
      523. Return $sHTML
      524. EndWith ;
      525. EndFunc ;==>_Get
      526. Func _Post($oSelf, Host, $sLink, $sReferrer, $sContent) ;
      527. #forceref $oSelf ;
      528. With $oSelf ;
      529. .sHTML = _WinHttpSimpleRequest($Host, "POST", $sLink, $sReferrer, $sContent)
      530. Return $sHTML
      531. EndWith ;
      532. EndFunc ;==>_Post
      533. Func _FileErstellen($oSelf, hFile) ;
      534. #forceref $oSelf ;
      535. With $oSelf ;
      536. _Arbeiten($hFile, 0, 1)
      537. EndWith ;
      538. EndFunc ;==>_FileErstellen
      539. Func _ende($oSelf)
      540. #forceref $oSelf ;
      541. With $oSelf ;
      542. For $cHost = 0 To 50
      543. _WinHttpCloseHandle($aHosts[$cHost][1])
      544. Next
      545. _WinHttpCloseHandle($hSession)
      546. EndWith ;
      547. EndFunc ;==>_ende





      Feedback ist SEHR erwünscht..

      [BUGLISTE]

      Quellcode

      1. - get varaibles even through linebreak not working yet</strong>
      2. - get more variables from one line, yet only one is working</strong>
      3. - arrays sometimes will be shown weird, like ".addProperty( "aTestProperty[" & .bTestProperty[0][1 & "]", public/private, "value" ]


      [HISTORIE]
      - 0.8 public alpha {
      > first public version
      > Reads an Entire .au3 script and tries to Split FUNCTIONS and VARIABLE DECLARATIONS into CLASSES, OBJECTS, PROPERTY and METHODS.
      > Works realy good yet if you dont write too obfuscated :P
      > MULTI DEKLARATIONS dont work yet
      > DEKLARATIONS With a LINKEBREAK dont work yet
      }
      [/code]
      Dateien

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Busti“ ()