librex 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (435) hide show
  1. data/README.markdown +1 -1
  2. metadata +3 -436
  3. data/lib/rex/LICENSE +0 -29
  4. data/lib/rex/arch.rb +0 -103
  5. data/lib/rex/arch/sparc.rb +0 -75
  6. data/lib/rex/arch/sparc.rb.ut.rb +0 -18
  7. data/lib/rex/arch/x86.rb +0 -513
  8. data/lib/rex/arch/x86.rb.ut.rb +0 -93
  9. data/lib/rex/assembly/nasm.rb +0 -104
  10. data/lib/rex/assembly/nasm.rb.ut.rb +0 -22
  11. data/lib/rex/codepage.map +0 -104
  12. data/lib/rex/compat.rb +0 -311
  13. data/lib/rex/constants.rb +0 -113
  14. data/lib/rex/elfparsey.rb +0 -11
  15. data/lib/rex/elfparsey/elf.rb +0 -123
  16. data/lib/rex/elfparsey/elfbase.rb +0 -258
  17. data/lib/rex/elfparsey/exceptions.rb +0 -27
  18. data/lib/rex/elfscan.rb +0 -12
  19. data/lib/rex/elfscan/scanner.rb +0 -207
  20. data/lib/rex/elfscan/search.rb +0 -46
  21. data/lib/rex/encoder/alpha2.rb +0 -31
  22. data/lib/rex/encoder/alpha2/alpha_mixed.rb +0 -68
  23. data/lib/rex/encoder/alpha2/alpha_upper.rb +0 -79
  24. data/lib/rex/encoder/alpha2/generic.rb +0 -114
  25. data/lib/rex/encoder/alpha2/unicode_mixed.rb +0 -117
  26. data/lib/rex/encoder/alpha2/unicode_upper.rb +0 -129
  27. data/lib/rex/encoder/ndr.rb +0 -89
  28. data/lib/rex/encoder/ndr.rb.ut.rb +0 -44
  29. data/lib/rex/encoder/nonalpha.rb +0 -61
  30. data/lib/rex/encoder/nonupper.rb +0 -64
  31. data/lib/rex/encoder/xdr.rb +0 -106
  32. data/lib/rex/encoder/xdr.rb.ut.rb +0 -29
  33. data/lib/rex/encoder/xor.rb +0 -69
  34. data/lib/rex/encoder/xor/dword.rb +0 -13
  35. data/lib/rex/encoder/xor/dword_additive.rb +0 -13
  36. data/lib/rex/encoders/xor_dword.rb +0 -35
  37. data/lib/rex/encoders/xor_dword_additive.rb +0 -53
  38. data/lib/rex/encoders/xor_dword_additive.rb.ut.rb +0 -12
  39. data/lib/rex/encoding/xor.rb +0 -20
  40. data/lib/rex/encoding/xor.rb.ts.rb +0 -14
  41. data/lib/rex/encoding/xor/byte.rb +0 -15
  42. data/lib/rex/encoding/xor/byte.rb.ut.rb +0 -21
  43. data/lib/rex/encoding/xor/dword.rb +0 -21
  44. data/lib/rex/encoding/xor/dword.rb.ut.rb +0 -15
  45. data/lib/rex/encoding/xor/dword_additive.rb +0 -92
  46. data/lib/rex/encoding/xor/dword_additive.rb.ut.rb +0 -15
  47. data/lib/rex/encoding/xor/exceptions.rb +0 -17
  48. data/lib/rex/encoding/xor/generic.rb +0 -146
  49. data/lib/rex/encoding/xor/generic.rb.ut.rb +0 -120
  50. data/lib/rex/encoding/xor/qword.rb +0 -15
  51. data/lib/rex/encoding/xor/word.rb +0 -21
  52. data/lib/rex/encoding/xor/word.rb.ut.rb +0 -13
  53. data/lib/rex/exceptions.rb +0 -275
  54. data/lib/rex/exceptions.rb.ut.rb +0 -44
  55. data/lib/rex/exploitation/cmdstager.rb +0 -9
  56. data/lib/rex/exploitation/cmdstager/base.rb +0 -175
  57. data/lib/rex/exploitation/cmdstager/debug_asm.rb +0 -142
  58. data/lib/rex/exploitation/cmdstager/debug_write.rb +0 -136
  59. data/lib/rex/exploitation/cmdstager/tftp.rb +0 -63
  60. data/lib/rex/exploitation/cmdstager/vbs.rb +0 -128
  61. data/lib/rex/exploitation/egghunter.rb +0 -277
  62. data/lib/rex/exploitation/egghunter.rb.ut.rb +0 -25
  63. data/lib/rex/exploitation/encryptjs.rb +0 -77
  64. data/lib/rex/exploitation/heaplib.js.b64 +0 -331
  65. data/lib/rex/exploitation/heaplib.rb +0 -94
  66. data/lib/rex/exploitation/javascriptosdetect.rb +0 -897
  67. data/lib/rex/exploitation/obfuscatejs.rb +0 -335
  68. data/lib/rex/exploitation/omelet.rb +0 -320
  69. data/lib/rex/exploitation/omelet.rb.ut.rb +0 -13
  70. data/lib/rex/exploitation/opcodedb.rb +0 -818
  71. data/lib/rex/exploitation/opcodedb.rb.ut.rb +0 -279
  72. data/lib/rex/exploitation/seh.rb +0 -92
  73. data/lib/rex/exploitation/seh.rb.ut.rb +0 -19
  74. data/lib/rex/file.rb +0 -112
  75. data/lib/rex/file.rb.ut.rb +0 -16
  76. data/lib/rex/image_source.rb +0 -12
  77. data/lib/rex/image_source/disk.rb +0 -60
  78. data/lib/rex/image_source/image_source.rb +0 -46
  79. data/lib/rex/image_source/memory.rb +0 -37
  80. data/lib/rex/io/bidirectional_pipe.rb +0 -157
  81. data/lib/rex/io/datagram_abstraction.rb +0 -35
  82. data/lib/rex/io/ring_buffer.rb +0 -364
  83. data/lib/rex/io/stream.rb +0 -319
  84. data/lib/rex/io/stream_abstraction.rb +0 -197
  85. data/lib/rex/io/stream_server.rb +0 -211
  86. data/lib/rex/job_container.rb +0 -187
  87. data/lib/rex/logging.rb +0 -4
  88. data/lib/rex/logging/log_dispatcher.rb +0 -179
  89. data/lib/rex/logging/log_sink.rb +0 -42
  90. data/lib/rex/logging/sinks/flatfile.rb +0 -55
  91. data/lib/rex/logging/sinks/stderr.rb +0 -43
  92. data/lib/rex/machparsey.rb +0 -9
  93. data/lib/rex/machparsey/exceptions.rb +0 -34
  94. data/lib/rex/machparsey/mach.rb +0 -209
  95. data/lib/rex/machparsey/machbase.rb +0 -408
  96. data/lib/rex/machscan.rb +0 -9
  97. data/lib/rex/machscan/scanner.rb +0 -217
  98. data/lib/rex/mime.rb +0 -9
  99. data/lib/rex/mime/header.rb +0 -77
  100. data/lib/rex/mime/message.rb +0 -144
  101. data/lib/rex/mime/part.rb +0 -20
  102. data/lib/rex/nop/opty2.rb +0 -108
  103. data/lib/rex/nop/opty2.rb.ut.rb +0 -23
  104. data/lib/rex/nop/opty2_tables.rb +0 -300
  105. data/lib/rex/ole.rb +0 -205
  106. data/lib/rex/ole/clsid.rb +0 -47
  107. data/lib/rex/ole/difat.rb +0 -141
  108. data/lib/rex/ole/directory.rb +0 -231
  109. data/lib/rex/ole/direntry.rb +0 -240
  110. data/lib/rex/ole/docs/dependencies.txt +0 -8
  111. data/lib/rex/ole/docs/references.txt +0 -1
  112. data/lib/rex/ole/fat.rb +0 -99
  113. data/lib/rex/ole/header.rb +0 -204
  114. data/lib/rex/ole/minifat.rb +0 -77
  115. data/lib/rex/ole/propset.rb +0 -144
  116. data/lib/rex/ole/samples/create_ole.rb +0 -27
  117. data/lib/rex/ole/samples/dir.rb +0 -35
  118. data/lib/rex/ole/samples/dump_stream.rb +0 -34
  119. data/lib/rex/ole/samples/ole_info.rb +0 -23
  120. data/lib/rex/ole/storage.rb +0 -395
  121. data/lib/rex/ole/stream.rb +0 -53
  122. data/lib/rex/ole/substorage.rb +0 -49
  123. data/lib/rex/ole/util.rb +0 -157
  124. data/lib/rex/parser/arguments.rb +0 -97
  125. data/lib/rex/parser/arguments.rb.ut.rb +0 -67
  126. data/lib/rex/parser/ini.rb +0 -185
  127. data/lib/rex/parser/ini.rb.ut.rb +0 -29
  128. data/lib/rex/parser/ip360_aspl_xml.rb +0 -102
  129. data/lib/rex/parser/ip360_xml.rb +0 -97
  130. data/lib/rex/parser/nessus_xml.rb +0 -118
  131. data/lib/rex/parser/netsparker_xml.rb +0 -94
  132. data/lib/rex/parser/nexpose_xml.rb +0 -136
  133. data/lib/rex/parser/nmap_xml.rb +0 -137
  134. data/lib/rex/parser/retina_xml.rb +0 -109
  135. data/lib/rex/payloads.rb +0 -1
  136. data/lib/rex/payloads/win32.rb +0 -2
  137. data/lib/rex/payloads/win32/common.rb +0 -26
  138. data/lib/rex/payloads/win32/kernel.rb +0 -53
  139. data/lib/rex/payloads/win32/kernel/common.rb +0 -54
  140. data/lib/rex/payloads/win32/kernel/migration.rb +0 -12
  141. data/lib/rex/payloads/win32/kernel/recovery.rb +0 -50
  142. data/lib/rex/payloads/win32/kernel/stager.rb +0 -194
  143. data/lib/rex/peparsey.rb +0 -12
  144. data/lib/rex/peparsey/exceptions.rb +0 -32
  145. data/lib/rex/peparsey/pe.rb +0 -212
  146. data/lib/rex/peparsey/pe_memdump.rb +0 -63
  147. data/lib/rex/peparsey/pebase.rb +0 -1680
  148. data/lib/rex/peparsey/section.rb +0 -136
  149. data/lib/rex/pescan.rb +0 -13
  150. data/lib/rex/pescan/analyze.rb +0 -309
  151. data/lib/rex/pescan/scanner.rb +0 -206
  152. data/lib/rex/pescan/search.rb +0 -56
  153. data/lib/rex/platforms.rb +0 -1
  154. data/lib/rex/platforms/windows.rb +0 -51
  155. data/lib/rex/poly.rb +0 -132
  156. data/lib/rex/poly/block.rb +0 -477
  157. data/lib/rex/poly/register.rb +0 -100
  158. data/lib/rex/poly/register/x86.rb +0 -40
  159. data/lib/rex/post.rb +0 -8
  160. data/lib/rex/post/dir.rb +0 -51
  161. data/lib/rex/post/file.rb +0 -172
  162. data/lib/rex/post/file_stat.rb +0 -220
  163. data/lib/rex/post/gen.pl +0 -13
  164. data/lib/rex/post/io.rb +0 -182
  165. data/lib/rex/post/meterpreter.rb +0 -4
  166. data/lib/rex/post/meterpreter/channel.rb +0 -445
  167. data/lib/rex/post/meterpreter/channel_container.rb +0 -54
  168. data/lib/rex/post/meterpreter/channels/pool.rb +0 -160
  169. data/lib/rex/post/meterpreter/channels/pools/file.rb +0 -62
  170. data/lib/rex/post/meterpreter/channels/pools/stream_pool.rb +0 -103
  171. data/lib/rex/post/meterpreter/channels/stream.rb +0 -87
  172. data/lib/rex/post/meterpreter/client.rb +0 -364
  173. data/lib/rex/post/meterpreter/client_core.rb +0 -274
  174. data/lib/rex/post/meterpreter/dependencies.rb +0 -3
  175. data/lib/rex/post/meterpreter/extension.rb +0 -32
  176. data/lib/rex/post/meterpreter/extensions/espia/espia.rb +0 -58
  177. data/lib/rex/post/meterpreter/extensions/espia/tlv.rb +0 -16
  178. data/lib/rex/post/meterpreter/extensions/incognito/incognito.rb +0 -94
  179. data/lib/rex/post/meterpreter/extensions/incognito/tlv.rb +0 -21
  180. data/lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb +0 -57
  181. data/lib/rex/post/meterpreter/extensions/networkpug/tlv.rb +0 -15
  182. data/lib/rex/post/meterpreter/extensions/priv/fs.rb +0 -118
  183. data/lib/rex/post/meterpreter/extensions/priv/passwd.rb +0 -61
  184. data/lib/rex/post/meterpreter/extensions/priv/priv.rb +0 -111
  185. data/lib/rex/post/meterpreter/extensions/priv/tlv.rb +0 -28
  186. data/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb +0 -101
  187. data/lib/rex/post/meterpreter/extensions/sniffer/tlv.rb +0 -26
  188. data/lib/rex/post/meterpreter/extensions/stdapi/constants.rb +0 -333
  189. data/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb +0 -282
  190. data/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +0 -266
  191. data/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb +0 -103
  192. data/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb +0 -48
  193. data/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb +0 -144
  194. data/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb +0 -73
  195. data/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb +0 -56
  196. data/lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb +0 -137
  197. data/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb +0 -180
  198. data/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb +0 -167
  199. data/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb +0 -208
  200. data/lib/rex/post/meterpreter/extensions/stdapi/railgun.rb.ts.rb +0 -6
  201. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb +0 -38106
  202. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb +0 -31
  203. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/buffer_item.rb +0 -47
  204. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/buffer_item.rb.ut.rb +0 -36
  205. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb +0 -1818
  206. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_iphlpapi.rb +0 -96
  207. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_kernel32.rb +0 -3848
  208. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_netapi32.rb +0 -26
  209. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ntdll.rb +0 -153
  210. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_shell32.rb +0 -21
  211. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_user32.rb +0 -3169
  212. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ws2_32.rb +0 -599
  213. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb +0 -318
  214. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb +0 -100
  215. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb.ut.rb +0 -42
  216. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb +0 -148
  217. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb.ut.rb +0 -127
  218. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb +0 -309
  219. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb +0 -204
  220. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/tlv.rb +0 -51
  221. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb +0 -630
  222. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/win_const_manager.rb +0 -75
  223. data/lib/rex/post/meterpreter/extensions/stdapi/railgun/win_const_manager.rb.ut.rb +0 -103
  224. data/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb +0 -149
  225. data/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +0 -97
  226. data/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb +0 -192
  227. data/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb +0 -41
  228. data/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb +0 -61
  229. data/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +0 -370
  230. data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb +0 -129
  231. data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb +0 -55
  232. data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb +0 -336
  233. data/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb +0 -141
  234. data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb +0 -279
  235. data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb +0 -193
  236. data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb +0 -102
  237. data/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb +0 -180
  238. data/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb +0 -211
  239. data/lib/rex/post/meterpreter/extensions/stdapi/ui.rb +0 -227
  240. data/lib/rex/post/meterpreter/extensions/stdapi/webcam/webcam.rb +0 -63
  241. data/lib/rex/post/meterpreter/inbound_packet_handler.rb +0 -30
  242. data/lib/rex/post/meterpreter/object_aliases.rb +0 -83
  243. data/lib/rex/post/meterpreter/packet.rb +0 -688
  244. data/lib/rex/post/meterpreter/packet_dispatcher.rb +0 -431
  245. data/lib/rex/post/meterpreter/packet_parser.rb +0 -94
  246. data/lib/rex/post/meterpreter/packet_response_waiter.rb +0 -83
  247. data/lib/rex/post/meterpreter/ui/console.rb +0 -137
  248. data/lib/rex/post/meterpreter/ui/console/command_dispatcher.rb +0 -62
  249. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +0 -730
  250. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb +0 -108
  251. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/incognito.rb +0 -241
  252. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/networkpug.rb +0 -231
  253. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv.rb +0 -61
  254. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/elevate.rb +0 -98
  255. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/passwd.rb +0 -51
  256. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb +0 -132
  257. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb +0 -187
  258. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi.rb +0 -65
  259. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb +0 -442
  260. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb +0 -298
  261. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb +0 -486
  262. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb +0 -315
  263. data/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/webcam.rb +0 -157
  264. data/lib/rex/post/meterpreter/ui/console/interactive_channel.rb +0 -95
  265. data/lib/rex/post/permission.rb +0 -26
  266. data/lib/rex/post/process.rb +0 -57
  267. data/lib/rex/post/thread.rb +0 -57
  268. data/lib/rex/post/ui.rb +0 -52
  269. data/lib/rex/proto.rb +0 -13
  270. data/lib/rex/proto.rb.ts.rb +0 -8
  271. data/lib/rex/proto/dcerpc.rb +0 -6
  272. data/lib/rex/proto/dcerpc.rb.ts.rb +0 -9
  273. data/lib/rex/proto/dcerpc/client.rb +0 -361
  274. data/lib/rex/proto/dcerpc/client.rb.ut.rb +0 -491
  275. data/lib/rex/proto/dcerpc/exceptions.rb +0 -150
  276. data/lib/rex/proto/dcerpc/handle.rb +0 -47
  277. data/lib/rex/proto/dcerpc/handle.rb.ut.rb +0 -85
  278. data/lib/rex/proto/dcerpc/ndr.rb +0 -72
  279. data/lib/rex/proto/dcerpc/ndr.rb.ut.rb +0 -41
  280. data/lib/rex/proto/dcerpc/packet.rb +0 -253
  281. data/lib/rex/proto/dcerpc/packet.rb.ut.rb +0 -56
  282. data/lib/rex/proto/dcerpc/response.rb +0 -187
  283. data/lib/rex/proto/dcerpc/response.rb.ut.rb +0 -15
  284. data/lib/rex/proto/dcerpc/uuid.rb +0 -84
  285. data/lib/rex/proto/dcerpc/uuid.rb.ut.rb +0 -46
  286. data/lib/rex/proto/dhcp.rb +0 -7
  287. data/lib/rex/proto/dhcp/constants.rb +0 -33
  288. data/lib/rex/proto/dhcp/server.rb +0 -292
  289. data/lib/rex/proto/drda.rb +0 -5
  290. data/lib/rex/proto/drda.rb.ts.rb +0 -17
  291. data/lib/rex/proto/drda/constants.rb +0 -49
  292. data/lib/rex/proto/drda/constants.rb.ut.rb +0 -23
  293. data/lib/rex/proto/drda/packet.rb +0 -252
  294. data/lib/rex/proto/drda/packet.rb.ut.rb +0 -109
  295. data/lib/rex/proto/drda/utils.rb +0 -123
  296. data/lib/rex/proto/drda/utils.rb.ut.rb +0 -84
  297. data/lib/rex/proto/http.rb +0 -5
  298. data/lib/rex/proto/http.rb.ts.rb +0 -12
  299. data/lib/rex/proto/http/client.rb +0 -821
  300. data/lib/rex/proto/http/client.rb.ut.rb +0 -95
  301. data/lib/rex/proto/http/handler.rb +0 -46
  302. data/lib/rex/proto/http/handler/erb.rb +0 -128
  303. data/lib/rex/proto/http/handler/erb.rb.ut.rb +0 -21
  304. data/lib/rex/proto/http/handler/erb.rb.ut.rb.rhtml +0 -1
  305. data/lib/rex/proto/http/handler/proc.rb +0 -60
  306. data/lib/rex/proto/http/handler/proc.rb.ut.rb +0 -24
  307. data/lib/rex/proto/http/header.rb +0 -161
  308. data/lib/rex/proto/http/header.rb.ut.rb +0 -46
  309. data/lib/rex/proto/http/packet.rb +0 -407
  310. data/lib/rex/proto/http/packet.rb.ut.rb +0 -165
  311. data/lib/rex/proto/http/request.rb +0 -356
  312. data/lib/rex/proto/http/request.rb.ut.rb +0 -214
  313. data/lib/rex/proto/http/response.rb +0 -90
  314. data/lib/rex/proto/http/response.rb.ut.rb +0 -149
  315. data/lib/rex/proto/http/server.rb +0 -369
  316. data/lib/rex/proto/http/server.rb.ut.rb +0 -79
  317. data/lib/rex/proto/ntlm.rb +0 -7
  318. data/lib/rex/proto/ntlm.rb.ut.rb +0 -177
  319. data/lib/rex/proto/ntlm/base.rb +0 -326
  320. data/lib/rex/proto/ntlm/constants.rb +0 -74
  321. data/lib/rex/proto/ntlm/crypt.rb +0 -415
  322. data/lib/rex/proto/ntlm/exceptions.rb +0 -16
  323. data/lib/rex/proto/ntlm/message.rb +0 -536
  324. data/lib/rex/proto/ntlm/utils.rb +0 -764
  325. data/lib/rex/proto/proxy/socks4a.rb +0 -440
  326. data/lib/rex/proto/rfb.rb +0 -19
  327. data/lib/rex/proto/rfb.rb.ut.rb +0 -37
  328. data/lib/rex/proto/rfb/cipher.rb +0 -84
  329. data/lib/rex/proto/rfb/client.rb +0 -207
  330. data/lib/rex/proto/rfb/constants.rb +0 -52
  331. data/lib/rex/proto/smb.rb +0 -7
  332. data/lib/rex/proto/smb.rb.ts.rb +0 -8
  333. data/lib/rex/proto/smb/client.rb +0 -1952
  334. data/lib/rex/proto/smb/client.rb.ut.rb +0 -223
  335. data/lib/rex/proto/smb/constants.rb +0 -1047
  336. data/lib/rex/proto/smb/constants.rb.ut.rb +0 -18
  337. data/lib/rex/proto/smb/crypt.rb +0 -36
  338. data/lib/rex/proto/smb/evasions.rb +0 -66
  339. data/lib/rex/proto/smb/exceptions.rb +0 -858
  340. data/lib/rex/proto/smb/simpleclient.rb +0 -306
  341. data/lib/rex/proto/smb/simpleclient.rb.ut.rb +0 -128
  342. data/lib/rex/proto/smb/utils.rb +0 -103
  343. data/lib/rex/proto/smb/utils.rb.ut.rb +0 -20
  344. data/lib/rex/proto/sunrpc.rb +0 -1
  345. data/lib/rex/proto/sunrpc/client.rb +0 -195
  346. data/lib/rex/proto/tftp.rb +0 -12
  347. data/lib/rex/proto/tftp/constants.rb +0 -39
  348. data/lib/rex/proto/tftp/server.rb +0 -497
  349. data/lib/rex/proto/tftp/server.rb.ut.rb +0 -28
  350. data/lib/rex/script.rb +0 -42
  351. data/lib/rex/script/base.rb +0 -59
  352. data/lib/rex/script/meterpreter.rb +0 -15
  353. data/lib/rex/script/shell.rb +0 -9
  354. data/lib/rex/service.rb +0 -48
  355. data/lib/rex/service_manager.rb +0 -141
  356. data/lib/rex/service_manager.rb.ut.rb +0 -32
  357. data/lib/rex/services/local_relay.rb +0 -423
  358. data/lib/rex/socket.rb +0 -684
  359. data/lib/rex/socket.rb.ut.rb +0 -107
  360. data/lib/rex/socket/comm.rb +0 -119
  361. data/lib/rex/socket/comm/local.rb +0 -412
  362. data/lib/rex/socket/comm/local.rb.ut.rb +0 -75
  363. data/lib/rex/socket/ip.rb +0 -130
  364. data/lib/rex/socket/parameters.rb +0 -345
  365. data/lib/rex/socket/parameters.rb.ut.rb +0 -51
  366. data/lib/rex/socket/range_walker.rb +0 -346
  367. data/lib/rex/socket/range_walker.rb.ut.rb +0 -55
  368. data/lib/rex/socket/ssl_tcp.rb +0 -184
  369. data/lib/rex/socket/ssl_tcp.rb.ut.rb +0 -39
  370. data/lib/rex/socket/ssl_tcp_server.rb +0 -122
  371. data/lib/rex/socket/ssl_tcp_server.rb.ut.rb +0 -61
  372. data/lib/rex/socket/subnet_walker.rb +0 -75
  373. data/lib/rex/socket/subnet_walker.rb.ut.rb +0 -28
  374. data/lib/rex/socket/switch_board.rb +0 -278
  375. data/lib/rex/socket/switch_board.rb.ut.rb +0 -52
  376. data/lib/rex/socket/tcp.rb +0 -76
  377. data/lib/rex/socket/tcp.rb.ut.rb +0 -64
  378. data/lib/rex/socket/tcp_server.rb +0 -66
  379. data/lib/rex/socket/tcp_server.rb.ut.rb +0 -44
  380. data/lib/rex/socket/udp.rb +0 -164
  381. data/lib/rex/socket/udp.rb.ut.rb +0 -44
  382. data/lib/rex/struct2.rb +0 -5
  383. data/lib/rex/struct2/c_struct.rb +0 -181
  384. data/lib/rex/struct2/c_struct_template.rb +0 -39
  385. data/lib/rex/struct2/constant.rb +0 -26
  386. data/lib/rex/struct2/element.rb +0 -44
  387. data/lib/rex/struct2/generic.rb +0 -73
  388. data/lib/rex/struct2/restraint.rb +0 -54
  389. data/lib/rex/struct2/s_string.rb +0 -72
  390. data/lib/rex/struct2/s_struct.rb +0 -111
  391. data/lib/rex/sync.rb +0 -6
  392. data/lib/rex/sync/event.rb +0 -94
  393. data/lib/rex/sync/read_write_lock.rb +0 -176
  394. data/lib/rex/sync/ref.rb +0 -57
  395. data/lib/rex/sync/thread_safe.rb +0 -82
  396. data/lib/rex/test.rb +0 -35
  397. data/lib/rex/text.rb +0 -1163
  398. data/lib/rex/text.rb.ut.rb +0 -190
  399. data/lib/rex/thread_factory.rb +0 -42
  400. data/lib/rex/time.rb +0 -65
  401. data/lib/rex/transformer.rb +0 -115
  402. data/lib/rex/transformer.rb.ut.rb +0 -38
  403. data/lib/rex/ui.rb +0 -21
  404. data/lib/rex/ui/interactive.rb +0 -298
  405. data/lib/rex/ui/output.rb +0 -78
  406. data/lib/rex/ui/output/none.rb +0 -18
  407. data/lib/rex/ui/progress_tracker.rb +0 -96
  408. data/lib/rex/ui/subscriber.rb +0 -149
  409. data/lib/rex/ui/text/color.rb +0 -97
  410. data/lib/rex/ui/text/color.rb.ut.rb +0 -18
  411. data/lib/rex/ui/text/dispatcher_shell.rb +0 -467
  412. data/lib/rex/ui/text/input.rb +0 -117
  413. data/lib/rex/ui/text/input/buffer.rb +0 -75
  414. data/lib/rex/ui/text/input/readline.rb +0 -129
  415. data/lib/rex/ui/text/input/socket.rb +0 -95
  416. data/lib/rex/ui/text/input/stdio.rb +0 -45
  417. data/lib/rex/ui/text/irb_shell.rb +0 -57
  418. data/lib/rex/ui/text/output.rb +0 -80
  419. data/lib/rex/ui/text/output/buffer.rb +0 -61
  420. data/lib/rex/ui/text/output/file.rb +0 -43
  421. data/lib/rex/ui/text/output/socket.rb +0 -43
  422. data/lib/rex/ui/text/output/stdio.rb +0 -40
  423. data/lib/rex/ui/text/progress_tracker.rb +0 -56
  424. data/lib/rex/ui/text/progress_tracker.rb.ut.rb +0 -34
  425. data/lib/rex/ui/text/shell.rb +0 -328
  426. data/lib/rex/ui/text/table.rb +0 -279
  427. data/lib/rex/ui/text/table.rb.ut.rb +0 -55
  428. data/lib/rex/zip.rb +0 -93
  429. data/lib/rex/zip/archive.rb +0 -184
  430. data/lib/rex/zip/blocks.rb +0 -182
  431. data/lib/rex/zip/entry.rb +0 -104
  432. data/lib/rex/zip/samples/comment.rb +0 -32
  433. data/lib/rex/zip/samples/mkwar.rb +0 -138
  434. data/lib/rex/zip/samples/mkzip.rb +0 -19
  435. data/lib/rex/zip/samples/recursive.rb +0 -58
