filecat 5.16.1 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +4 -0
  2. package/build/dist/{181.11199e601b22f4add759.js → 181.698840886ce3dc29d73a.js} +2 -2
  3. package/build/dist/523.98eb4a396698285c25ae.js +2 -0
  4. package/build/dist/542.5aec7d0b23fecef190fe.js +2 -0
  5. package/build/dist/696.83bb8021ffd00ec3b06a.js +2 -0
  6. package/build/dist/{757.a6c2cab5ed6ce5776467.js → 757.e9a1a5a2d67b0e2e687f.js} +1 -1
  7. package/build/dist/{827.e64e0af3c11c5bcd68c0.js → 827.70ed0314d42b2bb5bf13.js} +2 -2
  8. package/build/dist/908.597aca6b0e9459036607.js +2 -0
  9. package/build/dist/{943.7e28d7ce1a69f0d15eb2.js → 943.2ffec661e12e125e53de.js} +2 -2
  10. package/build/dist/index.html +1 -1
  11. package/build/dist/{main.7d110d8fdcc3c74c6c82.js → main.850641fd9483c1f04c2a.js} +2 -2
  12. package/build/main.js +2 -0
  13. package/build/main.js.LICENSE.txt +507 -0
  14. package/build/unrar.wasm +0 -0
  15. package/build/{server/main/watch.js → watch.js} +86 -68
  16. package/package.json +6 -4
  17. package/shell/config/webpack.npm.config.js +1 -1
  18. package/build/dist/467.4c2e3af5ce77c069309f.js +0 -2
  19. package/build/dist/523.cd76e6fafa6440cc1693.js +0 -2
  20. package/build/dist/542.9a14bb22996fc6c6ff57.js +0 -2
  21. package/build/dist/908.c443be9c376945a5741a.js +0 -2
  22. package/build/server/common/Env.js +0 -188
  23. package/build/server/common/Env.js.map +0 -1
  24. package/build/server/common/FileMenuType.js +0 -45
  25. package/build/server/common/FileMenuType.js.map +0 -1
  26. package/build/server/common/ListUtil.js +0 -174
  27. package/build/server/common/ListUtil.js.map +0 -1
  28. package/build/server/common/Result.pojo.js +0 -14
  29. package/build/server/common/Result.pojo.js.map +0 -1
  30. package/build/server/common/RouterConfig.js +0 -16
  31. package/build/server/common/RouterConfig.js.map +0 -1
  32. package/build/server/common/StringUtil.js +0 -153
  33. package/build/server/common/StringUtil.js.map +0 -1
  34. package/build/server/common/ValueUtil.js +0 -49
  35. package/build/server/common/ValueUtil.js.map +0 -1
  36. package/build/server/common/common.util.js +0 -10
  37. package/build/server/common/common.util.js.map +0 -1
  38. package/build/server/common/file.pojo.js +0 -56
  39. package/build/server/common/file.pojo.js.map +0 -1
  40. package/build/server/common/findPort.js +0 -34
  41. package/build/server/common/findPort.js.map +0 -1
  42. package/build/server/common/frame/WsData.js +0 -168
  43. package/build/server/common/frame/WsData.js.map +0 -1
  44. package/build/server/common/frame/router.js +0 -25
  45. package/build/server/common/frame/router.js.map +0 -1
  46. package/build/server/common/frame/ws.client.js +0 -295
  47. package/build/server/common/frame/ws.client.js.map +0 -1
  48. package/build/server/common/frame/ws.server.js +0 -226
  49. package/build/server/common/frame/ws.server.js.map +0 -1
  50. package/build/server/common/http.js +0 -47
  51. package/build/server/common/http.js.map +0 -1
  52. package/build/server/common/install.js +0 -139
  53. package/build/server/common/install.js.map +0 -1
  54. package/build/server/common/path_util.js +0 -86
  55. package/build/server/common/path_util.js.map +0 -1
  56. package/build/server/common/proto/proto.generate.js +0 -23
  57. package/build/server/common/proto/proto.generate.js.map +0 -1
  58. package/build/server/common/proto/proto.js +0 -172
  59. package/build/server/common/proto/proto.js.map +0 -1
  60. package/build/server/common/req/common.pojo.js +0 -17
  61. package/build/server/common/req/common.pojo.js.map +0 -1
  62. package/build/server/common/req/customerRouter.pojo.js +0 -9
  63. package/build/server/common/req/customerRouter.pojo.js.map +0 -1
  64. package/build/server/common/req/data.pojo.js +0 -3
  65. package/build/server/common/req/data.pojo.js.map +0 -1
  66. package/build/server/common/req/ddns.pojo.js +0 -39
  67. package/build/server/common/req/ddns.pojo.js.map +0 -1
  68. package/build/server/common/req/file.req.js +0 -46
  69. package/build/server/common/req/file.req.js.map +0 -1
  70. package/build/server/common/req/http_controller_router.js +0 -13
  71. package/build/server/common/req/http_controller_router.js.map +0 -1
  72. package/build/server/common/req/net.pojo.js +0 -49
  73. package/build/server/common/req/net.pojo.js.map +0 -1
  74. package/build/server/common/req/setting.req.js +0 -37
  75. package/build/server/common/req/setting.req.js.map +0 -1
  76. package/build/server/common/req/ssh.pojo.js +0 -13
  77. package/build/server/common/req/ssh.pojo.js.map +0 -1
  78. package/build/server/common/req/sys.pojo.js +0 -23
  79. package/build/server/common/req/sys.pojo.js.map +0 -1
  80. package/build/server/common/req/user.req.js +0 -91
  81. package/build/server/common/req/user.req.js.map +0 -1
  82. package/build/server/common/word_detection_js.js +0 -142
  83. package/build/server/common/word_detection_js.js.map +0 -1
  84. package/build/server/main/domain/bin/bin.js +0 -149
  85. package/build/server/main/domain/bin/bin.js.map +0 -1
  86. package/build/server/main/domain/crypto/crypto.controller.js +0 -63
  87. package/build/server/main/domain/crypto/crypto.controller.js.map +0 -1
  88. package/build/server/main/domain/crypto/crypto.service.js +0 -112
  89. package/build/server/main/domain/crypto/crypto.service.js.map +0 -1
  90. package/build/server/main/domain/data/DataUtil.js +0 -111
  91. package/build/server/main/domain/data/DataUtil.js.map +0 -1
  92. package/build/server/main/domain/data/basedata/base_data_util.js +0 -241
  93. package/build/server/main/domain/data/basedata/base_data_util.js.map +0 -1
  94. package/build/server/main/domain/data/data_type.js +0 -74
  95. package/build/server/main/domain/data/data_type.js.map +0 -1
  96. package/build/server/main/domain/ddns/ddns.ali.server.js +0 -88
  97. package/build/server/main/domain/ddns/ddns.ali.server.js.map +0 -1
  98. package/build/server/main/domain/ddns/ddns.controller.js +0 -103
  99. package/build/server/main/domain/ddns/ddns.controller.js.map +0 -1
  100. package/build/server/main/domain/ddns/ddns.dnspod.service.js +0 -121
  101. package/build/server/main/domain/ddns/ddns.dnspod.service.js.map +0 -1
  102. package/build/server/main/domain/ddns/ddns.pre.js +0 -120
  103. package/build/server/main/domain/ddns/ddns.pre.js.map +0 -1
  104. package/build/server/main/domain/ddns/ddns.service.js +0 -175
  105. package/build/server/main/domain/ddns/ddns.service.js.map +0 -1
  106. package/build/server/main/domain/ddns/ddns.tengxun.service.js +0 -57
  107. package/build/server/main/domain/ddns/ddns.tengxun.service.js.map +0 -1
  108. package/build/server/main/domain/ddns/tx/abstract_client.js +0 -270
  109. package/build/server/main/domain/ddns/tx/abstract_client.js.map +0 -1
  110. package/build/server/main/domain/ddns/tx/dnspod_client.js +0 -65
  111. package/build/server/main/domain/ddns/tx/dnspod_client.js.map +0 -1
  112. package/build/server/main/domain/ddns/tx/dnspod_models.js +0 -3
  113. package/build/server/main/domain/ddns/tx/dnspod_models.js.map +0 -1
  114. package/build/server/main/domain/ddns/tx/exception/tencent_cloud_sdk_exception.js +0 -38
  115. package/build/server/main/domain/ddns/tx/exception/tencent_cloud_sdk_exception.js.map +0 -1
  116. package/build/server/main/domain/ddns/tx/http/fetch.js +0 -3
  117. package/build/server/main/domain/ddns/tx/http/fetch.js.map +0 -1
  118. package/build/server/main/domain/ddns/tx/http/http_connection.js +0 -194
  119. package/build/server/main/domain/ddns/tx/http/http_connection.js.map +0 -1
  120. package/build/server/main/domain/ddns/tx/interface.js +0 -5
  121. package/build/server/main/domain/ddns/tx/interface.js.map +0 -1
  122. package/build/server/main/domain/ddns/tx/sdk_version.js +0 -5
  123. package/build/server/main/domain/ddns/tx/sdk_version.js.map +0 -1
  124. package/build/server/main/domain/ddns/tx/sign.js +0 -142
  125. package/build/server/main/domain/ddns/tx/sign.js.map +0 -1
  126. package/build/server/main/domain/ddns/tx/sse_response_model.js +0 -124
  127. package/build/server/main/domain/ddns/tx/sse_response_model.js.map +0 -1
  128. package/build/server/main/domain/file/FileUtil.js +0 -96
  129. package/build/server/main/domain/file/FileUtil.js.map +0 -1
  130. package/build/server/main/domain/file/file.compress.js +0 -131
  131. package/build/server/main/domain/file/file.compress.js.map +0 -1
  132. package/build/server/main/domain/file/file.controller.js +0 -483
  133. package/build/server/main/domain/file/file.controller.js.map +0 -1
  134. package/build/server/main/domain/file/file.service.js +0 -1123
  135. package/build/server/main/domain/file/file.service.js.map +0 -1
  136. package/build/server/main/domain/file/search/file.search.js +0 -83
  137. package/build/server/main/domain/file/search/file.search.js.map +0 -1
  138. package/build/server/main/domain/file/search/file.search.worker.js +0 -100
  139. package/build/server/main/domain/file/search/file.search.worker.js.map +0 -1
  140. package/build/server/main/domain/file/search/file.type.js +0 -3
  141. package/build/server/main/domain/file/search/file.type.js.map +0 -1
  142. package/build/server/main/domain/file/workflow/workflow.process.js +0 -104
  143. package/build/server/main/domain/file/workflow/workflow.process.js.map +0 -1
  144. package/build/server/main/domain/file/workflow/workflow.service.js +0 -687
  145. package/build/server/main/domain/file/workflow/workflow.service.js.map +0 -1
  146. package/build/server/main/domain/file/workflow/workflow.util.js +0 -121
  147. package/build/server/main/domain/file/workflow/workflow.util.js.map +0 -1
  148. package/build/server/main/domain/navindex/navindex.controller.js +0 -73
  149. package/build/server/main/domain/navindex/navindex.controller.js.map +0 -1
  150. package/build/server/main/domain/net/net.controller.js +0 -196
  151. package/build/server/main/domain/net/net.controller.js.map +0 -1
  152. package/build/server/main/domain/net/net.datautil.js +0 -8
  153. package/build/server/main/domain/net/net.datautil.js.map +0 -1
  154. package/build/server/main/domain/net/net.service.js +0 -415
  155. package/build/server/main/domain/net/net.service.js.map +0 -1
  156. package/build/server/main/domain/net/util/NetClientUtil.js +0 -246
  157. package/build/server/main/domain/net/util/NetClientUtil.js.map +0 -1
  158. package/build/server/main/domain/net/util/NetServerUtil.js +0 -128
  159. package/build/server/main/domain/net/util/NetServerUtil.js.map +0 -1
  160. package/build/server/main/domain/net/util/NetUtil.js +0 -129
  161. package/build/server/main/domain/net/util/NetUtil.js.map +0 -1
  162. package/build/server/main/domain/net/util/tcp.util.js +0 -137
  163. package/build/server/main/domain/net/util/tcp.util.js.map +0 -1
  164. package/build/server/main/domain/net/util/udp.util.js +0 -28
  165. package/build/server/main/domain/net/util/udp.util.js.map +0 -1
  166. package/build/server/main/domain/net/virtual/tcp_proxy.js +0 -106
  167. package/build/server/main/domain/net/virtual/tcp_proxy.js.map +0 -1
  168. package/build/server/main/domain/net/virtual/virtual.client.service.js +0 -445
  169. package/build/server/main/domain/net/virtual/virtual.client.service.js.map +0 -1
  170. package/build/server/main/domain/net/virtual/virtual.controller.js +0 -263
  171. package/build/server/main/domain/net/virtual/virtual.controller.js.map +0 -1
  172. package/build/server/main/domain/net/virtual/virtual.server.service.js +0 -91
  173. package/build/server/main/domain/net/virtual/virtual.server.service.js.map +0 -1
  174. package/build/server/main/domain/pre/lifeRecordService.js +0 -92
  175. package/build/server/main/domain/pre/lifeRecordService.js.map +0 -1
  176. package/build/server/main/domain/rdp/lib/asn1/ber.js +0 -66
  177. package/build/server/main/domain/rdp/lib/asn1/ber.js.map +0 -1
  178. package/build/server/main/domain/rdp/lib/asn1/index.js +0 -9
  179. package/build/server/main/domain/rdp/lib/asn1/index.js.map +0 -1
  180. package/build/server/main/domain/rdp/lib/asn1/spec.js +0 -56
  181. package/build/server/main/domain/rdp/lib/asn1/spec.js.map +0 -1
  182. package/build/server/main/domain/rdp/lib/asn1/univ.js +0 -315
  183. package/build/server/main/domain/rdp/lib/asn1/univ.js.map +0 -1
  184. package/build/server/main/domain/rdp/lib/core/error.js +0 -25
  185. package/build/server/main/domain/rdp/lib/core/error.js.map +0 -1
  186. package/build/server/main/domain/rdp/lib/core/index.js +0 -13
  187. package/build/server/main/domain/rdp/lib/core/index.js.map +0 -1
  188. package/build/server/main/domain/rdp/lib/core/layer.js +0 -135
  189. package/build/server/main/domain/rdp/lib/core/layer.js.map +0 -1
  190. package/build/server/main/domain/rdp/lib/core/log.js +0 -25
  191. package/build/server/main/domain/rdp/lib/core/log.js.map +0 -1
  192. package/build/server/main/domain/rdp/lib/core/rle.js +0 -22699
  193. package/build/server/main/domain/rdp/lib/core/rle.js.map +0 -1
  194. package/build/server/main/domain/rdp/lib/core/type.js +0 -245
  195. package/build/server/main/domain/rdp/lib/core/type.js.map +0 -1
  196. package/build/server/main/domain/rdp/lib/index.js +0 -6
  197. package/build/server/main/domain/rdp/lib/index.js.map +0 -1
  198. package/build/server/main/domain/rdp/lib/protocol/cert.js +0 -115
  199. package/build/server/main/domain/rdp/lib/protocol/cert.js.map +0 -1
  200. package/build/server/main/domain/rdp/lib/protocol/index.js +0 -11
  201. package/build/server/main/domain/rdp/lib/protocol/index.js.map +0 -1
  202. package/build/server/main/domain/rdp/lib/protocol/nla.js +0 -549
  203. package/build/server/main/domain/rdp/lib/protocol/nla.js.map +0 -1
  204. package/build/server/main/domain/rdp/lib/protocol/pdu/caps.js +0 -486
  205. package/build/server/main/domain/rdp/lib/protocol/pdu/caps.js.map +0 -1
  206. package/build/server/main/domain/rdp/lib/protocol/pdu/cliprdr.js +0 -167
  207. package/build/server/main/domain/rdp/lib/protocol/pdu/cliprdr.js.map +0 -1
  208. package/build/server/main/domain/rdp/lib/protocol/pdu/data.js +0 -876
  209. package/build/server/main/domain/rdp/lib/protocol/pdu/data.js.map +0 -1
  210. package/build/server/main/domain/rdp/lib/protocol/pdu/global.js +0 -260
  211. package/build/server/main/domain/rdp/lib/protocol/pdu/global.js.map +0 -1
  212. package/build/server/main/domain/rdp/lib/protocol/pdu/index.js +0 -13
  213. package/build/server/main/domain/rdp/lib/protocol/pdu/index.js.map +0 -1
  214. package/build/server/main/domain/rdp/lib/protocol/pdu/lic.js +0 -199
  215. package/build/server/main/domain/rdp/lib/protocol/pdu/lic.js.map +0 -1
  216. package/build/server/main/domain/rdp/lib/protocol/pdu/sec.js +0 -333
  217. package/build/server/main/domain/rdp/lib/protocol/pdu/sec.js.map +0 -1
  218. package/build/server/main/domain/rdp/lib/protocol/rdp.js +0 -255
  219. package/build/server/main/domain/rdp/lib/protocol/rdp.js.map +0 -1
  220. package/build/server/main/domain/rdp/lib/protocol/t125/gcc.js +0 -354
  221. package/build/server/main/domain/rdp/lib/protocol/t125/gcc.js.map +0 -1
  222. package/build/server/main/domain/rdp/lib/protocol/t125/index.js +0 -7
  223. package/build/server/main/domain/rdp/lib/protocol/t125/index.js.map +0 -1
  224. package/build/server/main/domain/rdp/lib/protocol/t125/mcs.js +0 -318
  225. package/build/server/main/domain/rdp/lib/protocol/t125/mcs.js.map +0 -1
  226. package/build/server/main/domain/rdp/lib/protocol/t125/per.js +0 -188
  227. package/build/server/main/domain/rdp/lib/protocol/t125/per.js.map +0 -1
  228. package/build/server/main/domain/rdp/lib/protocol/tpkt.js +0 -94
  229. package/build/server/main/domain/rdp/lib/protocol/tpkt.js.map +0 -1
  230. package/build/server/main/domain/rdp/lib/protocol/x224.js +0 -207
  231. package/build/server/main/domain/rdp/lib/protocol/x224.js.map +0 -1
  232. package/build/server/main/domain/rdp/lib/security/index.js +0 -7
  233. package/build/server/main/domain/rdp/lib/security/index.js.map +0 -1
  234. package/build/server/main/domain/rdp/lib/security/jsbn.js +0 -1372
  235. package/build/server/main/domain/rdp/lib/security/jsbn.js.map +0 -1
  236. package/build/server/main/domain/rdp/lib/security/md4.js +0 -401
  237. package/build/server/main/domain/rdp/lib/security/md4.js.map +0 -1
  238. package/build/server/main/domain/rdp/lib/security/rc4.js +0 -45
  239. package/build/server/main/domain/rdp/lib/security/rc4.js.map +0 -1
  240. package/build/server/main/domain/rdp/lib/security/rsa.js +0 -15
  241. package/build/server/main/domain/rdp/lib/security/rsa.js.map +0 -1
  242. package/build/server/main/domain/rdp/lib/security/x509.js +0 -106
  243. package/build/server/main/domain/rdp/lib/security/x509.js.map +0 -1
  244. package/build/server/main/domain/rdp/rdp.controller.js +0 -137
  245. package/build/server/main/domain/rdp/rdp.controller.js.map +0 -1
  246. package/build/server/main/domain/rdp/rdp.service.js +0 -137
  247. package/build/server/main/domain/rdp/rdp.service.js.map +0 -1
  248. package/build/server/main/domain/setting/setting.controller.js +0 -518
  249. package/build/server/main/domain/setting/setting.controller.js.map +0 -1
  250. package/build/server/main/domain/setting/setting.prefile.js +0 -74
  251. package/build/server/main/domain/setting/setting.prefile.js.map +0 -1
  252. package/build/server/main/domain/setting/setting.service.js +0 -550
  253. package/build/server/main/domain/setting/setting.service.js.map +0 -1
  254. package/build/server/main/domain/shell/shell.controller.js +0 -115
  255. package/build/server/main/domain/shell/shell.controller.js.map +0 -1
  256. package/build/server/main/domain/shell/shell.service.js +0 -443
  257. package/build/server/main/domain/shell/shell.service.js.map +0 -1
  258. package/build/server/main/domain/ssh/ssh.controller.js +0 -236
  259. package/build/server/main/domain/ssh/ssh.controller.js.map +0 -1
  260. package/build/server/main/domain/ssh/ssh.service.js +0 -271
  261. package/build/server/main/domain/ssh/ssh.service.js.map +0 -1
  262. package/build/server/main/domain/ssh/ssh.ssh2.js +0 -250
  263. package/build/server/main/domain/ssh/ssh.ssh2.js.map +0 -1
  264. package/build/server/main/domain/sys/sys.controller.js +0 -395
  265. package/build/server/main/domain/sys/sys.controller.js.map +0 -1
  266. package/build/server/main/domain/sys/sys.docker.service.js +0 -367
  267. package/build/server/main/domain/sys/sys.docker.service.js.map +0 -1
  268. package/build/server/main/domain/sys/sys.process.service.js +0 -239
  269. package/build/server/main/domain/sys/sys.process.service.js.map +0 -1
  270. package/build/server/main/domain/sys/sys.service.js +0 -101
  271. package/build/server/main/domain/sys/sys.service.js.map +0 -1
  272. package/build/server/main/domain/sys/sys.sys.service.js +0 -192
  273. package/build/server/main/domain/sys/sys.sys.service.js.map +0 -1
  274. package/build/server/main/domain/sys/sys.systemd.service.js +0 -306
  275. package/build/server/main/domain/sys/sys.systemd.service.js.map +0 -1
  276. package/build/server/main/domain/sys/sys.utl.js +0 -23
  277. package/build/server/main/domain/sys/sys.utl.js.map +0 -1
  278. package/build/server/main/domain/user/user.controller.js +0 -264
  279. package/build/server/main/domain/user/user.controller.js.map +0 -1
  280. package/build/server/main/domain/user/user.hash.js +0 -8
  281. package/build/server/main/domain/user/user.hash.js.map +0 -1
  282. package/build/server/main/domain/user/user.service.js +0 -573
  283. package/build/server/main/domain/user/user.service.js.map +0 -1
  284. package/build/server/main/domain/video/video.controller.js +0 -71
  285. package/build/server/main/domain/video/video.controller.js.map +0 -1
  286. package/build/server/main/domain/video/video.service.js +0 -45
  287. package/build/server/main/domain/video/video.service.js.map +0 -1
  288. package/build/server/main/other/Result.js +0 -25
  289. package/build/server/main/other/Result.js.map +0 -1
  290. package/build/server/main/other/cache.js +0 -50
  291. package/build/server/main/other/cache.js.map +0 -1
  292. package/build/server/main/other/config.js +0 -6
  293. package/build/server/main/other/config.js.map +0 -1
  294. package/build/server/main/other/middleware/AuthMiddleware.js +0 -72
  295. package/build/server/main/other/middleware/AuthMiddleware.js.map +0 -1
  296. package/build/server/main/other/middleware/GlobalErrorHandler.js +0 -23
  297. package/build/server/main/other/middleware/GlobalErrorHandler.js.map +0 -1
  298. package/build/server/main/other/middleware/redirect.js +0 -20
  299. package/build/server/main/other/middleware/redirect.js.map +0 -1
  300. package/build/server/main/server.js +0 -155
  301. package/build/server/main/server.js.map +0 -1
  302. package/build/server/main/watch.js.map +0 -1
  303. package/build/server/tsconfig.tsbuildinfo +0 -1
  304. package/build/server/web/project/util/noty.js +0 -60
  305. package/build/server/web/project/util/noty.js.map +0 -1
  306. package/build/server/web/project/util/ws.js +0 -7
  307. package/build/server/web/project/util/ws.js.map +0 -1
  308. /package/build/dist/{181.11199e601b22f4add759.js.LICENSE.txt → 181.698840886ce3dc29d73a.js.LICENSE.txt} +0 -0
  309. /package/build/dist/{467.4c2e3af5ce77c069309f.js.LICENSE.txt → 523.98eb4a396698285c25ae.js.LICENSE.txt} +0 -0
  310. /package/build/dist/{523.cd76e6fafa6440cc1693.js.LICENSE.txt → 542.5aec7d0b23fecef190fe.js.LICENSE.txt} +0 -0
  311. /package/build/dist/{542.9a14bb22996fc6c6ff57.js.LICENSE.txt → 696.83bb8021ffd00ec3b06a.js.LICENSE.txt} +0 -0
  312. /package/build/dist/{827.e64e0af3c11c5bcd68c0.js.LICENSE.txt → 827.70ed0314d42b2bb5bf13.js.LICENSE.txt} +0 -0
  313. /package/build/dist/{908.c443be9c376945a5741a.js.LICENSE.txt → 908.597aca6b0e9459036607.js.LICENSE.txt} +0 -0
  314. /package/build/dist/{943.7e28d7ce1a69f0d15eb2.js.LICENSE.txt → 943.2ffec661e12e125e53de.js.LICENSE.txt} +0 -0
  315. /package/build/dist/{main.7d110d8fdcc3c74c6c82.js.LICENSE.txt → main.850641fd9483c1f04c2a.js.LICENSE.txt} +0 -0
