filecat 5.15.5 → 5.16.1

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 (316) hide show
  1. package/build/dist/181.11199e601b22f4add759.js +2 -0
  2. package/build/dist/{960.57837b4ef9e3838cf339.js → 301.0aa113cb4316e9e74a51.js} +2 -2
  3. package/build/dist/{325.fe78da5ba19c2104cc9e.js → 325.5f041ae7990615da279c.js} +2 -2
  4. package/build/dist/{523.560ce4ba9d2c7877058d.js → 523.cd76e6fafa6440cc1693.js} +2 -2
  5. package/build/dist/{757.964f68a8419e427d298f.js → 757.a6c2cab5ed6ce5776467.js} +1 -1
  6. package/build/dist/{793.da73c469f1ba286afc1b.js → 793.5ac9e1d8bc64790682d0.js} +2 -2
  7. package/build/dist/{827.b10a4f524c371d404cff.js → 827.e64e0af3c11c5bcd68c0.js} +2 -2
  8. package/build/dist/91.56af0d7eacb487e115b2.js +1 -0
  9. package/build/dist/{943.911e95ed97052f17913b.js → 943.7e28d7ce1a69f0d15eb2.js} +2 -2
  10. package/build/dist/995.ec4607dd8bb71cfb6a9d.js +2 -0
  11. package/build/dist/index.html +1 -1
  12. package/build/dist/main.7d110d8fdcc3c74c6c82.js +2 -0
  13. package/build/server/common/Env.js +188 -0
  14. package/build/server/common/Env.js.map +1 -0
  15. package/build/server/common/FileMenuType.js +45 -0
  16. package/build/server/common/FileMenuType.js.map +1 -0
  17. package/build/server/common/ListUtil.js +174 -0
  18. package/build/server/common/ListUtil.js.map +1 -0
  19. package/build/server/common/Result.pojo.js +14 -0
  20. package/build/server/common/Result.pojo.js.map +1 -0
  21. package/build/server/common/RouterConfig.js +16 -0
  22. package/build/server/common/RouterConfig.js.map +1 -0
  23. package/build/server/common/StringUtil.js +153 -0
  24. package/build/server/common/StringUtil.js.map +1 -0
  25. package/build/server/common/ValueUtil.js +49 -0
  26. package/build/server/common/ValueUtil.js.map +1 -0
  27. package/build/server/common/common.util.js +10 -0
  28. package/build/server/common/common.util.js.map +1 -0
  29. package/build/server/common/file.pojo.js +56 -0
  30. package/build/server/common/file.pojo.js.map +1 -0
  31. package/build/server/common/findPort.js +34 -0
  32. package/build/server/common/findPort.js.map +1 -0
  33. package/build/server/common/frame/WsData.js +168 -0
  34. package/build/server/common/frame/WsData.js.map +1 -0
  35. package/build/server/common/frame/router.js +25 -0
  36. package/build/server/common/frame/router.js.map +1 -0
  37. package/build/server/common/frame/ws.client.js +295 -0
  38. package/build/server/common/frame/ws.client.js.map +1 -0
  39. package/build/server/common/frame/ws.server.js +226 -0
  40. package/build/server/common/frame/ws.server.js.map +1 -0
  41. package/build/server/common/http.js +47 -0
  42. package/build/server/common/http.js.map +1 -0
  43. package/build/server/common/install.js +139 -0
  44. package/build/server/common/install.js.map +1 -0
  45. package/build/server/common/path_util.js +86 -0
  46. package/build/server/common/path_util.js.map +1 -0
  47. package/build/server/common/proto/proto.generate.js +23 -0
  48. package/build/server/common/proto/proto.generate.js.map +1 -0
  49. package/build/server/common/proto/proto.js +172 -0
  50. package/build/server/common/proto/proto.js.map +1 -0
  51. package/build/server/common/req/common.pojo.js +17 -0
  52. package/build/server/common/req/common.pojo.js.map +1 -0
  53. package/build/server/common/req/customerRouter.pojo.js +9 -0
  54. package/build/server/common/req/customerRouter.pojo.js.map +1 -0
  55. package/build/server/common/req/data.pojo.js +3 -0
  56. package/build/server/common/req/data.pojo.js.map +1 -0
  57. package/build/server/common/req/ddns.pojo.js +39 -0
  58. package/build/server/common/req/ddns.pojo.js.map +1 -0
  59. package/build/server/common/req/file.req.js +46 -0
  60. package/build/server/common/req/file.req.js.map +1 -0
  61. package/build/server/common/req/http_controller_router.js +13 -0
  62. package/build/server/common/req/http_controller_router.js.map +1 -0
  63. package/build/server/common/req/net.pojo.js +49 -0
  64. package/build/server/common/req/net.pojo.js.map +1 -0
  65. package/build/server/common/req/setting.req.js +37 -0
  66. package/build/server/common/req/setting.req.js.map +1 -0
  67. package/build/server/common/req/ssh.pojo.js +13 -0
  68. package/build/server/common/req/ssh.pojo.js.map +1 -0
  69. package/build/server/common/req/sys.pojo.js +23 -0
  70. package/build/server/common/req/sys.pojo.js.map +1 -0
  71. package/build/server/common/req/user.req.js +91 -0
  72. package/build/server/common/req/user.req.js.map +1 -0
  73. package/build/server/common/word_detection_js.js +142 -0
  74. package/build/server/common/word_detection_js.js.map +1 -0
  75. package/build/server/main/domain/bin/bin.js +149 -0
  76. package/build/server/main/domain/bin/bin.js.map +1 -0
  77. package/build/server/main/domain/crypto/crypto.controller.js +63 -0
  78. package/build/server/main/domain/crypto/crypto.controller.js.map +1 -0
  79. package/build/server/main/domain/crypto/crypto.service.js +112 -0
  80. package/build/server/main/domain/crypto/crypto.service.js.map +1 -0
  81. package/build/server/main/domain/data/DataUtil.js +111 -0
  82. package/build/server/main/domain/data/DataUtil.js.map +1 -0
  83. package/build/server/main/domain/data/basedata/base_data_util.js +241 -0
  84. package/build/server/main/domain/data/basedata/base_data_util.js.map +1 -0
  85. package/build/server/main/domain/data/data_type.js +74 -0
  86. package/build/server/main/domain/data/data_type.js.map +1 -0
  87. package/build/server/main/domain/ddns/ddns.ali.server.js +88 -0
  88. package/build/server/main/domain/ddns/ddns.ali.server.js.map +1 -0
  89. package/build/server/main/domain/ddns/ddns.controller.js +103 -0
  90. package/build/server/main/domain/ddns/ddns.controller.js.map +1 -0
  91. package/build/server/main/domain/ddns/ddns.dnspod.service.js +121 -0
  92. package/build/server/main/domain/ddns/ddns.dnspod.service.js.map +1 -0
  93. package/build/server/main/domain/ddns/ddns.pre.js +120 -0
  94. package/build/server/main/domain/ddns/ddns.pre.js.map +1 -0
  95. package/build/server/main/domain/ddns/ddns.service.js +175 -0
  96. package/build/server/main/domain/ddns/ddns.service.js.map +1 -0
  97. package/build/server/main/domain/ddns/ddns.tengxun.service.js +57 -0
  98. package/build/server/main/domain/ddns/ddns.tengxun.service.js.map +1 -0
  99. package/build/server/main/domain/ddns/tx/abstract_client.js +270 -0
  100. package/build/server/main/domain/ddns/tx/abstract_client.js.map +1 -0
  101. package/build/server/main/domain/ddns/tx/dnspod_client.js +65 -0
  102. package/build/server/main/domain/ddns/tx/dnspod_client.js.map +1 -0
  103. package/build/server/main/domain/ddns/tx/dnspod_models.js +3 -0
  104. package/build/server/main/domain/ddns/tx/dnspod_models.js.map +1 -0
  105. package/build/server/main/domain/ddns/tx/exception/tencent_cloud_sdk_exception.js +38 -0
  106. package/build/server/main/domain/ddns/tx/exception/tencent_cloud_sdk_exception.js.map +1 -0
  107. package/build/server/main/domain/ddns/tx/http/fetch.js +3 -0
  108. package/build/server/main/domain/ddns/tx/http/fetch.js.map +1 -0
  109. package/build/server/main/domain/ddns/tx/http/http_connection.js +194 -0
  110. package/build/server/main/domain/ddns/tx/http/http_connection.js.map +1 -0
  111. package/build/server/main/domain/ddns/tx/interface.js +5 -0
  112. package/build/server/main/domain/ddns/tx/interface.js.map +1 -0
  113. package/build/server/main/domain/ddns/tx/sdk_version.js +5 -0
  114. package/build/server/main/domain/ddns/tx/sdk_version.js.map +1 -0
  115. package/build/server/main/domain/ddns/tx/sign.js +142 -0
  116. package/build/server/main/domain/ddns/tx/sign.js.map +1 -0
  117. package/build/server/main/domain/ddns/tx/sse_response_model.js +124 -0
  118. package/build/server/main/domain/ddns/tx/sse_response_model.js.map +1 -0
  119. package/build/server/main/domain/file/FileUtil.js +96 -0
  120. package/build/server/main/domain/file/FileUtil.js.map +1 -0
  121. package/build/server/main/domain/file/file.compress.js +131 -0
  122. package/build/server/main/domain/file/file.compress.js.map +1 -0
  123. package/build/server/main/domain/file/file.controller.js +483 -0
  124. package/build/server/main/domain/file/file.controller.js.map +1 -0
  125. package/build/server/main/domain/file/file.service.js +1123 -0
  126. package/build/server/main/domain/file/file.service.js.map +1 -0
  127. package/build/server/main/domain/file/search/file.search.js +83 -0
  128. package/build/server/main/domain/file/search/file.search.js.map +1 -0
  129. package/build/server/main/domain/file/search/file.search.worker.js +100 -0
  130. package/build/server/main/domain/file/search/file.search.worker.js.map +1 -0
  131. package/build/server/main/domain/file/search/file.type.js +3 -0
  132. package/build/server/main/domain/file/search/file.type.js.map +1 -0
  133. package/build/server/main/domain/file/workflow/workflow.process.js +104 -0
  134. package/build/server/main/domain/file/workflow/workflow.process.js.map +1 -0
  135. package/build/server/main/domain/file/workflow/workflow.service.js +687 -0
  136. package/build/server/main/domain/file/workflow/workflow.service.js.map +1 -0
  137. package/build/server/main/domain/file/workflow/workflow.util.js +121 -0
  138. package/build/server/main/domain/file/workflow/workflow.util.js.map +1 -0
  139. package/build/server/main/domain/navindex/navindex.controller.js +73 -0
  140. package/build/server/main/domain/navindex/navindex.controller.js.map +1 -0
  141. package/build/server/main/domain/net/net.controller.js +196 -0
  142. package/build/server/main/domain/net/net.controller.js.map +1 -0
  143. package/build/server/main/domain/net/net.datautil.js +8 -0
  144. package/build/server/main/domain/net/net.datautil.js.map +1 -0
  145. package/build/server/main/domain/net/net.service.js +415 -0
  146. package/build/server/main/domain/net/net.service.js.map +1 -0
  147. package/build/server/main/domain/net/util/NetClientUtil.js +246 -0
  148. package/build/server/main/domain/net/util/NetClientUtil.js.map +1 -0
  149. package/build/server/main/domain/net/util/NetServerUtil.js +128 -0
  150. package/build/server/main/domain/net/util/NetServerUtil.js.map +1 -0
  151. package/build/server/main/domain/net/util/NetUtil.js +129 -0
  152. package/build/server/main/domain/net/util/NetUtil.js.map +1 -0
  153. package/build/server/main/domain/net/util/tcp.util.js +137 -0
  154. package/build/server/main/domain/net/util/tcp.util.js.map +1 -0
  155. package/build/server/main/domain/net/util/udp.util.js +28 -0
  156. package/build/server/main/domain/net/util/udp.util.js.map +1 -0
  157. package/build/server/main/domain/net/virtual/tcp_proxy.js +106 -0
  158. package/build/server/main/domain/net/virtual/tcp_proxy.js.map +1 -0
  159. package/build/server/main/domain/net/virtual/virtual.client.service.js +445 -0
  160. package/build/server/main/domain/net/virtual/virtual.client.service.js.map +1 -0
  161. package/build/server/main/domain/net/virtual/virtual.controller.js +263 -0
  162. package/build/server/main/domain/net/virtual/virtual.controller.js.map +1 -0
  163. package/build/server/main/domain/net/virtual/virtual.server.service.js +91 -0
  164. package/build/server/main/domain/net/virtual/virtual.server.service.js.map +1 -0
  165. package/build/server/main/domain/pre/lifeRecordService.js +92 -0
  166. package/build/server/main/domain/pre/lifeRecordService.js.map +1 -0
  167. package/build/server/main/domain/rdp/lib/asn1/ber.js +66 -0
  168. package/build/server/main/domain/rdp/lib/asn1/ber.js.map +1 -0
  169. package/build/server/main/domain/rdp/lib/asn1/index.js +9 -0
  170. package/build/server/main/domain/rdp/lib/asn1/index.js.map +1 -0
  171. package/build/server/main/domain/rdp/lib/asn1/spec.js +56 -0
  172. package/build/server/main/domain/rdp/lib/asn1/spec.js.map +1 -0
  173. package/build/server/main/domain/rdp/lib/asn1/univ.js +315 -0
  174. package/build/server/main/domain/rdp/lib/asn1/univ.js.map +1 -0
  175. package/build/server/main/domain/rdp/lib/core/error.js +25 -0
  176. package/build/server/main/domain/rdp/lib/core/error.js.map +1 -0
  177. package/build/server/main/domain/rdp/lib/core/index.js +13 -0
  178. package/build/server/main/domain/rdp/lib/core/index.js.map +1 -0
  179. package/build/server/main/domain/rdp/lib/core/layer.js +135 -0
  180. package/build/server/main/domain/rdp/lib/core/layer.js.map +1 -0
  181. package/build/server/main/domain/rdp/lib/core/log.js +25 -0
  182. package/build/server/main/domain/rdp/lib/core/log.js.map +1 -0
  183. package/build/server/main/domain/rdp/lib/core/rle.js +22699 -0
  184. package/build/server/main/domain/rdp/lib/core/rle.js.map +1 -0
  185. package/build/server/main/domain/rdp/lib/core/type.js +245 -0
  186. package/build/server/main/domain/rdp/lib/core/type.js.map +1 -0
  187. package/build/server/main/domain/rdp/lib/index.js +6 -0
  188. package/build/server/main/domain/rdp/lib/index.js.map +1 -0
  189. package/build/server/main/domain/rdp/lib/protocol/cert.js +115 -0
  190. package/build/server/main/domain/rdp/lib/protocol/cert.js.map +1 -0
  191. package/build/server/main/domain/rdp/lib/protocol/index.js +11 -0
  192. package/build/server/main/domain/rdp/lib/protocol/index.js.map +1 -0
  193. package/build/server/main/domain/rdp/lib/protocol/nla.js +549 -0
  194. package/build/server/main/domain/rdp/lib/protocol/nla.js.map +1 -0
  195. package/build/server/main/domain/rdp/lib/protocol/pdu/caps.js +486 -0
  196. package/build/server/main/domain/rdp/lib/protocol/pdu/caps.js.map +1 -0
  197. package/build/server/main/domain/rdp/lib/protocol/pdu/cliprdr.js +167 -0
  198. package/build/server/main/domain/rdp/lib/protocol/pdu/cliprdr.js.map +1 -0
  199. package/build/server/main/domain/rdp/lib/protocol/pdu/data.js +876 -0
  200. package/build/server/main/domain/rdp/lib/protocol/pdu/data.js.map +1 -0
  201. package/build/server/main/domain/rdp/lib/protocol/pdu/global.js +260 -0
  202. package/build/server/main/domain/rdp/lib/protocol/pdu/global.js.map +1 -0
  203. package/build/server/main/domain/rdp/lib/protocol/pdu/index.js +13 -0
  204. package/build/server/main/domain/rdp/lib/protocol/pdu/index.js.map +1 -0
  205. package/build/server/main/domain/rdp/lib/protocol/pdu/lic.js +199 -0
  206. package/build/server/main/domain/rdp/lib/protocol/pdu/lic.js.map +1 -0
  207. package/build/server/main/domain/rdp/lib/protocol/pdu/sec.js +333 -0
  208. package/build/server/main/domain/rdp/lib/protocol/pdu/sec.js.map +1 -0
  209. package/build/server/main/domain/rdp/lib/protocol/rdp.js +255 -0
  210. package/build/server/main/domain/rdp/lib/protocol/rdp.js.map +1 -0
  211. package/build/server/main/domain/rdp/lib/protocol/t125/gcc.js +354 -0
  212. package/build/server/main/domain/rdp/lib/protocol/t125/gcc.js.map +1 -0
  213. package/build/server/main/domain/rdp/lib/protocol/t125/index.js +7 -0
  214. package/build/server/main/domain/rdp/lib/protocol/t125/index.js.map +1 -0
  215. package/build/server/main/domain/rdp/lib/protocol/t125/mcs.js +318 -0
  216. package/build/server/main/domain/rdp/lib/protocol/t125/mcs.js.map +1 -0
  217. package/build/server/main/domain/rdp/lib/protocol/t125/per.js +188 -0
  218. package/build/server/main/domain/rdp/lib/protocol/t125/per.js.map +1 -0
  219. package/build/server/main/domain/rdp/lib/protocol/tpkt.js +94 -0
  220. package/build/server/main/domain/rdp/lib/protocol/tpkt.js.map +1 -0
  221. package/build/server/main/domain/rdp/lib/protocol/x224.js +207 -0
  222. package/build/server/main/domain/rdp/lib/protocol/x224.js.map +1 -0
  223. package/build/server/main/domain/rdp/lib/security/index.js +7 -0
  224. package/build/server/main/domain/rdp/lib/security/index.js.map +1 -0
  225. package/build/server/main/domain/rdp/lib/security/jsbn.js +1372 -0
  226. package/build/server/main/domain/rdp/lib/security/jsbn.js.map +1 -0
  227. package/build/server/main/domain/rdp/lib/security/md4.js +401 -0
  228. package/build/server/main/domain/rdp/lib/security/md4.js.map +1 -0
  229. package/build/server/main/domain/rdp/lib/security/rc4.js +45 -0
  230. package/build/server/main/domain/rdp/lib/security/rc4.js.map +1 -0
  231. package/build/server/main/domain/rdp/lib/security/rsa.js +15 -0
  232. package/build/server/main/domain/rdp/lib/security/rsa.js.map +1 -0
  233. package/build/server/main/domain/rdp/lib/security/x509.js +106 -0
  234. package/build/server/main/domain/rdp/lib/security/x509.js.map +1 -0
  235. package/build/server/main/domain/rdp/rdp.controller.js +137 -0
  236. package/build/server/main/domain/rdp/rdp.controller.js.map +1 -0
  237. package/build/server/main/domain/rdp/rdp.service.js +137 -0
  238. package/build/server/main/domain/rdp/rdp.service.js.map +1 -0
  239. package/build/server/main/domain/setting/setting.controller.js +518 -0
  240. package/build/server/main/domain/setting/setting.controller.js.map +1 -0
  241. package/build/server/main/domain/setting/setting.prefile.js +74 -0
  242. package/build/server/main/domain/setting/setting.prefile.js.map +1 -0
  243. package/build/server/main/domain/setting/setting.service.js +550 -0
  244. package/build/server/main/domain/setting/setting.service.js.map +1 -0
  245. package/build/server/main/domain/shell/shell.controller.js +115 -0
  246. package/build/server/main/domain/shell/shell.controller.js.map +1 -0
  247. package/build/server/main/domain/shell/shell.service.js +443 -0
  248. package/build/server/main/domain/shell/shell.service.js.map +1 -0
  249. package/build/server/main/domain/ssh/ssh.controller.js +236 -0
  250. package/build/server/main/domain/ssh/ssh.controller.js.map +1 -0
  251. package/build/server/main/domain/ssh/ssh.service.js +271 -0
  252. package/build/server/main/domain/ssh/ssh.service.js.map +1 -0
  253. package/build/server/main/domain/ssh/ssh.ssh2.js +250 -0
  254. package/build/server/main/domain/ssh/ssh.ssh2.js.map +1 -0
  255. package/build/server/main/domain/sys/sys.controller.js +395 -0
  256. package/build/server/main/domain/sys/sys.controller.js.map +1 -0
  257. package/build/server/main/domain/sys/sys.docker.service.js +367 -0
  258. package/build/server/main/domain/sys/sys.docker.service.js.map +1 -0
  259. package/build/server/main/domain/sys/sys.process.service.js +239 -0
  260. package/build/server/main/domain/sys/sys.process.service.js.map +1 -0
  261. package/build/server/main/domain/sys/sys.service.js +101 -0
  262. package/build/server/main/domain/sys/sys.service.js.map +1 -0
  263. package/build/server/main/domain/sys/sys.sys.service.js +192 -0
  264. package/build/server/main/domain/sys/sys.sys.service.js.map +1 -0
  265. package/build/server/main/domain/sys/sys.systemd.service.js +306 -0
  266. package/build/server/main/domain/sys/sys.systemd.service.js.map +1 -0
  267. package/build/server/main/domain/sys/sys.utl.js +23 -0
  268. package/build/server/main/domain/sys/sys.utl.js.map +1 -0
  269. package/build/server/main/domain/user/user.controller.js +264 -0
  270. package/build/server/main/domain/user/user.controller.js.map +1 -0
  271. package/build/server/main/domain/user/user.hash.js +8 -0
  272. package/build/server/main/domain/user/user.hash.js.map +1 -0
  273. package/build/server/main/domain/user/user.service.js +573 -0
  274. package/build/server/main/domain/user/user.service.js.map +1 -0
  275. package/build/server/main/domain/video/video.controller.js +71 -0
  276. package/build/server/main/domain/video/video.controller.js.map +1 -0
  277. package/build/server/main/domain/video/video.service.js +45 -0
  278. package/build/server/main/domain/video/video.service.js.map +1 -0
  279. package/build/server/main/other/Result.js +25 -0
  280. package/build/server/main/other/Result.js.map +1 -0
  281. package/build/server/main/other/cache.js +50 -0
  282. package/build/server/main/other/cache.js.map +1 -0
  283. package/build/server/main/other/config.js +6 -0
  284. package/build/server/main/other/config.js.map +1 -0
  285. package/build/server/main/other/middleware/AuthMiddleware.js +72 -0
  286. package/build/server/main/other/middleware/AuthMiddleware.js.map +1 -0
  287. package/build/server/main/other/middleware/GlobalErrorHandler.js +23 -0
  288. package/build/server/main/other/middleware/GlobalErrorHandler.js.map +1 -0
  289. package/build/server/main/other/middleware/redirect.js +20 -0
  290. package/build/server/main/other/middleware/redirect.js.map +1 -0
  291. package/build/server/main/server.js +155 -0
  292. package/build/server/main/server.js.map +1 -0
  293. package/build/{watch.js → server/main/watch.js} +68 -86
  294. package/build/server/main/watch.js.map +1 -0
  295. package/build/server/tsconfig.tsbuildinfo +1 -0
  296. package/build/server/web/project/util/noty.js +60 -0
  297. package/build/server/web/project/util/noty.js.map +1 -0
  298. package/build/server/web/project/util/ws.js +7 -0
  299. package/build/server/web/project/util/ws.js.map +1 -0
  300. package/package.json +2 -1
  301. package/build/dist/181.ed11230f80088fa2a5b9.js +0 -2
  302. package/build/dist/91.21f368e687ef087ba623.js +0 -1
  303. package/build/dist/995.f5461272d4fd82df7130.js +0 -2
  304. package/build/dist/main.52dd483a8eaca68037ca.js +0 -2
  305. package/build/main.js +0 -2
  306. package/build/main.js.LICENSE.txt +0 -445
  307. package/build/unrar.wasm +0 -0
  308. /package/build/dist/{181.ed11230f80088fa2a5b9.js.LICENSE.txt → 181.11199e601b22f4add759.js.LICENSE.txt} +0 -0
  309. /package/build/dist/{960.57837b4ef9e3838cf339.js.LICENSE.txt → 301.0aa113cb4316e9e74a51.js.LICENSE.txt} +0 -0
  310. /package/build/dist/{325.fe78da5ba19c2104cc9e.js.LICENSE.txt → 325.5f041ae7990615da279c.js.LICENSE.txt} +0 -0
  311. /package/build/dist/{523.560ce4ba9d2c7877058d.js.LICENSE.txt → 523.cd76e6fafa6440cc1693.js.LICENSE.txt} +0 -0
  312. /package/build/dist/{793.da73c469f1ba286afc1b.js.LICENSE.txt → 793.5ac9e1d8bc64790682d0.js.LICENSE.txt} +0 -0
  313. /package/build/dist/{827.b10a4f524c371d404cff.js.LICENSE.txt → 827.e64e0af3c11c5bcd68c0.js.LICENSE.txt} +0 -0
  314. /package/build/dist/{943.911e95ed97052f17913b.js.LICENSE.txt → 943.7e28d7ce1a69f0d15eb2.js.LICENSE.txt} +0 -0
  315. /package/build/dist/{995.f5461272d4fd82df7130.js.LICENSE.txt → 995.ec4607dd8bb71cfb6a9d.js.LICENSE.txt} +0 -0
  316. /package/build/dist/{main.52dd483a8eaca68037ca.js.LICENSE.txt → main.7d110d8fdcc3c74c6c82.js.LICENSE.txt} +0 -0
@@ -0,0 +1,876 @@
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