@@ -1,94 +0,0 @@
1
- require 'rex/text'
2
- require 'rex/exploitation/obfuscatejs'
3
-
4
- module Rex
5
- module Exploitation
6
-
7
- #
8
- # Encapsulates the generation of the Alexander Sotirov's HeapLib javascript
9
- # stub
10
- #
11
- class HeapLib
12
-
13
- #
14
- # The source file to load the javascript from
15
- #
16
- JavascriptFile = File.join(File.dirname(__FILE__), "heaplib.js.b64")
17
-
18
- #
19
- # The list of symbols found in the file. This is used to dynamically
20
- # replace contents.
21
- #
22
- SymbolNames =
23
- {
24
- "Methods" =>
25
- [
26
- "vtable",
27
- "lookasideAddr",
28
- "lookaside",
29
- "freeList",
30
- "gc",
31
- "flushOleaut32",
32
- "freeOleaut32",
33
- "allocOleaut32",
34
- "free",
35
- "alloc",
36
- "addr",
37
- "hex",
38
- "round",
39
- "paddingStr",
40
- "padding",
41
- "debugBreak",
42
- "debugHeap",
43
- "debug",
44
- ],
45
- "Classes" =>
46
- [
47
- { 'Namespace' => "heapLib", 'Class' => "ie" }
48
- ],
49
- "Namespaces" =>
50
- [
51
- "heapLib"
52
- ]
53
- }
54
-
55
- #
56
- # Initializes the heap library javascript
57
- #
58
- def initialize(custom_js = '')
59
- load_js(custom_js)
60
- end
61
-
62
- #
63
- # Return the replaced version of the javascript
64
- #
65
- def to_s
66
- @js
67
- end
68
-
69
- protected
70
-
71
- #
72
- # Loads the raw javascript from the source file and strips out comments
73
- #
74
- def load_js(custom_js)
75
-
76
- # Grab the complete javascript
77
- File.open(JavascriptFile) { |f|
78
- @js = f.read
79
- }
80
-
81
- # Decode the text
82
- @js = Rex::Text.decode_base64(@js)
83
-
84
- # Append the real code
85
- @js += "\n" + custom_js
86
-
87
- # Obfuscate the javascript
88
- @js = ObfuscateJS.obfuscate(@js, 'Symbols' => SymbolNames)
89
- end
90
-
91
- end
92
-
93
- end
94
- end
@@ -1,897 +0,0 @@
1
-
2
- require 'rex/text'
3
- require 'rex/exploitation/obfuscatejs'
4
- require 'msf/core/auxiliary'
5
-
6
- module Rex
7
- module Exploitation
8
-
9
- #
10
- # Provides several javascript functions for determining the OS and browser versions of a client.
11
- #
12
- # getVersion(): returns an object with the following properties
13
- # os_name - OS name, one of the Msf::OperatingSystems constants
14
- # os_flavor - OS flavor as a string (e.g.: "XP", "2000")
15
- # os_sp - OS service pack (e.g.: "SP2", will be empty on non-Windows)
16
- # os_lang - OS language (e.g.: "en-us")
17
- # ua_name - Client name, one of the Msf::HttpClients constants
18
- # ua_version - Client version as a string (e.g.: "3.5.1", "6.0;SP2")
19
- # arch - Architecture, one of the ARCH_* constants
20
- #
21
- # The following functions work on the version returned in obj.ua_version
22
- #
23
- # ua_ver_cmp(a, b): returns -1, 0, or 1 based on whether a < b, a == b, or a > b respectively
24
- # ua_ver_lt(a, b): returns true if a < b
25
- # ua_ver_gt(a, b): returns true if a > b
26
- # ua_ver_eq(a, b): returns true if a == b
27
- #
28
- class JavascriptOSDetect < ObfuscateJS
29
-
30
- def initialize(custom_js = '', opts = {})
31
- clients = ::Msf::HttpClients
32
- oses = ::Msf::OperatingSystems
33
- @js = custom_js
34
- @js = <<ENDJS + @js
35
- /**
36
- * This can reliably detect browser versions for IE and Firefox even in the
37
- * presence of a spoofed User-Agent. OS detection is more fragile and
38
- * requires truthful navigator.appVersion and navigator.userAgent strings in
39
- * order to be accurate for more than just IE on Windows.
40
- **/
41
- function getVersion(){
42
- //Default values:
43
- var os_name;
44
- var os_flavor;
45
- var os_sp;
46
- var os_lang;
47
- var ua_name;
48
- var ua_version;
49
- var arch = "";
50
- var useragent = navigator.userAgent;
51
- // Trust but verify...
52
- var ua_is_lying = false;
53
-
54
- var version = "";
55
-
56
- //--
57
- // Client
58
- //--
59
- if (window.opera) {
60
- ua_name = "#{clients::OPERA}";
61
- if (!navigator.userAgent.match(/Opera/)) {
62
- ua_is_lying = true;
63
- }
64
- // This seems to be completely accurate, e.g. "9.21" is the return
65
- // value of opera.version() when run on Opera 9.21
66
- ua_version = opera.version();
67
- if (!os_name) {
68
- // The 'inconspicuous' argument is there to give us a real value on
69
- // Opera 6 where, without it, the return value is supposedly
70
- // 'Hm, were you only as smart as Bjorn Vermo...'
71
- // though I have not verfied this claim.
72
- switch (opera.buildNumber('inconspicuous')) {
73
- case "344": // opera-9.0-20060616.1-static-qt.i386-en-344
74
- case "2091": // opera-9.52-2091.gcc3-shared-qt3.i386.rpm
75
- case "2444": // opera-9.60.gcc4-shared-qt3.i386.rpm
76
- os_name = "#{oses::LINUX}";
77
- break;
78
- case "8502": // "Opera 9 Eng Setup.exe"
79
- case "8679": // "Opera_9.10_Eng_Setup.exe"
80
- case "8771": // "Opera_9.20_Eng_Setup.exe"
81
- case "8776": // "Opera_9.21_Eng_Setup.exe"
82
- case "8801": // "Opera_9.22_Eng_Setup.exe"
83
- case "10108": // "Opera_952_10108_en.exe"
84
- case "10467": // "Opera_962_en_Setup.exe"
85
- os_name = "#{oses::WINDOWS}";
86
- break;
87
- //default:
88
- // document.write(opera.buildNumber('inconspicuous'));
89
- // break;
90
- }
91
- }
92
- } else if (typeof window.onmousewheel != 'undefined') {
93
- // Then this is webkit, could be Safari or Chrome.
94
- // Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
95
- // Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.78 Safari/532.5
96
- // Mozilla/5.0 (Linux; U; Android 2.2; en-au; GT-I9000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
97
- // Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8C148
98
- // Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405
99
- // Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
100
-
101
- // Google Chrome has window.google (older versions), window.chromium (older versions), and window.window.chrome (3+)
102
- if (window.chromium || window.google || window.chrome) {
103
- ua_name = "#{clients::CHROME}";
104
- search = "Chrome";
105
- } else {
106
- ua_name = "#{clients::SAFARI}";
107
- search = "Version";
108
- }
109
-
110
- platform = navigator.platform.toLowerCase();
111
- // Just to be a pain, iPod and iPad both leave off "Safari" and
112
- // "Version" in the UA, see example above. Grab the webkit version
113
- // instead. =/
114
- if (platform.match(/ipod/)) {
115
- os_name = "#{oses::MAC_OSX}";
116
- os_flavor = "iPod";
117
- arch = "#{ARCH_ARMLE}";
118
- search = "AppleWebKit";
119
- } else if (platform.match(/ipad/)) {
120
- os_name = "#{oses::MAC_OSX}";
121
- os_flavor = "iPad";
122
- arch = "#{ARCH_ARMLE}";
123
- search = "AppleWebKit";
124
- } else if (platform.match(/iphone/)) {
125
- os_name = "#{oses::MAC_OSX}";
126
- os_flavor = "iPhone";
127
- arch = "#{ARCH_ARMLE}";
128
- } else if (platform.match(/macintel/)) {
129
- os_name = "#{oses::MAC_OSX}";
130
- arch = "#{ARCH_X86}";
131
- } else if (platform.match(/linux/)) {
132
- os_name = "#{oses::LINUX}";
133
- if (platform.match(/x86_64/)) {
134
- arch = "#{ARCH_X86_64}";
135
- } else if (platform.match(/arm/)) {
136
- // Android
137
- arch = "#{ARCH_ARMLE}";
138
- }
139
- } else if (platform.match(/windows/)) {
140
- os_name = "#{oses::WINDOWS}";
141
- }
142
-
143
- ua_version = searchVersion(search, navigator.userAgent);
144
- if (!ua_version || 0 == ua_version.length) {
145
- ua_is_lying = true;
146
- }
147
- } else if (!document.all && navigator.taintEnabled) {
148
- // Use taintEnabled to identify FF since other recent browsers
149
- // implement window.getComputedStyle now. For some reason, checking for
150
- // taintEnabled seems to cause IE 6 to stop parsing, so make sure this
151
- // isn't IE first.
152
- //
153
- // Then this is a Gecko derivative, assume Firefox since that's the
154
- // only one we have sploits for. We may need to revisit this in the
155
- // future. This works for multi/browser/mozilla_compareto against
156
- // Firefox and Mozilla, so it's probably good enough for now.
157
- ua_name = "#{clients::FF}";
158
- if (document.readyState) {
159
- ua_version = "3.6";
160
- } else if (String.trimRight) {
161
- ua_version = "3.5";
162
- } else if (document.getElementsByClassName) {
163
- ua_version = "3";
164
- } else if (window.Iterator) {
165
- ua_version = "2";
166
- } else if (Array.every) {
167
- ua_version = "1.5";
168
- } else {
169
- ua_version = "1";
170
- }
171
-
172
- if (navigator.oscpu != navigator.platform) {
173
- ua_is_lying = true;
174
- }
175
- // oscpu is unaffected by changes in the useragent and has values like:
176
- // "Linux i686"
177
- // "Windows NT 6.0"
178
- // haven't tested on 64-bit Windows
179
- version = navigator.oscpu;
180
- if (version.match(/i.86/)) {
181
- arch = "#{ARCH_X86}";
182
- }
183
- if (version.match(/x86_64/)) {
184
- arch = "#{ARCH_X86_64}";
185
- }
186
- if (version.match(/Windows/)) {
187
- os_name = "#{oses::WINDOWS}";
188
- switch(version) {
189
- case "Windows NT 5.0": os_flavor = "2000"; break;
190
- case "Windows NT 5.1": os_flavor = "XP"; break;
191
- case "Windows NT 5.2": os_flavor = "2003"; break;
192
- case "Windows NT 6.0": os_flavor = "Vista"; break;
193
- case "Windows NT 6.1": os_flavor = "7"; break;
194
- }
195
- }
196
- if (version.match(/Linux/)) {
197
- os_name = "#{oses::LINUX}";
198
- }
199
- // end navigator.oscpu checks
200
-
201
- // buildID is unaffected by changes in the useragent and typically has
202
- // the compile date which in some cases can be used to map to specific
203
- // Version & O/S (including Distro and even Arch). Depending upon the
204
- // buildID, sometime navigator.productSub will be needed.
205
- //
206
- // This technique, and the laboriously compiled associated table,
207
- // submitted by Mark Fioravanti.
208
-
209
- var buildid = navigator.buildID;
210
-
211
- switch(buildid) {
212
- case "2008041514": ua_version = "3.0.0.b5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
213
- case "2008041515": ua_version = "3.0.0.b5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
214
- case "2008052312": ua_version = "3.0.0"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
215
- case "2008052906": ua_version = "3.0.0"; os_name = "#{oses::WINDOWS}"; break;
216
- case "2008052909": ua_version = "3.0.0.rc1"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
217
- case "2008052912": ua_version = "3.0.0"; os_name = "#{oses::LINUX}"; break;
218
- case "2008060309": ua_version = "3.0.0"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
219
- case "2008070205": ua_version = "2.0.0.16"; os_name = "#{oses::WINDOWS}"; break;
220
- case "2008070206": ua_version = "3.0.1"; os_name = "#{oses::LINUX}"; break;
221
- case "2008070208": ua_version = "3.0.1"; os_name = "#{oses::WINDOWS}"; break;
222
- case "2008071222": ua_version = "3.0.1"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
223
- case "2008072820":
224
- switch (navigator.productSub) {
225
- case "2008072820": ua_version = "3.0.1"; os_name = "#{oses::LINUX}"; break;
226
- case "2008092313": ua_version = "3.0.2"; os_name = "#{oses::LINUX}"; break;
227
- } break;
228
- case "2008082909": ua_version = "2.0.0.17"; os_name = "#{oses::WINDOWS}"; break;
229
- case "2008091618": ua_version = "3.0.2"; os_name = "#{oses::LINUX}"; break;
230
- case "2008091620": ua_version = "3.0.2"; os_name = "#{oses::WINDOWS}"; break;
231
- case "2008092313": ua_version = "3.0.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
232
- case "2008092416": ua_version = "3.0.3"; os_name = "#{oses::LINUX}"; break;
233
- case "2008092417": ua_version = "3.0.3"; os_name = "#{oses::WINDOWS}"; break;
234
- case "2008092510": ua_version = "3.0.4"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
235
- case "2008101315":
236
- switch (navigator.productSub) {
237
- case "2008101315": ua_version = "3.0.3"; os_name = "#{oses::LINUX}"; break;
238
- case "2008111318": ua_version = "3.0.4"; os_name = "#{oses::LINUX}"; arch = "#{ARCH_X86}"; break;
239
- } break;
240
- case "2008102918": ua_version = "2.0.0.18"; os_name = "#{oses::WINDOWS}"; break;
241
- case "2008102920": ua_version = "3.0.4"; break;
242
- case "2008111317": ua_version = "3.0.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
243
- case "2008111318": ua_version = "3.0.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
244
- case "2008120119": ua_version = "2.0.0.19"; os_name = "#{oses::WINDOWS}"; break;
245
- case "2008120121": ua_version = "3.0.5"; os_name = "#{oses::LINUX}"; break;
246
- case "2008120122": ua_version = "3.0.5"; os_name = "#{oses::WINDOWS}"; break;
247
- case "2008121709": ua_version = "2.0.0.20"; os_name = "#{oses::WINDOWS}"; break;
248
- case "2009011912": ua_version = "3.0.6"; os_name = "#{oses::LINUX}"; break;
249
- case "2009011913": ua_version = "3.0.6"; os_name = "#{oses::WINDOWS}"; break;
250
- case "2009012615": ua_version = "3.0.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
251
- case "2009012616": ua_version = "3.0.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
252
- case "2009021906": ua_version = "3.0.7"; os_name = "#{oses::LINUX}"; break;
253
- case "2009021910": ua_version = "3.0.7"; os_name = "#{oses::WINDOWS}"; break;
254
- case "2009030422": ua_version = "3.0.8"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
255
- case "2009032608": ua_version = "3.0.8"; os_name = "#{oses::LINUX}"; break;
256
- case "2009032609": ua_version = "3.0.8"; os_name = "#{oses::WINDOWS}"; break;
257
- case "2009032711": ua_version = "3.0.9"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
258
- case "2009033100":
259
- switch (navigator.productSub) {
260
- case "2009033100": ua_version = "3.0.8"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
261
- case "2009042113": ua_version = "3.0.9"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
262
- } break;
263
- case "2009040820": ua_version = "3.0.9"; os_name = "#{oses::LINUX}"; break;
264
- case "2009040821": ua_version = "3.0.9"; os_name = "#{oses::WINDOWS}"; break;
265
- case "2009042113": ua_version = "3.0.10"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
266
- case "2009042114": ua_version = "3.0.10"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
267
- case "2009042315": ua_version = "3.0.10"; os_name = "#{oses::LINUX}"; break;
268
- case "2009042316": ua_version = "3.0.10"; os_name = "#{oses::WINDOWS}"; break;
269
- case "20090427153806": ua_version = "3.5.0.b4"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
270
- case "20090427153807": ua_version = "3.5.0.b4"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
271
- case "2009060214": ua_version = "3.0.11"; os_name = "#{oses::LINUX}"; break;
272
- case "2009060215": ua_version = "3.0.11"; os_name = "#{oses::WINDOWS}"; break;
273
- case "2009060308":
274
- switch (navigator.productSub) {
275
- case "2009060308": ua_version = "3.0.11"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
276
- case "2009070811": ua_version = "3.0.12"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
277
- } break;
278
- case "2009060309":
279
- switch (navigator.productSub) {
280
- case "2009060309": ua_version = "3.0.11"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
281
- case "2009070811": ua_version = "3.0.12"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
282
- } break;
283
- case "2009060310": ua_version = "3.0.11"; os_name = "#{oses::LINUX}"; os_flavor = "BackTrack"; break;
284
- case "2009062005": ua_version = "3.0.11"; os_name = "#{oses::LINUX}"; os_flavor = "PCLunixOS"; break;
285
- case "20090624012136": ua_version = "3.5.0"; os_name = "#{oses::MAC_OSX}"; break;
286
- case "20090624012820": ua_version = "3.5.0"; os_name = "#{oses::LINUX}"; break;
287
- case "20090701234143": ua_version = "3.5.0"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
288
- case "20090702060527": ua_version = "3.5.0"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
289
- case "2009070610": ua_version = "3.0.12"; os_name = "#{oses::LINUX}"; break;
290
- case "2009070611": ua_version = "3.0.12"; os_name = "#{oses::WINDOWS}"; break;
291
- case "2009070811": ua_version = "3.0.13"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
292
- case "20090715083437": ua_version = "3.5.1"; os_name = "#{oses::MAC_OSX}"; break;
293
- case "20090715083816": ua_version = "3.5.1"; os_name = "#{oses::LINUX}"; break;
294
- case "20090715094852": ua_version = "3.5.1"; os_name = "#{oses::WINDOWS}"; break;
295
- case "2009072202": ua_version = "3.0.12"; os_name = "#{oses::LINUX}"; os_flavor = "Oracle"; break;
296
- case "2009072711": ua_version = "3.0.12"; os_name = "#{oses::LINUX}"; os_flavor = "CentOS"; break;
297
- case "20090729211433": ua_version = "3.5.2"; os_name = "#{oses::MAC_OSX}"; break;
298
- case "20090729211829": ua_version = "3.5.2"; os_name = "#{oses::LINUX}"; break;
299
- case "20090729225027": ua_version = "3.5.2"; os_name = "#{oses::WINDOWS}"; break;
300
- case "2009073021": ua_version = "3.0.13"; os_name = "#{oses::LINUX}"; break;
301
- case "2009073022": ua_version = "3.0.13"; os_name = "#{oses::WINDOWS}"; break;
302
- case "20090824085414": ua_version = "3.5.3"; os_name = "#{oses::MAC_OSX}"; break;
303
- case "20090824085743": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; break;
304
- case "20090824101458": ua_version = "3.5.3"; os_name = "#{oses::WINDOWS}"; break;
305
- case "2009082707": ua_version = "3.0.14"; break;
306
- case "2009090216": ua_version = "3.0.14"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
307
- case "20090914014745": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
308
- case "20090915065903": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86_64}"; break;
309
- case "20090915070141": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86}"; break;
310
- case "20091007090112": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break; // Could also be Mint x86
311
- case "20091007095328": ua_version = "3.5.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
312
- case "2009101600":
313
- switch (navigator.productSub) {
314
- case "2009101600": ua_version = "3.0.15"; break; // Can be either Mac or Linux
315
- case "20091016": ua_version = "3.5.4"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; arch = "#{ARCH_X86}"; break;
316
- } break;
317
- case "2009101601": ua_version = "3.0.15"; os_name = "#{oses::WINDOWS}"; break;
318
- case "20091016081620": ua_version = "3.5.4"; os_name = "#{oses::MAC_OSX}"; break;
319
- case "20091016081727": ua_version = "3.5.4"; os_name = "#{oses::LINUX}"; break;
320
- case "20091016092926": ua_version = "3.5.4"; os_name = "#{oses::WINDOWS}"; break;
321
- case "20091020122601": ua_version = "3.5.4"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
322
- case "2009102814":
323
- switch (navigator.productSub) {
324
- case "2009121601": ua_version = "3.0.16"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
325
- case "2009121602": ua_version = "3.0.16"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
326
- case "2010010604": ua_version = "3.0.17"; os_name = "#{oses::LINUX}"; os_flavor = "Mint"; break;
327
- case "2010021501": ua_version = "3.0.17;xul1.9.0.18"; os_name = "#{oses::LINUX}"; os_flavor = "Mint"; arch = "#{ARCH_X86}"; break;
328
- case "2010021502": ua_version = "3.0.17;xul1.9.0.18"; os_name = "#{oses::LINUX}"; os_flavor = "Mint"; arch = "#{ARCH_X86_64}"; break;
329
- } break;
330
- case "2009102815":
331
- switch (navigator.productSub) {
332
- case "2009102815": ua_version = "3.0.15"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
333
- case "2009121601": ua_version = "3.0.16"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
334
- } break;
335
- case "20091029152254": ua_version = "3.6.0.b1"; os_name = "#{oses::LINUX}"; break;
336
- case "20091029171059": ua_version = "3.6.0.b1"; os_name = "#{oses::WINDOWS}"; break;
337
- case "20091102134505": ua_version = "3.5.5"; os_name = "#{oses::MAC_OSX}"; break;
338
- case "20091102141836": ua_version = "3.5.5"; os_name = "#{oses::LINUX}"; break;
339
- case "20091102152451": ua_version = "3.5.5"; os_name = "#{oses::WINDOWS}"; break;
340
- case "2009110421": ua_version = "3.0.15"; os_name = "#{oses::FREEBSD}"; arch = "#{ARCH_X86}"; break;
341
- case "20091106091959": ua_version = "3.5.5"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
342
- case "20091106140514": ua_version = "3.5.5"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
343
- case "20091106145609": ua_version = "3.5.5"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
344
- case "20091108163911": ua_version = "3.6.0.b2"; os_name = "#{oses::LINUX}"; break;
345
- case "20091108181924": ua_version = "3.6.0.b2"; os_name = "#{oses::WINDOWS}"; break;
346
- case "20091109125225":
347
- switch (navigator.productSub) {
348
- case "20091109": ua_version = "3.5.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
349
- case "20091215": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
350
- } break;
351
- case "20091109134913": ua_version = "3.5.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
352
- case "20091115172547": ua_version = "3.6.0.b3"; os_name = "#{oses::LINUX}"; break;
353
- case "20091115182845": ua_version = "3.6.0.b3"; os_name = "#{oses::WINDOWS}"; break;
354
- case "20091124201530": ua_version = "3.6.0.b4"; os_name = "#{oses::MAC_OSX}"; break;
355
- case "20091124201751": ua_version = "3.6.0.b4"; os_name = "#{oses::LINUX}"; break;
356
- case "20091124213835": ua_version = "3.6.0.b4"; os_name = "#{oses::WINDOWS}"; break;
357
- case "2009120100": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
358
- case "20091201203240": ua_version = "3.5.6"; os_name = "#{oses::MAC_OSX}"; break;
359
- case "20091201204959": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; break;
360
- case "20091201220228": ua_version = "3.5.6"; os_name = "#{oses::WINDOWS}"; break;
361
- case "2009120206": ua_version = "3.0.16"; break; // Can be either Mac or Linux
362
- case "2009120208": ua_version = "3.0.16"; os_name = "#{oses::WINDOWS}"; break;
363
- case "20091204132459": ua_version = "3.6.0.b5"; os_name = "#{oses::LINUX}"; break;
364
- case "20091204132509": ua_version = "3.6.0.b5"; os_name = "#{oses::MAC_OSX}"; break;
365
- case "20091204143806": ua_version = "3.6.0.b5"; os_name = "#{oses::WINDOWS}"; break;
366
- case "20091215230859": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
367
- case "20091215230946": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
368
- case "20091215231400": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break; // Could also be Mint x86
369
- case "20091215231754":
370
- switch (navigator.productSub) {
371
- case "20091215": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
372
- case "20100106": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
373
- } break;
374
- case "2009121601":
375
- switch (navigator.productSub) {
376
- case "2009121601": ua_version = "3.0.16"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
377
- case "2010010604": ua_version = "3.0.17"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break; // Could also be Mint x86-64
378
- } break;
379
- case "2009121602": ua_version = "3.0.17"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
380
- case "20091216104148": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; break;
381
- case "20091216132458": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
382
- case "20091216132537": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
383
- case "20091216142458": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
384
- case "20091216142519": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
385
- case "2009121708": ua_version = "3.0.16"; os_name = "#{oses::LINUX}"; os_flavor = "CentOS"; arch = "#{ARCH_X86}"; break;
386
- case "2009122115": ua_version = "3.0.17"; break; // Can be either Mac or Linux
387
- case "2009122116": ua_version = "3.0.17"; os_name = "#{oses::WINDOWS}"; break;
388
- case "20091221151141": ua_version = "3.5.7"; os_name = "#{oses::MAC_OSX}"; break;
389
- case "20091221152502": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; break;
390
- case "20091221164558": ua_version = "3.5.7"; os_name = "#{oses::WINDOWS}"; break;
391
- case "2009122200": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
392
- case "20091223231431": ua_version = "3.5.6"; os_name = "#{oses::LINUX}"; os_flavor = "PCLunixOS"; arch = "#{ARCH_X86}"; break;
393
- case "20100105194006": ua_version = "3.6.0.rc1"; os_name = "#{oses::MAC_OSX}"; break;
394
- case "20100105194116": ua_version = "3.6.0.rc1"; os_name = "#{oses::LINUX}"; break;
395
- case "20100105212446": ua_version = "3.6.0.rc1"; os_name = "#{oses::WINDOWS}"; break;
396
- case "2010010604": ua_version = "3.0.18"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
397
- case "2010010605": ua_version = "3.0.18"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
398
- case "20100106054534": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break; // Could also be Mint x86
399
- case "20100106054634": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
400
- case "20100106211825": ua_version = "3.5.7"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
401
- case "20100106212742": ua_version = "3.5.7"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
402
- case "20100106215614": ua_version = "3.5.7"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
403
- case "20100110112429": ua_version = "3.5.7"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; break;
404
- case "20100115132715": ua_version = "3.6.0"; os_name = "#{oses::MAC_OSX}"; break;
405
- case "20100115133306": ua_version = "3.6.0"; os_name = "#{oses::LINUX}"; break;
406
- case "20100115144158": ua_version = "3.6.0"; os_name = "#{oses::WINDOWS}"; break;
407
- case "20100125074043": ua_version = "3.6.0"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break; // Could also be Mint x86
408
- case "20100125074127": ua_version = "3.6.0"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
409
- case "20100125204847": ua_version = "3.6.0"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86}"; break; // Could also be Mint x86
410
- case "20100125204903": ua_version = "3.6.0"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86_64}"; break; // Could also be Mint x86-64
411
- case "20100202152834": ua_version = "3.5.8"; os_name = "#{oses::MAC_OSX}"; break;
412
- case "20100202153512": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; break;
413
- case "20100202165920": ua_version = "3.5.8"; os_name = "#{oses::WINDOWS}"; break;
414
- case "2010020219": ua_version = "3.0.18"; os_name = "#{oses::MAC_OSX}"; break;
415
- case "2010020220": ua_version = "3.0.18"; os_name = "#{oses::WINDOWS}"; break;
416
- case "2010020400": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
417
- case "20100212131909": ua_version = "3.6.0.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
418
- case "20100212132013": ua_version = "3.6.0.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
419
- case "20100216105329": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
420
- case "20100216105348": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
421
- case "20100216105410": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
422
- case "20100216110009": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
423
- case "2010021718": ua_version = "3.0.18"; os_name = "#{oses::LINUX}"; os_flavor = "CentOS"; arch = "#{ARCH_X86}"; break;
424
- case "20100218022359": ua_version = "3.6.0.4"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
425
- case "20100218022705": ua_version = "3.6.0.4"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
426
- case "20100218112915": ua_version = "3.5.8"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
427
- case "20100222120605": ua_version = "3.6.0.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
428
- case "20100222120717": ua_version = "3.6.0.5"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
429
- case "20100301015346": ua_version = "3.6.0"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
430
- case "20100305054927": ua_version = "3.6.0"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
431
- case "20100307204001": ua_version = "3.6.0"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
432
- case "20100308142847": ua_version = "3.6.0.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
433
- case "20100308151019": ua_version = "3.6.0.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
434
- case "2010031218": ua_version = "3.0.19"; break; // Mac OS X or Linux
435
- case "2010031422": ua_version = "3.0.19"; os_name = "#{oses::WINDOWS}"; break;
436
- case "20100315075757": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; break;
437
- case "20100315080228": ua_version = "3.5.9"; os_name = "#{oses::MAC_OSX}"; break;
438
- case "20100315083431": ua_version = "3.5.9"; os_name = "#{oses::WINDOWS}"; break;
439
- case "20100316055951": ua_version = "3.6.2"; os_name = "#{oses::MAC_OSX}"; break;
440
- case "20100316060223": ua_version = "3.6.2"; os_name = "#{oses::LINUX}"; break;
441
- case "20100316074819": ua_version = "3.6.2"; os_name = "#{oses::WINDOWS}"; break;
442
- case "2010031700": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
443
- case "20100323102218": ua_version = "3.6.2"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
444
- case "20100323102339": ua_version = "3.6.2"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
445
- case "20100323194640": ua_version = "3.6.2"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
446
- case "20100324182054": ua_version = "3.6.2"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
447
- case "20100330071911": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
448
- case "20100330072017": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
449
- case "20100330072020": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
450
- case "20100330072034": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
451
- case "20100401064631": ua_version = "3.6.3"; os_name = "#{oses::MAC_OSX}"; break;
452
- case "20100401074458": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; break;
453
- case "20100401080539": ua_version = "3.6.3"; os_name = "#{oses::WINDOWS}"; break;
454
- case "20100401144201": ua_version = "3.6.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
455
- case "2010040116": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
456
- case "2010040118": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
457
- case "2010040119": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
458
- case "2010040121": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
459
- case "20100401213457": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
460
- case "2010040123": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
461
- case "2010040200": ua_version = "3.0.19"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
462
- case "20100402010516": ua_version = "3.5.9"; os_name = "#{oses::LINUX}"; os_flavor = "Mint"; arch = "#{ARCH_X86_64}"; break;
463
- case "20100402041908": ua_version = "3.6.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
464
- case "20100403042003": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
465
- case "20100403082016": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
466
- case "20100404024515": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
467
- case "20100404024646": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
468
- case "20100404104043": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "PClinuxOS"; arch = "#{ARCH_X86_64}"; break;
469
- case "20100409151117": ua_version = "3.6.3.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
470
- case "20100409170726": ua_version = "3.6.3.2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
471
- case "20100412125148": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
472
- case "20100413152922": ua_version = "3.6.4.b1"; os_name = "#{oses::MAC_OSX}"; break;
473
- case "20100413154310": ua_version = "3.6.4.b1"; os_name = "#{oses::LINUX}"; break;
474
- case "20100413172113": ua_version = "3.6.4.b1"; os_name = "#{oses::WINDOWS}"; break;
475
- case "20100415062243": ua_version = "3.6.3.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
476
- case "20100415103754": ua_version = "3.6.3.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
477
- case "20100416101101": ua_version = "3.6.3.2"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
478
- case "2010041700": ua_version = "3.6.4.1"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
479
- case "20100419015333": ua_version = "3.6.3"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
480
- case "20100423043606": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86_64}"; break;
481
- case "20100423140709": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
482
- case "20100423141150": ua_version = "3.6.3"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
483
- case "20100423142835": ua_version = "3.6.3"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
484
- case "20100502202326": ua_version = "3.6.4.b2"; os_name = "#{oses::LINUX}"; break;
485
- case "20100502202401": ua_version = "3.6.4.b2"; os_name = "#{oses::MAC_OSX}"; break;
486
- case "20100502221517": ua_version = "3.6.4.b2"; os_name = "#{oses::WINDOWS}"; break;
487
- case "20100503113315": ua_version = "3.6.4.b3"; os_name = "#{oses::MAC_OSX}"; break;
488
- case "20100503113541": ua_version = "3.6.4.b3"; os_name = "#{oses::LINUX}"; break;
489
- case "20100503122926": ua_version = "3.6.4.b3"; os_name = "#{oses::WINDOWS}"; break;
490
- case "20100504085637": ua_version = "3.5.10"; os_name = "#{oses::LINUX}"; break;
491
- case "20100504085753": ua_version = "3.5.10"; os_name = "#{oses::MAC_OSX}"; break;
492
- case "20100504093643": ua_version = "3.5.10"; os_name = "#{oses::WINDOWS}"; break;
493
- case "2010050600": ua_version = "3.5.10"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
494
- case "2010051300": ua_version = "3.6.4.1"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
495
- case "20100513134853": ua_version = "3.6.4.b4"; os_name = "#{oses::MAC_OSX}"; break;
496
- case "20100513140540": ua_version = "3.6.4.b4"; os_name = "#{oses::LINUX}"; break;
497
- case "20100513144105": ua_version = "3.6.4.b4"; os_name = "#{oses::WINDOWS}"; break;
498
- case "20100513190740": ua_version = "3.6.3"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
499
- case "20100523180910": ua_version = "3.6.4.b5"; os_name = "#{oses::MAC_OSX}"; break;
500
- case "20100523181754": ua_version = "3.6.4.b5"; os_name = "#{oses::LINUX}"; break;
501
- case "20100523185824": ua_version = "3.6.4.b5"; os_name = "#{oses::WINDOWS}"; break;
502
- case "20100527084110": ua_version = "3.6.4.b6"; os_name = "#{oses::MAC_OSX}"; break;
503
- case "20100527085242": ua_version = "3.6.4.b6"; os_name = "#{oses::LINUX}"; break;
504
- case "20100527093236": ua_version = "3.6.4.b6"; os_name = "#{oses::WINDOWS}"; break;
505
- case "2010061100": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "SUSE"; break;
506
- case "20100611134546": ua_version = "3.6.4.b7"; os_name = "#{oses::MAC_OSX}"; break;
507
- case "20100611135942": ua_version = "3.6.4.b7"; os_name = "#{oses::LINUX}"; break;
508
- case "20100611143157": ua_version = "3.6.4.b7"; os_name = "#{oses::WINDOWS}"; break;
509
- case "20100622203044": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
510
- case "20100622203045": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
511
- case "20100622204750": ua_version = "3.5.10"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86_64}"; break;
512
- case "20100622204830": ua_version = "3.5.10"; os_name = "#{oses::LINUX}"; os_flavor = "Fedora"; arch = "#{ARCH_X86}"; break;
513
- case "20100622205038": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "PClinuxOS"; arch = "#{ARCH_X86_64}"; break;
514
- case "20100623081410": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "CentOS"; arch = "#{ARCH_X86_64}"; break;
515
- case "20100623081921": ua_version = "3.6.4"; os_name = "#{oses::LINUX}"; os_flavor = "CentOS"; arch = "#{ARCH_X86}"; break;
516
- case "20100623155731": ua_version = "3.6.4.b7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
517
- case "20100623200132": ua_version = "3.6.4.b7"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
518
- case "20100625222733": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; break;
519
- case "20100625223402": ua_version = "3.6.6"; os_name = "#{oses::MAC_OSX}"; break;
520
- case "20100625231939": ua_version = "3.6.6"; os_name = "#{oses::WINDOWS}"; break;
521
- case "20100626104508": ua_version = "3.6.4"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86}"; break;
522
- case "20100627211341": ua_version = "3.6.4"; os_name = "#{oses::FREEBSD}"; os_flavor = "PC-BSD"; arch = "#{ARCH_X86_64}"; break;
523
- case "20100628082832": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "PClinuxOS"; arch = "#{ARCH_X86_64}"; break;
524
- case "20100628124739": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
525
- case "20100628143222": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
526
- case "20100628232431": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
527
- case "20100629034705": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
528
- case "20100629105354": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Mandriva"; arch = "#{ARCH_X86}"; break;
529
- case "20100630130433": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
530
- case "20100630131607": ua_version = "4.0.0.b1"; os_name = "#{oses::MAC_OSX}"; break;
531
- case "20100630132217": ua_version = "4.0.0.b1"; os_name = "#{oses::LINUX}"; break;
532
- case "20100630141702": ua_version = "4.0.0.b1"; os_name = "#{oses::WINDOWS}"; break;
533
- case "20100630174226": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86_64}"; break;
534
- case "20100630180611": ua_version = "3.6.6"; os_name = "#{oses::LINUX}"; os_flavor = "Sabayon"; arch = "#{ARCH_X86}"; break;
535
- case "20100709115208": ua_version = "3.6.7.b1"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86}"; break;
536
- case "20100709183408": ua_version = "3.6.7.b1"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
537
- case "20100716093011": ua_version = "3.6.7.b2"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; arch = "#{ARCH_X86_64}"; break;
538
- case "20101203075014": ua_version = "3.6.13"; os_name = "#{oses::WINDOWS}"; break;
539
- case "20101206122825": ua_version = "3.6.13"; os_name = "#{oses::LINUX}"; os_flavor = "Ubuntu"; break;
540
- default:
541
- version = searchVersion("Firefox", navigator.userAgent);
542
- // Verify whether the ua string is lying by checking if it contains
543
- // the major version we detected using known objects above. If it
544
- // appears to be truthful, then use its more precise version number.
545
- if (version && version.split(".")[0] == ua_version.split(".")[0]) {
546
- // The version number will sometimes end with a space or end of
547
- // line, so strip off anything after a space if one exists
548
- if (-1 != version.indexOf(" ")) {
549
- version = version.substr(0,version.indexOf(" "));
550
- }
551
- ua_version = version;
552
- } else {
553
- ua_is_lying = true;
554
- }
555
- break;
556
- }
557
- //if (ua_is_lying) { alert("UA is lying"); }
558
- //alert(ua_version + " vs " + navigator.userAgent);
559
-
560
- // end navigator.buildID checks
561
-
562
- } else if (typeof ScriptEngineMajorVersion == "function") {
563
- // Then this is IE and we can very reliably detect the OS.
564
- // Need to add detection for IE on Mac. Low priority, since we
565
- // don't have any sploits for it yet and it's a very low market
566
- // share.
567
- os_name = "#{oses::WINDOWS}";
568
- ua_name = "#{clients::IE}";
569
- version = ScriptEngineMajorVersion().toString();
570
- version += ScriptEngineMinorVersion().toString();
571
- version += ScriptEngineBuildVersion().toString();
572
- //document.write("ScriptEngine: "+version+"<br />");
573
- switch (version){
574
- case "514615":
575
- // IE 5.00.2920.0000, 2000 Advanced Server SP0 English
576
- ua_version = "5.0";
577
- os_flavor = "2000";
578
- os_sp = "SP0";
579
- break;
580
- case "515907":
581
- os_flavor = "2000";
582
- os_sp = "SP3"; //or SP2: oCC.getComponentVersion('{22d6f312-b0f6-11d0-94ab-0080c74c7e95}', 'componentid') => 6,4,9,1109
583
- break;
584
- case "518513":
585
- os_flavor = "2000";
586
- os_sp = "SP4";
587
- break;
588
- case "566626":
589
- // IE 6.0.2600.0000, XP SP0 English
590
- // IE 6.0.2800.1106, XP SP1 English
591
- ua_version = "6.0";
592
- os_flavor = "XP";
593
- os_sp = "SP0";
594
- break;
595
- case "568515":
596
- // IE 6.0.3790.0, 2003 Standard SP0 English
597
- ua_version = "6.0";
598
- os_flavor = "2003";
599
- os_sp = "SP0";
600
- break;
601
- case "568820":
602
- // IE 6.0.2900.2180, xp sp2 english
603
- os_flavor = "XP";
604
- os_sp = "SP2";
605
- break;
606
- case "568827":
607
- os_flavor = "2003";
608
- os_sp = "SP1";
609
- break;
610
- case "568831": //XP SP2 -OR- 2K SP4
611
- if (os_flavor == "2000"){
612
- os_sp = "SP4";
613
- }
614
- else{
615
- os_flavor = "XP";
616
- os_sp = "SP2";
617
- }
618
- break;
619
- case "568832":
620
- os_flavor = "2003";
621
- os_sp = "SP2";
622
- break;
623
- case "575730":
624
- // IE 7.0.5730.13, Server 2003 Standard SP2 English
625
- // IE 7.0.5730.13, Server 2003 Standard SP1 English
626
- // IE 7.0.5730.13, XP Professional SP2 English
627
- // Rely on the user agent matching above to determine the OS.
628
- // This will incorrectly identify 2k3 SP1 as SP2
629
- ua_version = "7.0";
630
- os_sp = "SP2";
631
- break;
632
- case "5716599":
633
- // IE 7.0.5730.13, XP Professional SP3 English
634
- case "5718066":
635
- // IE 7.0.5730.13, XP Professional SP3 English
636
- ua_version = "7.0";
637
- os_flavor = "XP";
638
- os_sp = "SP3";
639
- break;
640
- case "5822960":
641
- // IE 8.0.6001.18702, XP Professional SP3 Greek
642
- case "5818702":
643
- // IE 8.0.6001.18702, XP Professional SP3 English
644
- ua_version = "8.0";
645
- os_flavor = "XP";
646
- os_sp = "SP3";
647
- break;
648
- case "580":
649
- // IE 8.0.7100.0, Windows 7 English
650
- // IE 8.0.7100.0, Windows 7 64-bit English
651
- case "5816385":
652
- // IE 8.0.7600.16385, Windows 7 English
653
- case "5816475":
654
- ua_version = "8.0";
655
- os_flavor = "7";
656
- os_sp = "SP0";
657
- break;
658
- case "9016406":
659
- // IE 9.0.7930.16406, Windows 7 64-bit
660
- ua_version = "9.0";
661
- os_flavor = "7";
662
- os_sp = "SP0";
663
- break;
664
-
665
- //default:
666
- // document.writeln(version);
667
- // break;
668
- }
669
-
670
- if (!ua_version) {
671
- // The ScriptEngine functions failed us, try some object detection
672
- if (document.documentElement && (typeof document.documentElement.style.maxHeight)!="undefined") {
673
- // IE8 detection straight from IEBlog. Thank you Microsoft.
674
- try {
675
- ua_version = "8.0";
676
- document.documentElement.style.display = "table-cell";
677
- } catch(e) {
678
- // This executes in IE7,
679
- // but not IE8, regardless of mode
680
- ua_version = "7.0";
681
- }
682
- } else if (document.compatMode) {
683
- ua_version = "6.0";
684
- } else if (window.createPopup) {
685
- ua_version = "5.5";
686
- } else if (window.attachEvent) {
687
- ua_version = "5.0";
688
- } else {
689
- ua_version = "4.0";
690
- }
691
- switch (navigator.appMinorVersion){
692
- case ";SP2;":
693
- ua_version += ";SP2";
694
- break;
695
- }
696
- }
697
- }
698
-
699
- if (!os_name && navigator.platform == "Win32") { os_name = "#{oses::WINDOWS}"; }
700
-
701
- //--
702
- // Flavor
703
- //--
704
- if (!ua_is_lying) {
705
- version = useragent.toLowerCase();
706
- } else if (navigator.oscpu) {
707
- // Then this is Gecko and we can get at least os_name without the
708
- // useragent
709
- version = navigator.oscpu.toLowerCase();
710
- } else {
711
- // All we have left is the useragent and we know it's lying, so don't bother
712
- version = " ";
713
- }
714
- if (!os_name || 0 == os_name.length) {
715
- if (version.indexOf("windows") != -1) { os_name = "#{oses::WINDOWS}"; }
716
- else if (version.indexOf("mac") != -1) { os_name = "#{oses::MAC_OSX}"; }
717
- else if (version.indexOf("linux") != -1) { os_name = "#{oses::LINUX}"; }
718
- }
719
- if (os_name == "#{oses::WINDOWS}" && (!os_flavor || 0 == os_flavor.length)) {
720
- if (version.indexOf("windows 95") != -1) { os_flavor = "95"; }
721
- else if (version.indexOf("windows nt 4") != -1) { os_flavor = "NT"; }
722
- else if (version.indexOf("win 9x 4.9") != -1) { os_flavor = "ME"; }
723
- else if (version.indexOf("windows 98") != -1) { os_flavor = "98"; }
724
- else if (version.indexOf("windows nt 5.0") != -1) { os_flavor = "2000"; }
725
- else if (version.indexOf("windows nt 5.1") != -1) { os_flavor = "XP"; }
726
- else if (version.indexOf("windows nt 5.2") != -1) { os_flavor = "2003"; }
727
- else if (version.indexOf("windows nt 6.0") != -1) { os_flavor = "Vista"; }
728
- else if (version.indexOf("windows nt 6.1") != -1) { os_flavor = "7"; }
729
- }
730
- if (os_name == "#{oses::LINUX}" && (!os_flavor || 0 == os_flavor.length)) {
731
- if (version.indexOf("gentoo") != -1) { os_flavor = "Gentoo"; }
732
- else if (version.indexOf("ubuntu") != -1) { os_flavor = "Ubuntu"; }
733
- else if (version.indexOf("debian") != -1) { os_flavor = "Debian"; }
734
- else if (version.indexOf("rhel") != -1) { os_flavor = "RHEL"; }
735
- else if (version.indexOf("red hat") != -1) { os_flavor = "RHEL"; }
736
- else if (version.indexOf("centos") != -1) { os_flavor = "CentOS"; }
737
- else if (version.indexOf("fedora") != -1) { os_flavor = "Fedora"; }
738
- else if (version.indexOf("android") != -1) { os_flavor = "Android"; }
739
- }
740
-
741
- //--
742
- // Language
743
- //--
744
- if (navigator.systemLanguage) {
745
- // ie
746
- os_lang = navigator.systemLanguage;
747
- } else if (navigator.language) {
748
- // gecko derivatives, safari, opera
749
- os_lang = navigator.language;
750
- } else {
751
- // some other browser and we don't know how to get the language, so
752
- // just guess english
753
- os_lang = "en";
754
- }
755
-
756
- //--
757
- // Architecture
758
- //--
759
- if (typeof(navigator.cpuClass) != 'undefined') {
760
- // Then this is IE or Opera9+ and we can grab the arch directly
761
- switch (navigator.cpuClass) {
762
- case "x86":
763
- arch = "#{ARCH_X86}";
764
- break;
765
- case "x64":
766
- arch = "#{ARCH_X86_64}";
767
- break;
768
- }
769
- }
770
- if (!arch || 0 == arch.length) {
771
- // We don't have the handy-dandy navagator.cpuClass, so infer from
772
- // platform
773
- version = navigator.platform;
774
- //document.write(version + "\\n");
775
- // IE 8 does a bit of wacky user-agent switching for "Compatibility View";
776
- // 64-bit client on Windows 7, 64-bit:
777
- // Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0)
778
- // 32-bit client on Windows 7, 64-bit:
779
- // Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)
780
- // 32-bit client on Vista, 32-bit, "Compatibility View":
781
- // Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)
782
- //
783
- // Report 32-bit client on 64-bit OS as being 32 because exploits will
784
- // need to know the bittedness of the process, not the OS.
785
- if ( ("Win32" == version) || (version.match(/i.86/)) ) {
786
- arch = "#{ARCH_X86}";
787
- } else if (-1 != version.indexOf('x64') || (-1 != version.indexOf('x86_64'))) {
788
- arch = "#{ARCH_X86_64}";
789
- } else if (-1 != version.indexOf('PPC')) {
790
- arch = "#{ARCH_PPC}";
791
- }
792
- }
793
-
794
- return { os_name:os_name, os_flavor:os_flavor, os_sp:os_sp, os_lang:os_lang, arch:arch, ua_name:ua_name, ua_version:ua_version };
795
- } // function getVersion
796
- function searchVersion(needle, haystack) {
797
- var index = haystack.indexOf(needle);
798
- var found_version;
799
- if (index == -1) { return; }
800
- found_version = haystack.substring(index+needle.length+1);
801
- if (found_version.indexOf(' ') != -1) {
802
- // Strip off any junk at the end such as a CLR declaration
803
- found_version = found_version.substring(0,found_version.indexOf(' '));
804
- }
805
- return found_version;
806
- }
807
-
808
-
809
- /*
810
- * Return -1 if a < b, 0 if a == b, 1 if a > b
811
- */
812
- function ua_ver_cmp(ver_a, ver_b) {
813
- // shortcut the easy case
814
- if (ver_a == ver_b) {
815
- return 0;
816
- }
817
-
818
- a = ver_a.split(".");
819
- b = ver_b.split(".");
820
- for (i = 0; i < Math.max(a.length, b.length); i++) {
821
- // 3.0 == 3
822
- if (!b[i]) { b[i] = "0"; }
823
- if (!a[i]) { a[i] = "0"; }
824
-
825
- if (a[i] == b[i]) { continue; }
826
-
827
- a_int = parseInt(a[i]);
828
- b_int = parseInt(b[i]);
829
- a_rest = a[i].substr(a_int.toString().length);
830
- b_rest = b[i].substr(b_int.toString().length);
831
- if (a_int < b_int) {
832
- return -1;
833
- } else if (a_int > b_int) {
834
- return 1;
835
- } else { // ==
836
- // Then we need to deal with the stuff after the ints, e.g.:
837
- // "b4pre"
838
- if (a_rest == "b" && b_rest.length == 0) {
839
- return -1;
840
- }
841
- if (b_rest == "b" && a_rest.length == 0) {
842
- return 1;
843
- }
844
- // Just give up and try a lexicographical comparison
845
- if (a_rest < b_rest) {
846
- return -1;
847
- } else if (a_rest > b_rest) {
848
- return 1;
849
- }
850
- }
851
- }
852
- // If we get here, they must be equal
853
- return 0;
854
- }
855
-
856
- function ua_ver_lt(a, b) {
857
- if (-1 == ua_ver_cmp(a,b)) { return true; }
858
- return false;
859
- }
860
- function ua_ver_gt(a, b) {
861
- if (1 == ua_ver_cmp(a,b)) { return true; }
862
- return false;
863
- }
864
- function ua_ver_eq(a, b) {
865
- if (0 == ua_ver_cmp(a,b)) { return true; }
866
- return false;
867
- }
868
- ENDJS
869
- super @js
870
- update_opts(opts) if (opts)
871
- update_opts({'Symbols' => {
872
- 'Variables' => [
873
- 'os_name', 'os_flavor',
874
- 'os_sp', 'os_lang',
875
- 'arch',
876
- 'ua_name',
877
- 'ua_version',
878
- 'found_version',
879
- 'needle',
880
- 'haystack',
881
- ],
882
- 'Methods' => [
883
- 'getVersion',
884
- 'searchVersion'
885
- ]
886
- }
887
- })
888
-
889
- #self.obfuscate
890
-
891
- return @js
892
- end
893
-
894
- end
895
- end
896
-
897
- end