@@ -1,876 +0,0 @@
1
- var caps = require('./caps');
2
- var type = require('../../core').type;
3
- var log = require('../../core').log;
4
- var PDUType = {
5
- PDUTYPE_DEMANDACTIVEPDU: 0x11,
6
- PDUTYPE_CONFIRMACTIVEPDU: 0x13,
7
- PDUTYPE_DEACTIVATEALLPDU: 0x16,
8
- PDUTYPE_DATAPDU: 0x17,
9
- PDUTYPE_SERVER_REDIR_PKT: 0x1A
10
- };
11
- var PDUType2 = {
12
- PDUTYPE2_UPDATE: 0x02,
13
- PDUTYPE2_CONTROL: 0x14,
14
- PDUTYPE2_POINTER: 0x1B,
15
- PDUTYPE2_INPUT: 0x1C,
16
- PDUTYPE2_SYNCHRONIZE: 0x1F,
17
- PDUTYPE2_REFRESH_RECT: 0x21,
18
- PDUTYPE2_PLAY_SOUND: 0x22,
19
- PDUTYPE2_SUPPRESS_OUTPUT: 0x23,
20
- PDUTYPE2_SHUTDOWN_REQUEST: 0x24,
21
- PDUTYPE2_SHUTDOWN_DENIED: 0x25,
22
- PDUTYPE2_SAVE_SESSION_INFO: 0x26,
23
- PDUTYPE2_FONTLIST: 0x27,
24
- PDUTYPE2_FONTMAP: 0x28,
25
- PDUTYPE2_SET_KEYBOARD_INDICATORS: 0x29,
26
- PDUTYPE2_BITMAPCACHE_PERSISTENT_LIST: 0x2B,
27
- PDUTYPE2_BITMAPCACHE_ERROR_PDU: 0x2C,
28
- PDUTYPE2_SET_KEYBOARD_IME_STATUS: 0x2D,
29
- PDUTYPE2_OFFSCRCACHE_ERROR_PDU: 0x2E,
30
- PDUTYPE2_SET_ERROR_INFO_PDU: 0x2F,
31
- PDUTYPE2_DRAWNINEGRID_ERROR_PDU: 0x30,
32
- PDUTYPE2_DRAWGDIPLUS_ERROR_PDU: 0x31,
33
- PDUTYPE2_ARC_STATUS_PDU: 0x32,
34
- PDUTYPE2_STATUS_INFO_PDU: 0x36,
35
- PDUTYPE2_MONITOR_LAYOUT_PDU: 0x37
36
- };
37
- var StreamId = {
38
- STREAM_UNDEFINED: 0x00,
39
- STREAM_LOW: 0x01,
40
- STREAM_MED: 0x02,
41
- STREAM_HI: 0x04
42
- };
43
- var CompressionOrder = {
44
- CompressionTypeMask: 0x0F,
45
- PACKET_COMPRESSED: 0x20,
46
- PACKET_AT_FRONT: 0x40,
47
- PACKET_FLUSHED: 0x80
48
- };
49
- var CompressionType = {
50
- PACKET_COMPR_TYPE_8K: 0x0,
51
- PACKET_COMPR_TYPE_64K: 0x1,
52
- PACKET_COMPR_TYPE_RDP6: 0x2,
53
- PACKET_COMPR_TYPE_RDP61: 0x3,
54
- };
55
- var Action = {
56
- CTRLACTION_REQUEST_CONTROL: 0x0001,
57
- CTRLACTION_GRANTED_CONTROL: 0x0002,
58
- CTRLACTION_DETACH: 0x0003,
59
- CTRLACTION_COOPERATE: 0x0004
60
- };
61
- var PersistentKeyListFlag = {
62
- PERSIST_FIRST_PDU: 0x01,
63
- PERSIST_LAST_PDU: 0x02
64
- };
65
- var BitmapFlag = {
66
- BITMAP_COMPRESSION: 0x0001,
67
- NO_BITMAP_COMPRESSION_HDR: 0x0400
68
- };
69
- var UpdateType = {
70
- UPDATETYPE_ORDERS: 0x0000,
71
- UPDATETYPE_BITMAP: 0x0001,
72
- UPDATETYPE_PALETTE: 0x0002,
73
- UPDATETYPE_SYNCHRONIZE: 0x0003
74
- };
75
- var UpdateType = {
76
- UPDATETYPE_ORDERS: 0x0000,
77
- UPDATETYPE_BITMAP: 0x0001,
78
- UPDATETYPE_PALETTE: 0x0002,
79
- UPDATETYPE_SYNCHRONIZE: 0x0003
80
- };
81
- var InputMessageType = {
82
- INPUT_EVENT_SYNC: 0x0000,
83
- INPUT_EVENT_UNUSED: 0x0002,
84
- INPUT_EVENT_SCANCODE: 0x0004,
85
- INPUT_EVENT_UNICODE: 0x0005,
86
- INPUT_EVENT_MOUSE: 0x8001,
87
- INPUT_EVENT_MOUSEX: 0x8002
88
- };
89
- var PointerFlag = {
90
- PTRFLAGS_HWHEEL: 0x0400,
91
- PTRFLAGS_WHEEL: 0x0200,
92
- PTRFLAGS_WHEEL_NEGATIVE: 0x0100,
93
- WheelRotationMask: 0x01FF,
94
- PTRFLAGS_MOVE: 0x0800,
95
- PTRFLAGS_DOWN: 0x8000,
96
- PTRFLAGS_BUTTON1: 0x1000,
97
- PTRFLAGS_BUTTON2: 0x2000,
98
- PTRFLAGS_BUTTON3: 0x4000
99
- };
100
- var KeyboardFlag = {
101
- KBDFLAGS_EXTENDED: 0x0100,
102
- KBDFLAGS_DOWN: 0x4000,
103
- KBDFLAGS_RELEASE: 0x8000
104
- };
105
- var FastPathUpdateType = {
106
- FASTPATH_UPDATETYPE_ORDERS: 0x0,
107
- FASTPATH_UPDATETYPE_BITMAP: 0x1,
108
- FASTPATH_UPDATETYPE_PALETTE: 0x2,
109
- FASTPATH_UPDATETYPE_SYNCHRONIZE: 0x3,
110
- FASTPATH_UPDATETYPE_SURFCMDS: 0x4,
111
- FASTPATH_UPDATETYPE_PTR_NULL: 0x5,
112
- FASTPATH_UPDATETYPE_PTR_DEFAULT: 0x6,
113
- FASTPATH_UPDATETYPE_PTR_POSITION: 0x8,
114
- FASTPATH_UPDATETYPE_COLOR: 0x9,
115
- FASTPATH_UPDATETYPE_CACHED: 0xA,
116
- FASTPATH_UPDATETYPE_POINTER: 0xB
117
- };
118
- var FastPathOutputCompression = {
119
- FASTPATH_OUTPUT_COMPRESSION_USED: 0x2
120
- };
121
- var Display = {
122
- SUPPRESS_DISPLAY_UPDATES: 0x00,
123
- ALLOW_DISPLAY_UPDATES: 0x01
124
- };
125
- var ToogleFlag = {
126
- TS_SYNC_SCROLL_LOCK: 0x00000001,
127
- TS_SYNC_NUM_LOCK: 0x00000002,
128
- TS_SYNC_CAPS_LOCK: 0x00000004,
129
- TS_SYNC_KANA_LOCK: 0x00000008
130
- };
131
- var ErrorInfo = {
132
- ERRINFO_RPC_INITIATED_DISCONNECT: 0x00000001,
133
- ERRINFO_RPC_INITIATED_LOGOFF: 0x00000002,
134
- ERRINFO_IDLE_TIMEOUT: 0x00000003,
135
- ERRINFO_LOGON_TIMEOUT: 0x00000004,
136
- ERRINFO_DISCONNECTED_BY_OTHERCONNECTION: 0x00000005,
137
- ERRINFO_OUT_OF_MEMORY: 0x00000006,
138
- ERRINFO_SERVER_DENIED_CONNECTION: 0x00000007,
139
- ERRINFO_SERVER_INSUFFICIENT_PRIVILEGES: 0x00000009,
140
- ERRINFO_SERVER_FRESH_CREDENTIALS_REQUIRED: 0x0000000A,
141
- ERRINFO_RPC_INITIATED_DISCONNECT_BYUSER: 0x0000000B,
142
- ERRINFO_LOGOFF_BY_USER: 0x0000000C,
143
- ERRINFO_LICENSE_INTERNAL: 0x00000100,
144
- ERRINFO_LICENSE_NO_LICENSE_SERVER: 0x00000101,
145
- ERRINFO_LICENSE_NO_LICENSE: 0x00000102,
146
- ERRINFO_LICENSE_BAD_CLIENT_MSG: 0x00000103,
147
- ERRINFO_LICENSE_HWID_DOESNT_MATCH_LICENSE: 0x00000104,
148
- ERRINFO_LICENSE_BAD_CLIENT_LICENSE: 0x00000105,
149
- ERRINFO_LICENSE_CANT_FINISH_PROTOCOL: 0x00000106,
150
- ERRINFO_LICENSE_CLIENT_ENDED_PROTOCOL: 0x00000107,
151
- ERRINFO_LICENSE_BAD_CLIENT_ENCRYPTION: 0x00000108,
152
- ERRINFO_LICENSE_CANT_UPGRADE_LICENSE: 0x00000109,
153
- ERRINFO_LICENSE_NO_REMOTE_CONNECTIONS: 0x0000010A,
154
- ERRINFO_CB_DESTINATION_NOT_FOUND: 0x0000400,
155
- ERRINFO_CB_LOADING_DESTINATION: 0x0000402,
156
- ERRINFO_CB_REDIRECTING_TO_DESTINATION: 0x0000404,
157
- ERRINFO_CB_SESSION_ONLINE_VM_WAKE: 0x0000405,
158
- ERRINFO_CB_SESSION_ONLINE_VM_BOOT: 0x0000406,
159
- ERRINFO_CB_SESSION_ONLINE_VM_NO_DNS: 0x0000407,
160
- ERRINFO_CB_DESTINATION_POOL_NOT_FREE: 0x0000408,
161
- ERRINFO_CB_CONNECTION_CANCELLED: 0x0000409,
162
- ERRINFO_CB_CONNECTION_ERROR_INVALID_SETTINGS: 0x0000410,
163
- ERRINFO_CB_SESSION_ONLINE_VM_BOOT_TIMEOUT: 0x0000411,
164
- ERRINFO_CB_SESSION_ONLINE_VM_SESSMON_FAILED: 0x0000412,
165
- ERRINFO_UNKNOWNPDUTYPE2: 0x000010C9,
166
- ERRINFO_UNKNOWNPDUTYPE: 0x000010CA,
167
- ERRINFO_DATAPDUSEQUENCE: 0x000010CB,
168
- ERRINFO_CONTROLPDUSEQUENCE: 0x000010CD,
169
- ERRINFO_INVALIDCONTROLPDUACTION: 0x000010CE,
170
- ERRINFO_INVALIDINPUTPDUTYPE: 0x000010CF,
171
- ERRINFO_INVALIDINPUTPDUMOUSE: 0x000010D0,
172
- ERRINFO_INVALIDREFRESHRECTPDU: 0x000010D1,
173
- ERRINFO_CREATEUSERDATAFAILED: 0x000010D2,
174
- ERRINFO_CONNECTFAILED: 0x000010D3,
175
- ERRINFO_CONFIRMACTIVEWRONGSHAREID: 0x000010D4,
176
- ERRINFO_CONFIRMACTIVEWRONGORIGINATOR: 0x000010D5,
177
- ERRINFO_PERSISTENTKEYPDUBADLENGTH: 0x000010DA,
178
- ERRINFO_PERSISTENTKEYPDUILLEGALFIRST: 0x000010DB,
179
- ERRINFO_PERSISTENTKEYPDUTOOMANYTOTALKEYS: 0x000010DC,
180
- ERRINFO_PERSISTENTKEYPDUTOOMANYCACHEKEYS: 0x000010DD,
181
- ERRINFO_INPUTPDUBADLENGTH: 0x000010DE,
182
- ERRINFO_BITMAPCACHEERRORPDUBADLENGTH: 0x000010DF,
183
- ERRINFO_SECURITYDATATOOSHORT: 0x000010E0,
184
- ERRINFO_VCHANNELDATATOOSHORT: 0x000010E1,
185
- ERRINFO_SHAREDATATOOSHORT: 0x000010E2,
186
- ERRINFO_BADSUPRESSOUTPUTPDU: 0x000010E3,
187
- ERRINFO_CONFIRMACTIVEPDUTOOSHORT: 0x000010E5,
188
- ERRINFO_CAPABILITYSETTOOSMALL: 0x000010E7,
189
- ERRINFO_CAPABILITYSETTOOLARGE: 0x000010E8,
190
- ERRINFO_NOCURSORCACHE: 0x000010E9,
191
- ERRINFO_BADCAPABILITIES: 0x000010EA,
192
- ERRINFO_VIRTUALCHANNELDECOMPRESSIONERR: 0x000010EC,
193
- ERRINFO_INVALIDVCCOMPRESSIONTYPE: 0x000010ED,
194
- ERRINFO_INVALIDCHANNELID: 0x000010EF,
195
- ERRINFO_VCHANNELSTOOMANY: 0x000010F0,
196
- ERRINFO_REMOTEAPPSNOTENABLED: 0x000010F3,
197
- ERRINFO_CACHECAPNOTSET: 0x000010F4,
198
- ERRINFO_BITMAPCACHEERRORPDUBADLENGTH2: 0x000010F5,
199
- ERRINFO_OFFSCRCACHEERRORPDUBADLENGTH: 0x000010F6,
200
- ERRINFO_DNGCACHEERRORPDUBADLENGTH: 0x000010F7,
201
- ERRINFO_GDIPLUSPDUBADLENGTH: 0x000010F8,
202
- ERRINFO_SECURITYDATATOOSHORT2: 0x00001111,
203
- ERRINFO_SECURITYDATATOOSHORT3: 0x00001112,
204
- ERRINFO_SECURITYDATATOOSHORT4: 0x00001113,
205
- ERRINFO_SECURITYDATATOOSHORT5: 0x00001114,
206
- ERRINFO_SECURITYDATATOOSHORT6: 0x00001115,
207
- ERRINFO_SECURITYDATATOOSHORT7: 0x00001116,
208
- ERRINFO_SECURITYDATATOOSHORT8: 0x00001117,
209
- ERRINFO_SECURITYDATATOOSHORT9: 0x00001118,
210
- ERRINFO_SECURITYDATATOOSHORT10: 0x00001119,
211
- ERRINFO_SECURITYDATATOOSHORT11: 0x0000111A,
212
- ERRINFO_SECURITYDATATOOSHORT12: 0x0000111B,
213
- ERRINFO_SECURITYDATATOOSHORT13: 0x0000111C,
214
- ERRINFO_SECURITYDATATOOSHORT14: 0x0000111D,
215
- ERRINFO_SECURITYDATATOOSHORT15: 0x0000111E,
216
- ERRINFO_SECURITYDATATOOSHORT16: 0x0000111F,
217
- ERRINFO_SECURITYDATATOOSHORT17: 0x00001120,
218
- ERRINFO_SECURITYDATATOOSHORT18: 0x00001121,
219
- ERRINFO_SECURITYDATATOOSHORT19: 0x00001122,
220
- ERRINFO_SECURITYDATATOOSHORT20: 0x00001123,
221
- ERRINFO_SECURITYDATATOOSHORT21: 0x00001124,
222
- ERRINFO_SECURITYDATATOOSHORT22: 0x00001125,
223
- ERRINFO_SECURITYDATATOOSHORT23: 0x00001126,
224
- ERRINFO_BADMONITORDATA: 0x00001129,
225
- ERRINFO_VCDECOMPRESSEDREASSEMBLEFAILED: 0x0000112A,
226
- ERRINFO_VCDATATOOLONG: 0x0000112B,
227
- ERRINFO_BAD_FRAME_ACK_DATA: 0x0000112C,
228
- ERRINFO_GRAPHICSMODENOTSUPPORTED: 0x0000112D,
229
- ERRINFO_GRAPHICSSUBSYSTEMRESETFAILED: 0x0000112E,
230
- ERRINFO_GRAPHICSSUBSYSTEMFAILED: 0x0000112F,
231
- ERRINFO_TIMEZONEKEYNAMELENGTHTOOSHORT: 0x00001130,
232
- ERRINFO_TIMEZONEKEYNAMELENGTHTOOLONG: 0x00001131,
233
- ERRINFO_DYNAMICDSTDISABLEDFIELDMISSING: 0x00001132,
234
- ERRINFO_VCDECODINGERROR: 0x00001133,
235
- ERRINFO_UPDATESESSIONKEYFAILED: 0x00001191,
236
- ERRINFO_DECRYPTFAILED: 0x00001192,
237
- ERRINFO_ENCRYPTFAILED: 0x00001193,
238
- ERRINFO_ENCPKGMISMATCH: 0x00001194,
239
- ERRINFO_DECRYPTFAILED2: 0x00001195
240
- };
241
- function shareControlHeader(length, pduType, userId, opt) {
242
- var self = {
243
- totalLength: new type.UInt16Le(length),
244
- pduType: new type.UInt16Le(pduType),
245
- PDUSource: new type.UInt16Le(userId, { optional: true })
246
- };
247
- return new type.Component(self, opt);
248
- }
249
- function shareDataHeader(length, pduType2, shareId, opt) {
250
- var self = {
251
- shareId: new type.UInt32Le(shareId),
252
- pad1: new type.UInt8(),
253
- streamId: new type.UInt8(StreamId.STREAM_LOW),
254
- uncompressedLength: new type.UInt16Le(function () {
255
- return length.value - 8;
256
- }),
257
- pduType2: new type.UInt8(pduType2),
258
- compressedType: new type.UInt8(),
259
- compressedLength: new type.UInt16Le()
260
- };
261
- return new type.Component(self, opt);
262
- }
263
- function demandActivePDU(capabilities, opt) {
264
- var self = {
265
- __PDUTYPE__: PDUType.PDUTYPE_DEMANDACTIVEPDU,
266
- shareId: new type.UInt32Le(),
267
- lengthSourceDescriptor: new type.UInt16Le(function () {
268
- return self.sourceDescriptor.size();
269
- }),
270
- lengthCombinedCapabilities: new type.UInt16Le(function () {
271
- return self.numberCapabilities.size() + self.pad2Octets.size() + self.capabilitySets.size();
272
- }),
273
- sourceDescriptor: new type.BinaryString(Buffer.from('node-rdpjs', 'binary'), { readLength: new type.CallableValue(function () {
274
- return self.lengthSourceDescriptor.value;
275
- }) }),
276
- numberCapabilities: new type.UInt16Le(function () {
277
- return self.capabilitySets.obj.length;
278
- }),
279
- pad2Octets: new type.UInt16Le(),
280
- capabilitySets: capabilities || new type.Factory(function (s) {
281
- self.capabilitySets = new type.Component([]);
282
- for (var i = 0; i < self.numberCapabilities.value; i++) {
283
- self.capabilitySets.obj.push(caps.capability().read(s));
284
- }
285
- }),
286
- sessionId: new type.UInt32Le()
287
- };
288
- return new type.Component(self, opt);
289
- }
290
- function confirmActivePDU(capabilities, shareId, opt) {
291
- var self = {
292
- __PDUTYPE__: PDUType.PDUTYPE_CONFIRMACTIVEPDU,
293
- shareId: new type.UInt32Le(shareId),
294
- originatorId: new type.UInt16Le(0x03EA, { constant: true }),
295
- lengthSourceDescriptor: new type.UInt16Le(function () {
296
- return self.sourceDescriptor.size();
297
- }),
298
- lengthCombinedCapabilities: new type.UInt16Le(function () {
299
- return self.numberCapabilities.size() + self.pad2Octets.size() + self.capabilitySets.size();
300
- }),
301
- sourceDescriptor: new type.BinaryString(Buffer.from('rdpy', 'binary'), { readLength: new type.CallableValue(function () {
302
- return self.lengthSourceDescriptor.value;
303
- }) }),
304
- numberCapabilities: new type.UInt16Le(function () {
305
- return self.capabilitySets.obj.length;
306
- }),
307
- pad2Octets: new type.UInt16Le(),
308
- capabilitySets: capabilities || new type.Factory(function (s) {
309
- self.capabilitySets = new type.Component([]);
310
- for (var i = 0; i < self.numberCapabilities.value; i++) {
311
- self.capabilitySets.obj.push(caps.capability().read(s));
312
- }
313
- })
314
- };
315
- return new type.Component(self, opt);
316
- }
317
- function deactiveAllPDU(opt) {
318
- var self = {
319
- __PDUTYPE__: PDUType.PDUTYPE_DEACTIVATEALLPDU,
320
- shareId: new type.UInt32Le(),
321
- lengthSourceDescriptor: new type.UInt16Le(function () {
322
- return self.sourceDescriptor.size();
323
- }),
324
- sourceDescriptor: new type.BinaryString(Buffer.from('rdpy', 'binary'), { readLength: new type.CallableValue(function () {
325
- self.lengthSourceDescriptor;
326
- }) })
327
- };
328
- return new type.Component(self, opt);
329
- }
330
- function synchronizeDataPDU(targetUser, opt) {
331
- var self = {
332
- __PDUTYPE2__: PDUType2.PDUTYPE2_SYNCHRONIZE,
333
- messageType: new type.UInt16Le(1, { constant: true }),
334
- targetUser: new type.UInt16Le(targetUser)
335
- };
336
- return new type.Component(self, opt);
337
- }
338
- function controlDataPDU(action, opt) {
339
- var self = {
340
- __PDUTYPE2__: PDUType2.PDUTYPE2_CONTROL,
341
- action: new type.UInt16Le(action),
342
- grantId: new type.UInt16Le(),
343
- controlId: new type.UInt32Le()
344
- };
345
- return new type.Component(self, opt);
346
- }
347
- function errorInfoDataPDU(errorInfo, opt) {
348
- var self = {
349
- __PDUTYPE2__: PDUType2.PDUTYPE2_SET_ERROR_INFO_PDU,
350
- errorInfo: new type.UInt32Le(errorInfo)
351
- };
352
- return new type.Component(self, opt);
353
- }
354
- function fontListDataPDU(opt) {
355
- var self = {
356
- __PDUTYPE2__: PDUType2.PDUTYPE2_FONTLIST,
357
- numberFonts: new type.UInt16Le(),
358
- totalNumFonts: new type.UInt16Le(),
359
- listFlags: new type.UInt16Le(0x0003),
360
- entrySize: new type.UInt16Le(0x0032)
361
- };
362
- return new type.Component(self, opt);
363
- }
364
- function fontMapDataPDU(opt) {
365
- var self = {
366
- __PDUTYPE2__: PDUType2.PDUTYPE2_FONTMAP,
367
- numberEntries: new type.UInt16Le(),
368
- totalNumEntries: new type.UInt16Le(),
369
- mapFlags: new type.UInt16Le(0x0003),
370
- entrySize: new type.UInt16Le(0x0004)
371
- };
372
- return new type.Component(self, opt);
373
- }
374
- function persistentListEntry(opt) {
375
- var self = {
376
- key1: new type.UInt32Le(),
377
- key2: new type.UInt32Le()
378
- };
379
- return new type.Component(self, opt);
380
- }
381
- function persistentListPDU(entries, opt) {
382
- var self = {
383
- __PDUTYPE2__: PDUType2.PDUTYPE2_BITMAPCACHE_PERSISTENT_LIST,
384
- numEntriesCache0: new type.UInt16Le(),
385
- numEntriesCache1: new type.UInt16Le(),
386
- numEntriesCache2: new type.UInt16Le(),
387
- numEntriesCache3: new type.UInt16Le(),
388
- numEntriesCache4: new type.UInt16Le(),
389
- totalEntriesCache0: new type.UInt16Le(),
390
- totalEntriesCache1: new type.UInt16Le(),
391
- totalEntriesCache2: new type.UInt16Le(),
392
- totalEntriesCache3: new type.UInt16Le(),
393
- totalEntriesCache4: new type.UInt16Le(),
394
- bitMask: new type.UInt8(),
395
- pad2: new type.UInt8(),
396
- pad3: new type.UInt16Le(),
397
- entries: entries || new type.Factory(function (s) {
398
- var numEntries = self.numEntriesCache0.value + self.numEntriesCache1.value + self.numEntriesCache2.value + self.numEntriesCache3.value + self.numEntriesCache4.value;
399
- self.entries = new type.Component([]);
400
- for (var i = 0; i < numEntries; i++) {
401
- self.entries.obj.push(persistentListEntry().read(s));
402
- }
403
- })
404
- };
405
- return new type.Component(self, opt);
406
- }
407
- function synchronizeEvent(opt) {
408
- var self = {
409
- __INPUT_MESSAGE_TYPE__: InputMessageType.INPUT_EVENT_SYNC,
410
- pad2Octets: new type.UInt16Le(),
411
- toggleFlags: new type.UInt32Le()
412
- };
413
- return new type.Component(self, opt);
414
- }
415
- function pointerEvent(opt) {
416
- var self = {
417
- __INPUT_MESSAGE_TYPE__: InputMessageType.INPUT_EVENT_MOUSE,
418
- pointerFlags: new type.UInt16Le(),
419
- xPos: new type.UInt16Le(),
420
- yPos: new type.UInt16Le()
421
- };
422
- return new type.Component(self, opt);
423
- }
424
- function scancodeKeyEvent(opt) {
425
- var self = {
426
- __INPUT_MESSAGE_TYPE__: InputMessageType.INPUT_EVENT_SCANCODE,
427
- keyboardFlags: new type.UInt16Le(),
428
- keyCode: new type.UInt16Le(),
429
- pad2Octets: new type.UInt16Le()
430
- };
431
- return new type.Component(self, opt);
432
- }
433
- function unicodeKeyEvent(opt) {
434
- var self = {
435
- __INPUT_MESSAGE_TYPE__: InputMessageType.INPUT_EVENT_UNICODE,
436
- keyboardFlags: new type.UInt16Le(),
437
- unicode: new type.UInt16Le(),
438
- pad2Octets: new type.UInt16Le()
439
- };
440
- return new type.Component(self, opt);
441
- }
442
- function slowPathInputEvent(slowPathInputData, opt) {
443
- var self = {
444
- eventTime: new type.UInt32Le(),
445
- messageType: new type.UInt16Le(function () {
446
- return self.slowPathInputData.obj.__INPUT_MESSAGE_TYPE__;
447
- }),
448
- slowPathInputData: slowPathInputData || new type.Factory(function (s) {
449
- switch (self.messageType.value) {
450
- case InputMessageType.INPUT_EVENT_SYNC:
451
- self.slowPathInputData = synchronizeEvent().read(s);
452
- break;
453
- case InputMessageType.INPUT_EVENT_MOUSE:
454
- self.slowPathInputData = pointerEvent().read(s);
455
- break;
456
- case InputMessageType.INPUT_EVENT_SCANCODE:
457
- self.slowPathInputData = scancodeKeyEvent().read(s);
458
- break;
459
- case InputMessageType.INPUT_EVENT_UNICODE:
460
- self.slowPathInputData = unicodeKeyEvent().read(s);
461
- break;
462
- default:
463
- log.error('unknown slowPathInputEvent ' + self.messageType.value);
464
- }
465
- })
466
- };
467
- return new type.Component(self, opt);
468
- }
469
- function clientInputEventPDU(inputs, opt) {
470
- var self = {
471
- __PDUTYPE2__: PDUType2.PDUTYPE2_INPUT,
472
- numEvents: new type.UInt16Le(function () {
473
- return self.slowPathInputEvents.obj.length;
474
- }),
475
- pad2Octets: new type.UInt16Le(),
476
- slowPathInputEvents: inputs || new type.Factory(function (s) {
477
- self.slowPathInputEvents = new type.Component([]);
478
- for (var i = 0; i < self.numEvents.value; i++) {
479
- self.slowPathInputEvents.obj.push(slowPathInputEvent().read(s));
480
- }
481
- })
482
- };
483
- return new type.Component(self, opt);
484
- }
485
- function shutdownRequestPDU(opt) {
486
- var self = {
487
- __PDUTYPE2__: PDUType2.PDUTYPE2_SHUTDOWN_REQUEST
488
- };
489
- return new type.Component(self, opt);
490
- }
491
- function shutdownDeniedPDU(opt) {
492
- var self = {
493
- __PDUTYPE2__: PDUType2.PDUTYPE2_SHUTDOWN_DENIED
494
- };
495
- return new type.Component(self, opt);
496
- }
497
- function inclusiveRectangle(opt) {
498
- var self = {
499
- left: new type.UInt16Le(),
500
- top: new type.UInt16Le(),
501
- right: new type.UInt16Le(),
502
- bottom: new type.UInt16Le()
503
- };
504
- return new type.Component(self, opt);
505
- }
506
- function supressOutputDataPDU(opt) {
507
- var self = {
508
- __PDUTYPE2__: PDUType2.PDUTYPE2_SUPPRESS_OUTPUT,
509
- allowDisplayUpdates: new type.UInt8(),
510
- pad3Octets: new type.Component([new type.UInt8(), new type.UInt8(), new type.UInt8()]),
511
- desktopRect: inclusiveRectangle({ conditional: function () {
512
- return self.allowDisplayUpdates.value === Display.ALLOW_DISPLAY_UPDATES;
513
- } })
514
- };
515
- return new type.Component(self, opt);
516
- }
517
- function refreshRectPDU(rectangles, opt) {
518
- var self = {
519
- __PDUTYPE2__: PDUType2.PDUTYPE2_REFRESH_RECT,
520
- numberOfAreas: UInt8(function () {
521
- return self.areasToRefresh.obj.length;
522
- }),
523
- pad3Octets: new type.Component([new type.UInt8(), new type.UInt8(), new type.UInt8()]),
524
- areasToRefresh: rectangles || new type.Factory(function (s) {
525
- self.areasToRefresh = new type.Component([]);
526
- for (var i = 0; i < self.numberOfAreas.value; i++) {
527
- self.areasToRefresh.obj.push(inclusiveRectangle().read(s));
528
- }
529
- })
530
- };
531
- return new type.Component(self, opt);
532
- }
533
- function bitmapCompressedDataHeader(opt) {
534
- var self = {
535
- cbCompFirstRowSize: new type.UInt16Le(0x0000, { constant: true }),
536
- cbCompMainBodySize: new type.UInt16Le(),
537
- cbScanWidth: new type.UInt16Le(),
538
- cbUncompressedSize: new type.UInt16Le()
539
- };
540
- return new type.Component(self, opt);
541
- }
542
- function bitmapData(coord, opt) {
543
- coord = coord || {};
544
- var self = {
545
- destLeft: new type.UInt16Le(coord.destLeft),
546
- destTop: new type.UInt16Le(coord.destTop),
547
- destRight: new type.UInt16Le(coord.destRight),
548
- destBottom: new type.UInt16Le(coord.destBottom),
549
- width: new type.UInt16Le(coord.width),
550
- height: new type.UInt16Le(coord.height),
551
- bitsPerPixel: new type.UInt16Le(coord.bitsPerPixel),
552
- flags: new type.UInt16Le(),
553
- bitmapLength: new type.UInt16Le(function () {
554
- return self.bitmapComprHdr.size() + self.bitmapDataStream.size();
555
- }),
556
- bitmapComprHdr: bitmapCompressedDataHeader({ conditional: function () {
557
- return (self.flags.value & BitmapFlag.BITMAP_COMPRESSION) && !(self.flags.value & BitmapFlag.NO_BITMAP_COMPRESSION_HDR);
558
- } }),
559
- bitmapDataStream: new type.BinaryString(coord.data, { readLength: new type.CallableValue(function () {
560
- if (!self.flags.value & BitmapFlag.BITMAP_COMPRESSION || (self.flags.value & BitmapFlag.NO_BITMAP_COMPRESSION_HDR)) {
561
- return self.bitmapLength.value;
562
- }
563
- else {
564
- return self.bitmapComprHdr.cbCompMainBodySize.value;
565
- }
566
- }) })
567
- };
568
- return new type.Component(self, opt);
569
- }
570
- function bitmapUpdateDataPDU(data, opt) {
571
- var self = {
572
- __UPDATE_TYPE__: UpdateType.UPDATETYPE_BITMAP,
573
- numberRectangles: new type.UInt16Le(function () {
574
- return self.rectangles.obj.length;
575
- }),
576
- rectangles: data || new type.Factory(function (s) {
577
- self.rectangles = new type.Component([]);
578
- for (var i = 0; i < self.numberRectangles.value; i++) {
579
- self.rectangles.obj.push(bitmapData().read(s));
580
- }
581
- })
582
- };
583
- return new type.Component(self, opt);
584
- }
585
- function synchronizeUpdateDataPDU(opt) {
586
- var self = {
587
- pad2Octets: new type.UInt16Le()
588
- };
589
- return new type.Component(self, opt);
590
- }
591
- function updateDataPDU(updateData, opt) {
592
- var self = {
593
- __PDUTYPE2_: PDUType2.PDUTYPE2_UPDATE__,
594
- updateType: new type.UInt16Le(function () {
595
- return self.updateData.obj.__UPDATE_TYPE__;
596
- }),
597
- updateData: updateData || new type.Factory(function (s) {
598
- var options = { readLength: new type.CallableValue(function () {
599
- return opt.readLength.value - 2;
600
- }) };
601
- switch (self.updateType.value) {
602
- case UpdateType.UPDATETYPE_BITMAP:
603
- self.updateData = bitmapUpdateDataPDU(null, options).read(s);
604
- break;
605
- case UpdateType.UPDATETYPE_SYNCHRONIZE:
606
- self.updateData = synchronizeUpdateDataPDU(null, options).read(s);
607
- break;
608
- default:
609
- self.updateData = new type.BinaryString(null, options).read(s);
610
- log.debug('unknown updateDataPDU ' + self.updateType.value);
611
- }
612
- })
613
- };
614
- return new type.Component(self, opt);
615
- }
616
- function dataPDU(pduData, shareId, opt) {
617
- var self = {
618
- __PDUTYPE__: PDUType.PDUTYPE_DATAPDU,
619
- shareDataHeader: shareDataHeader(new type.CallableValue(function () {
620
- return new type.Component(self).size();
621
- }), function () {
622
- return self.pduData.obj.__PDUTYPE2__;
623
- }, shareId),
624
- pduData: pduData || new type.Factory(function (s) {
625
- var options = { readLength: new type.CallableValue(function () {
626
- return opt.readLength.value - self.shareDataHeader.size();
627
- }) };
628
- switch (self.shareDataHeader.obj.pduType2.value) {
629
- case PDUType2.PDUTYPE2_SYNCHRONIZE:
630
- self.pduData = synchronizeDataPDU(null, options).read(s);
631
- break;
632
- case PDUType2.PDUTYPE2_CONTROL:
633
- self.pduData = controlDataPDU(null, options).read(s);
634
- break;
635
- case PDUType2.PDUTYPE2_SET_ERROR_INFO_PDU:
636
- self.pduData = errorInfoDataPDU(null, options).read(s);
637
- break;
638
- case PDUType2.PDUTYPE2_FONTLIST:
639
- self.pduData = fontListDataPDU(options).read(s);
640
- break;
641
- case PDUType2.PDUTYPE2_FONTMAP:
642
- self.pduData = fontMapDataPDU(options).read(s);
643
- break;
644
- case PDUType2.PDUTYPE2_BITMAPCACHE_PERSISTENT_LIST:
645
- self.pduData = persistentListPDU(null, options).read(s);
646
- break;
647
- case PDUType2.PDUTYPE2_INPUT:
648
- self.pduData = clientInputEventPDU(null, options).read(s);
649
- break;
650
- case PDUType2.PDUTYPE2_SHUTDOWN_REQUEST:
651
- self.pduData = shutdownRequestPDU(options).read(s);
652
- break;
653
- case PDUType2.PDUTYPE2_SHUTDOWN_DENIED:
654
- self.pduData = shutdownDeniedPDU(options).read(s);
655
- break;
656
- case PDUType2.PDUTYPE2_SUPPRESS_OUTPUT:
657
- self.pduData = supressOutputDataPDU(options).read(s);
658
- break;
659
- case PDUType2.PDUTYPE2_REFRESH_RECT:
660
- self.pduData = refreshRectPDU(null, options).read(s);
661
- break;
662
- case PDUType2.PDUTYPE2_UPDATE:
663
- self.pduData = updateDataPDU(null, options).read(s);
664
- break;
665
- default:
666
- self.pduData = new type.BinaryString(null, options).read(s);
667
- log.debug('unknown PDUType2 ' + self.shareDataHeader.obj.pduType2.value);
668
- }
669
- })
670
- };
671
- return new type.Component(self, opt);
672
- }
673
- function pdu(userId, pduMessage, opt) {
674
- var self = {
675
- shareControlHeader: shareControlHeader(function () {
676
- return new type.Component(self).size();
677
- }, function () {
678
- return pduMessage.obj.__PDUTYPE__;
679
- }, userId),
680
- pduMessage: pduMessage || new type.Factory(function (s) {
681
- var options = { readLength: new type.CallableValue(function () {
682
- return self.shareControlHeader.obj.totalLength.value - self.shareControlHeader.size();
683
- }) };
684
- switch (self.shareControlHeader.obj.pduType.value) {
685
- case PDUType.PDUTYPE_DEMANDACTIVEPDU:
686
- self.pduMessage = demandActivePDU(null, options).read(s);
687
- break;
688
- case PDUType.PDUTYPE_CONFIRMACTIVEPDU:
689
- self.pduMessage = confirmActivePDU(null, options).read(s);
690
- break;
691
- case PDUType.PDUTYPE_DEACTIVATEALLPDU:
692
- self.pduMessage = deactiveAllPDU(options).read(s);
693
- break;
694
- case PDUType.PDUTYPE_DATAPDU:
695
- self.pduMessage = dataPDU(null, null, options).read(s);
696
- break;
697
- default:
698
- self.pduMessage = new type.BinaryString(null, options).read(s);
699
- log.debug('unknown pdu type ' + self.shareControlHeader.obj.pduType.value);
700
- }
701
- })
702
- };
703
- return new type.Component(self, opt);
704
- }
705
- const ClipPDUMsgType = {
706
- CB_MONITOR_READY: 0x0001,
707
- CB_FORMAT_LIST: 0x0002,
708
- CB_FORMAT_LIST_RESPONSE: 0x0003,
709
- CB_FORMAT_DATA_REQUEST: 0x0004,
710
- CB_FORMAT_DATA_RESPONSE: 0x0005,
711
- CB_TEMP_DIRECTORY: 0x0006,
712
- CB_CLIP_CAPS: 0x0007,
713
- CB_FILECONTENTS_REQUEST: 0x0008
714
- };
715
- function clipPDU() {
716
- const self = {
717
- header: new type.Factory(function (s) {
718
- self.header = new type.Component({
719
- msgType: new type.UInt16Le().read(s),
720
- msgFlags: new type.UInt16Le().read(s),
721
- dataLen: new type.UInt32Le().read(s)
722
- });
723
- })
724
- };
725
- return new type.Component(self);
726
- }
727
- function fastPathBitmapUpdateDataPDU(opt) {
728
- var self = {
729
- __FASTPATH_UPDATE_TYPE__: FastPathUpdateType.FASTPATH_UPDATETYPE_BITMAP,
730
- header: new type.UInt16Le(FastPathUpdateType.FASTPATH_UPDATETYPE_BITMAP, { constant: true }),
731
- numberRectangles: new type.UInt16Le(function () {
732
- return self.rectangles.obj.length;
733
- }),
734
- rectangles: new type.Factory(function (s) {
735
- self.rectangles = new type.Component([]);
736
- for (var i = 0; i < self.numberRectangles.value; i++) {
737
- self.rectangles.obj.push(bitmapData().read(s));
738
- }
739
- })
740
- };
741
- return new type.Component(self, opt);
742
- }
743
- const cursorIdTable = {
744
- 903013897: 'alias',
745
- 370524792: 'all-scroll',
746
- 853046751: 'cell',
747
- 2101250798: 'col-resize',
748
- 703681364: 'copy',
749
- 992638936: 'crosshair',
750
- 1539083673: 'ew-resize',
751
- 1919796298: 'grab',
752
- 1010243511: 'grabbing',
753
- 1247283057: 'help',
754
- 1390892051: 'none',
755
- 885751489: 'not-allowed',
756
- 1732952247: 'row-resize',
757
- 747144997: 'url',
758
- 2018345610: 'zoom-in',
759
- 347367048: 'zoom-out',
760
- 1872942890: 'default',
761
- 1737852989: 'text',
762
- 1932827019: 'ns-resize',
763
- 1884471290: 'nesw-resize',
764
- 1204065391: 'nwse-resize',
765
- 2030531519: 'progress',
766
- 1050842114: 'pointer',
767
- 1258195498: 'default',
768
- 219484254: 'all-scroll',
769
- 399295089: 'text',
770
- 1912613597: 'wait',
771
- 864127801: 'ew-resize',
772
- 23245044: 'nesw-resize',
773
- 1966995494: 'not-allowed',
774
- 1873216615: 'help',
775
- 255126408: 'nesw-resize',
776
- 157191894: 'ns-resize',
777
- 1768446509: 'pointer',
778
- 1032011501: 'crosshair'
779
- };
780
- function fastPathPointerUpdateDataPDU(opt, cursorId, cursorStr) {
781
- var self = {
782
- __FASTPATH_UPDATE_TYPE__: FastPathUpdateType.FASTPATH_UPDATETYPE_COLOR,
783
- header: new type.UInt16Le(FastPathUpdateType.FASTPATH_UPDATETYPE_COLOR, { constant: true }),
784
- cursorId: cursorId,
785
- cursorStr: cursorStr
786
- };
787
- return new type.Component(self, opt);
788
- }
789
- function fastPathUpdatePDU(updateData, opt) {
790
- var self = {
791
- updateHeader: new type.UInt8(function () {
792
- return self.updateData.obj.__FASTPATH_UPDATE_TYPE__;
793
- }),
794
- compressionFlags: new type.UInt8(null, { conditional: function () {
795
- return (self.updateHeader.value >> 4) & FastPathOutputCompression.FASTPATH_OUTPUT_COMPRESSION_USED;
796
- } }),
797
- size: new type.UInt16Le(function () {
798
- return self.updateData.size();
799
- }),
800
- updateData: updateData || new type.Factory(function (s) {
801
- var options = { readLength: new type.CallableValue(function () {
802
- return self.size.value;
803
- }) };
804
- switch (self.updateHeader.value & 0xf) {
805
- case FastPathUpdateType.FASTPATH_UPDATETYPE_BITMAP: {
806
- self.updateData = fastPathBitmapUpdateDataPDU(options).read(s);
807
- break;
808
- }
809
- case FastPathUpdateType.FASTPATH_UPDATETYPE_COLOR: {
810
- var data = new type.BinaryString(null, options).read(s);
811
- const hasher = require('crypto').createHash('sha384');
812
- hasher.update(data.value);
813
- const cursorid = Math.abs(hasher.digest().readInt32BE(0));
814
- const cursorStr = cursorIdTable[cursorid];
815
- self.updateData = fastPathPointerUpdateDataPDU(options, cursorid, cursorStr);
816
- break;
817
- }
818
- default: {
819
- self.updateData = new type.BinaryString(null, options).read(s);
820
- log.debug('unknown fast path pdu type ' + (self.updateHeader.value & 0xf));
821
- }
822
- }
823
- })
824
- };
825
- return new type.Component(self, opt);
826
- }
827
- module.exports = {
828
- PDUType: PDUType,
829
- PDUType2: PDUType2,
830
- StreamId: StreamId,
831
- CompressionOrder: CompressionOrder,
832
- CompressionType: CompressionType,
833
- Action: Action,
834
- PersistentKeyListFlag: PersistentKeyListFlag,
835
- BitmapFlag: BitmapFlag,
836
- UpdateType: UpdateType,
837
- InputMessageType: InputMessageType,
838
- PointerFlag: PointerFlag,
839
- KeyboardFlag: KeyboardFlag,
840
- FastPathOutputCompression: FastPathOutputCompression,
841
- Display: Display,
842
- ToogleFlag: ToogleFlag,
843
- ErrorInfo: ErrorInfo,
844
- FastPathUpdateType: FastPathUpdateType,
845
- shareControlHeader: shareControlHeader,
846
- shareDataHeader: shareDataHeader,
847
- demandActivePDU: demandActivePDU,
848
- confirmActivePDU: confirmActivePDU,
849
- deactiveAllPDU: deactiveAllPDU,
850
- pdu: pdu,
851
- synchronizeDataPDU: synchronizeDataPDU,
852
- controlDataPDU: controlDataPDU,
853
- errorInfoDataPDU: errorInfoDataPDU,
854
- fontListDataPDU: fontListDataPDU,
855
- fontMapDataPDU: fontMapDataPDU,
856
- persistentListPDU: persistentListPDU,
857
- synchronizeEvent: synchronizeEvent,
858
- pointerEvent: pointerEvent,
859
- scancodeKeyEvent: scancodeKeyEvent,
860
- unicodeKeyEvent: unicodeKeyEvent,
861
- slowPathInputEvent: slowPathInputEvent,
862
- clientInputEventPDU: clientInputEventPDU,
863
- shutdownRequestPDU: shutdownRequestPDU,
864
- shutdownDeniedPDU: shutdownDeniedPDU,
865
- supressOutputDataPDU: supressOutputDataPDU,
866
- refreshRectPDU: refreshRectPDU,
867
- bitmapData: bitmapData,
868
- bitmapUpdateDataPDU: bitmapUpdateDataPDU,
869
- updateDataPDU: updateDataPDU,
870
- dataPDU: dataPDU,
871
- fastPathBitmapUpdateDataPDU: fastPathBitmapUpdateDataPDU,
872
- fastPathUpdatePDU: fastPathUpdatePDU,
873
- clipPDU: clipPDU,
874
- ClipPDUMsgType: ClipPDUMsgType
875
- };
876
- //# sourceMappingURL=data.js.map