@corellium/corellium-cli 1.1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. package/corellium-corellium-cli-1.0.3.tgz +0 -0
  2. package/netdump.pcap +0 -0
  3. package/node_modules/@babel/cli/node_modules/commander/package.json +27 -58
  4. package/node_modules/@babel/cli/node_modules/make-dir/package.json +62 -93
  5. package/node_modules/@babel/cli/node_modules/pify/package.json +54 -85
  6. package/node_modules/@babel/cli/node_modules/semver/package.json +20 -51
  7. package/node_modules/@babel/cli/node_modules/slash/package.json +37 -68
  8. package/node_modules/@babel/cli/package.json +37 -69
  9. package/node_modules/@corellium/client-api/package.json +15 -40
  10. package/node_modules/@jridgewell/resolve-uri/package.json +40 -75
  11. package/node_modules/@jridgewell/sourcemap-codec/package.json +43 -74
  12. package/node_modules/@jridgewell/trace-mapping/package.json +40 -72
  13. package/node_modules/@mapbox/node-pre-gyp/package.json +27 -61
  14. package/node_modules/@nicolo-ribaudo/chokidar-2/package.json +22 -55
  15. package/node_modules/abbrev/package.json +18 -52
  16. package/node_modules/agent-base/package.json +33 -62
  17. package/node_modules/ansi-regex/package.json +58 -89
  18. package/node_modules/ansi-styles/package.json +59 -95
  19. package/node_modules/anymatch/package.json +28 -56
  20. package/node_modules/aproba/package.json +23 -50
  21. package/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +32 -60
  22. package/node_modules/are-we-there-yet/package.json +32 -62
  23. package/node_modules/ascii-art/package.json +51 -83
  24. package/node_modules/ascii-art-ansi/package.json +30 -61
  25. package/node_modules/ascii-art-braille/package.json +7 -32
  26. package/node_modules/ascii-art-font/package.json +17 -47
  27. package/node_modules/ascii-art-graph/package.json +10 -34
  28. package/node_modules/ascii-art-image/node_modules/ascii-art-braille/package.json +7 -32
  29. package/node_modules/ascii-art-image/package.json +11 -36
  30. package/node_modules/ascii-art-table/package.json +10 -35
  31. package/node_modules/ascii-art-utf/package.json +18 -47
  32. package/node_modules/async/package.json +29 -55
  33. package/node_modules/async-arrays/package.json +34 -62
  34. package/node_modules/asynckit/package.json +45 -74
  35. package/node_modules/axios/package.json +46 -72
  36. package/node_modules/balanced-match/package.json +22 -49
  37. package/node_modules/binary-extensions/package.json +41 -73
  38. package/node_modules/brace-expansion/package.json +23 -50
  39. package/node_modules/braces/package.json +30 -76
  40. package/node_modules/call-bind/package.json +83 -125
  41. package/node_modules/canvas/build/Release/.deps/Release/canvas.node.d +1 -1
  42. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Backends.o.d +362 -368
  43. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d +365 -375
  44. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d +351 -353
  45. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d +682 -698
  46. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d +690 -702
  47. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d +684 -697
  48. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/ImageData.o.d +50 -45
  49. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/Backend.o.d +59 -53
  50. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/ImageBackend.o.d +59 -54
  51. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/PdfBackend.o.d +363 -369
  52. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/SvgBackend.o.d +363 -369
  53. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/bmp/BMPParser.o.d +2 -2
  54. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/closure.o.d +357 -364
  55. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/color.o.d +1 -1
  56. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/init.o.d +715 -729
  57. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/register_font.o.d +345 -346
  58. package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d +1 -0
  59. package/node_modules/canvas/build/Release/canvas.node +0 -0
  60. package/node_modules/canvas/build/Release/libcairo-gobject.so.2 +0 -0
  61. package/node_modules/canvas/build/Release/libcairo.so.2 +0 -0
  62. package/node_modules/canvas/build/Release/libexpat.so.1 +0 -0
  63. package/node_modules/canvas/build/Release/libffi.so.7 +0 -0
  64. package/node_modules/canvas/build/Release/libfontconfig.so.1 +0 -0
  65. package/node_modules/canvas/build/Release/libfreetype.so.6 +0 -0
  66. package/node_modules/canvas/build/Release/libfribidi.so.0 +0 -0
  67. package/node_modules/canvas/build/Release/libgdk_pixbuf-2.0.so.0 +0 -0
  68. package/node_modules/canvas/build/Release/libgif.so.7 +0 -0
  69. package/node_modules/canvas/build/Release/libgio-2.0.so.0 +0 -0
  70. package/node_modules/canvas/build/Release/libglib-2.0.so.0 +0 -0
  71. package/node_modules/canvas/build/Release/libgmodule-2.0.so.0 +0 -0
  72. package/node_modules/canvas/build/Release/libgobject-2.0.so.0 +0 -0
  73. package/node_modules/canvas/build/Release/{librsvg-2.2.dylib → libharfbuzz.so.0} +0 -0
  74. package/node_modules/canvas/build/Release/libjpeg.so.62 +0 -0
  75. package/node_modules/canvas/build/Release/libpango-1.0.so.0 +0 -0
  76. package/node_modules/canvas/build/Release/libpangocairo-1.0.so.0 +0 -0
  77. package/node_modules/canvas/build/Release/libpangoft2-1.0.so.0 +0 -0
  78. package/node_modules/canvas/build/Release/libpcre.so.1 +0 -0
  79. package/node_modules/canvas/build/Release/libpixman-1.so.0 +0 -0
  80. package/node_modules/canvas/build/Release/libpng16.so.16 +0 -0
  81. package/node_modules/canvas/build/Release/librsvg-2.so.2 +0 -0
  82. package/node_modules/canvas/build/Release/libstdc++.so.6 +0 -0
  83. package/node_modules/canvas/build/Release/libxml2.so.2 +0 -0
  84. package/node_modules/canvas/build/Release/libz.so.1 +0 -0
  85. package/node_modules/canvas/build/Release/obj.target/canvas/src/Backends.o +0 -0
  86. package/node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o +0 -0
  87. package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o +0 -0
  88. package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o +0 -0
  89. package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o +0 -0
  90. package/node_modules/canvas/build/Release/obj.target/canvas/src/Image.o +0 -0
  91. package/node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o +0 -0
  92. package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/Backend.o +0 -0
  93. package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o +0 -0
  94. package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o +0 -0
  95. package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o +0 -0
  96. package/node_modules/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o +0 -0
  97. package/node_modules/canvas/build/Release/obj.target/canvas/src/closure.o +0 -0
  98. package/node_modules/canvas/build/Release/obj.target/canvas/src/color.o +0 -0
  99. package/node_modules/canvas/build/Release/obj.target/canvas/src/init.o +0 -0
  100. package/node_modules/canvas/build/Release/obj.target/canvas/src/register_font.o +0 -0
  101. package/node_modules/canvas/build/Release/obj.target/canvas.node +0 -0
  102. package/node_modules/canvas/package.json +43 -86
  103. package/node_modules/chokidar/package.json +40 -74
  104. package/node_modules/chownr/package.json +24 -56
  105. package/node_modules/cli/package.json +23 -70
  106. package/node_modules/cliui/package.json +53 -87
  107. package/node_modules/color/node_modules/color-convert/package.json +26 -60
  108. package/node_modules/color/node_modules/color-name/package.json +18 -45
  109. package/node_modules/color/package.json +26 -57
  110. package/node_modules/color-convert/package.json +25 -59
  111. package/node_modules/color-difference/package.json +26 -52
  112. package/node_modules/color-model/package.json +17 -44
  113. package/node_modules/color-name/package.json +32 -60
  114. package/node_modules/color-string/package.json +26 -67
  115. package/node_modules/color-support/package.json +26 -60
  116. package/node_modules/combined-stream/package.json +19 -52
  117. package/node_modules/component-emitter/package.json +17 -45
  118. package/node_modules/concat-map/package.json +45 -89
  119. package/node_modules/console-control-strings/package.json +22 -55
  120. package/node_modules/convert-source-map/package.json +28 -55
  121. package/node_modules/cookiejar/package.json +16 -44
  122. package/node_modules/core-util-is/package.json +21 -51
  123. package/node_modules/d3/package.json +43 -70
  124. package/node_modules/d3-array/package.json +24 -55
  125. package/node_modules/d3-axis/package.json +27 -54
  126. package/node_modules/d3-brush/package.json +33 -60
  127. package/node_modules/d3-chord/package.json +28 -55
  128. package/node_modules/d3-collection/package.json +25 -54
  129. package/node_modules/d3-color/package.json +28 -58
  130. package/node_modules/d3-contour/package.json +27 -54
  131. package/node_modules/d3-dispatch/package.json +28 -60
  132. package/node_modules/d3-drag/package.json +32 -61
  133. package/node_modules/d3-dsv/node_modules/commander/package.json +25 -56
  134. package/node_modules/d3-dsv/package.json +36 -64
  135. package/node_modules/d3-ease/package.json +28 -56
  136. package/node_modules/d3-fetch/package.json +31 -58
  137. package/node_modules/d3-force/package.json +30 -57
  138. package/node_modules/d3-format/package.json +29 -57
  139. package/node_modules/d3-geo/package.json +35 -62
  140. package/node_modules/d3-hierarchy/package.json +33 -60
  141. package/node_modules/d3-interpolate/package.json +31 -63
  142. package/node_modules/d3-path/package.json +28 -57
  143. package/node_modules/d3-polygon/package.json +28 -55
  144. package/node_modules/d3-quadtree/package.json +29 -57
  145. package/node_modules/d3-random/package.json +26 -53
  146. package/node_modules/d3-scale/package.json +29 -56
  147. package/node_modules/d3-scale-chromatic/package.json +33 -60
  148. package/node_modules/d3-selection/package.json +29 -60
  149. package/node_modules/d3-shape/package.json +32 -59
  150. package/node_modules/d3-time/package.json +28 -57
  151. package/node_modules/d3-time-format/package.json +33 -61
  152. package/node_modules/d3-timer/package.json +28 -57
  153. package/node_modules/d3-transition/package.json +35 -64
  154. package/node_modules/d3-voronoi/package.json +24 -51
  155. package/node_modules/d3-zoom/package.json +34 -61
  156. package/node_modules/debug/package.json +37 -87
  157. package/node_modules/decompress-response/package.json +53 -84
  158. package/node_modules/delayed-stream/package.json +19 -53
  159. package/node_modules/delegates/package.json +11 -45
  160. package/node_modules/detect-libc/package.json +26 -60
  161. package/node_modules/dirname-shim/package.json +26 -60
  162. package/node_modules/dotenv/package.json +37 -64
  163. package/node_modules/duplexer/package.json +18 -49
  164. package/node_modules/emoji-regex/package.json +32 -58
  165. package/node_modules/escalade/package.json +28 -59
  166. package/node_modules/extended-emitter/package.json +37 -65
  167. package/node_modules/fast-safe-stringify/package.json +33 -73
  168. package/node_modules/fill-range/package.json +28 -72
  169. package/node_modules/follow-redirects/package.json +42 -77
  170. package/node_modules/form-data/package.json +42 -74
  171. package/node_modules/formidable/package.json +22 -52
  172. package/node_modules/fs-minipass/package.json +24 -52
  173. package/node_modules/fs-readdir-recursive/package.json +20 -50
  174. package/node_modules/fs.realpath/package.json +21 -53
  175. package/node_modules/fsevents/package.json +38 -63
  176. package/node_modules/ftp-response-parser/node_modules/isarray/package.json +22 -54
  177. package/node_modules/ftp-response-parser/node_modules/readable-stream/package.json +22 -55
  178. package/node_modules/ftp-response-parser/node_modules/string_decoder/package.json +17 -45
  179. package/node_modules/ftp-response-parser/package.json +23 -64
  180. package/node_modules/function-bind/package.json +28 -61
  181. package/node_modules/gauge/package.json +25 -52
  182. package/node_modules/generate-password/package.json +28 -54
  183. package/node_modules/get-caller-file/package.json +27 -53
  184. package/node_modules/get-intrinsic/package.json +91 -124
  185. package/node_modules/glob/package.json +34 -68
  186. package/node_modules/glob-parent/package.json +27 -70
  187. package/node_modules/has/package.json +26 -55
  188. package/node_modules/has-symbols/package.json +104 -133
  189. package/node_modules/has-unicode/package.json +25 -52
  190. package/node_modules/https-proxy-agent/package.json +30 -59
  191. package/node_modules/iconv-lite/package.json +48 -77
  192. package/node_modules/inflight/package.json +20 -48
  193. package/node_modules/inherits/package.json +17 -54
  194. package/node_modules/is-binary-path/package.json +43 -75
  195. package/node_modules/is-extglob/package.json +22 -52
  196. package/node_modules/is-fullwidth-code-point/package.json +45 -79
  197. package/node_modules/is-glob/package.json +26 -68
  198. package/node_modules/is-number/package.json +26 -65
  199. package/node_modules/jsftp/node_modules/debug/package.json +28 -67
  200. package/node_modules/jsftp/package.json +22 -59
  201. package/node_modules/json2csv/node_modules/commander/package.json +25 -56
  202. package/node_modules/json2csv/package.json +37 -64
  203. package/node_modules/jsonparse/package.json +18 -53
  204. package/node_modules/lodash/package.json +15 -61
  205. package/node_modules/lodash.get/package.json +16 -67
  206. package/node_modules/lru-cache/package.json +27 -61
  207. package/node_modules/make-dir/node_modules/semver/package.json +20 -51
  208. package/node_modules/make-dir/package.json +62 -93
  209. package/node_modules/maplex/package.json +22 -54
  210. package/node_modules/methods/package.json +22 -64
  211. package/node_modules/mime/package.json +20 -48
  212. package/node_modules/mime-db/package.json +25 -67
  213. package/node_modules/mime-types/package.json +20 -64
  214. package/node_modules/mimic-response/package.json +45 -76
  215. package/node_modules/minimatch/package.json +25 -61
  216. package/node_modules/minipass/package.json +30 -64
  217. package/node_modules/minizlib/package.json +27 -59
  218. package/node_modules/mkdirp/package.json +27 -57
  219. package/node_modules/ms/package.json +24 -58
  220. package/node_modules/multi-progress/package.json +20 -46
  221. package/node_modules/nan/package.json +27 -87
  222. package/node_modules/node-fetch/package.json +77 -104
  223. package/node_modules/nopt/package.json +22 -54
  224. package/node_modules/normalize-path/package.json +25 -63
  225. package/node_modules/npmlog/package.json +23 -55
  226. package/node_modules/object-assign/package.json +20 -51
  227. package/node_modules/object-inspect/package.json +53 -81
  228. package/node_modules/once/package.json +19 -56
  229. package/node_modules/parse-listing/package.json +27 -56
  230. package/node_modules/path-is-absolute/package.json +16 -47
  231. package/node_modules/picomatch/package.json +28 -60
  232. package/node_modules/progress/package.json +21 -65
  233. package/node_modules/qs/package.json +78 -105
  234. package/node_modules/readdirp/package.json +47 -83
  235. package/node_modules/require-directory/package.json +29 -57
  236. package/node_modules/rimraf/package.json +23 -61
  237. package/node_modules/rw/package.json +19 -46
  238. package/node_modules/safe-buffer/package.json +10 -38
  239. package/node_modules/safer-buffer/package.json +18 -43
  240. package/node_modules/semver/package.json +36 -70
  241. package/node_modules/set-blocking/package.json +29 -56
  242. package/node_modules/side-channel/package.json +70 -98
  243. package/node_modules/sift/package.json +30 -62
  244. package/node_modules/signal-exit/package.json +29 -58
  245. package/node_modules/simple-concat/package.json +22 -46
  246. package/node_modules/simple-get/package.json +9 -33
  247. package/node_modules/simple-swizzle/node_modules/is-arrayish/package.json +28 -59
  248. package/node_modules/simple-swizzle/package.json +23 -57
  249. package/node_modules/strangler/package.json +39 -67
  250. package/node_modules/stream-combiner/package.json +15 -48
  251. package/node_modules/string-tools/package.json +16 -50
  252. package/node_modules/string-width/package.json +59 -97
  253. package/node_modules/string_decoder/package.json +18 -47
  254. package/node_modules/strip-ansi/package.json +57 -94
  255. package/node_modules/superagent/node_modules/form-data/package.json +42 -74
  256. package/node_modules/superagent/node_modules/readable-stream/package.json +32 -60
  257. package/node_modules/superagent/package.json +13 -59
  258. package/node_modules/tar/package.json +27 -59
  259. package/node_modules/through/package.json +17 -50
  260. package/node_modules/to-regex-range/package.json +25 -61
  261. package/node_modules/tr46/package.json +24 -51
  262. package/node_modules/unorm/package.json +34 -75
  263. package/node_modules/util-deprecate/package.json +19 -49
  264. package/node_modules/uuid/package.json +74 -102
  265. package/node_modules/webidl-conversions/package.json +18 -53
  266. package/node_modules/whatwg-url/package.json +15 -49
  267. package/node_modules/wide-align/package.json +21 -53
  268. package/node_modules/wolfy87-eventemitter/package.json +25 -49
  269. package/node_modules/wrap-ansi/package.json +65 -97
  270. package/node_modules/wrappy/package.json +21 -50
  271. package/node_modules/y18n/package.json +43 -73
  272. package/node_modules/yallist/package.json +20 -55
  273. package/node_modules/yargs/package.json +72 -99
  274. package/node_modules/yargs-parser/package.json +52 -83
  275. package/package.json +2 -1
  276. package/src/{commands/agent → clients}/Agent.js +1 -1
  277. package/src/clients/Client.js +96 -0
  278. package/src/clients/Instance.js +76 -0
  279. package/src/{TrialAccount.js → clients/TrialAccount.js} +3 -3
  280. package/src/{commands/webplayer → clients}/Webplayer.js +2 -2
  281. package/src/commands/agent/apps.js +1 -1
  282. package/src/commands/agent/file.js +1 -1
  283. package/src/commands/agent/ready.js +1 -1
  284. package/src/commands/instances/index.js +1 -0
  285. package/src/commands/instances/netmon/disable.js +44 -0
  286. package/src/commands/instances/netmon/download.js +49 -0
  287. package/src/commands/instances/netmon/enable.js +72 -0
  288. package/src/commands/instances/netmon/index.js +15 -0
  289. package/src/commands/instances/netmon/stream.js +48 -0
  290. package/src/commands/instances/restoreBackup.js +1 -1
  291. package/src/commands/instances/rotate.js +1 -1
  292. package/src/commands/instances/start.js +18 -9
  293. package/src/commands/instances/upgrade.js +1 -1
  294. package/src/commands/signup.js +2 -2
  295. package/src/commands/webplayer/create.js +1 -1
  296. package/src/commands/webplayer/destroy.js +1 -1
  297. package/src/commands/webplayer/list.js +1 -1
  298. package/src/commands/webplayer/login.js +1 -1
  299. package/t.log +0 -0
  300. package/node_modules/canvas/build/Release/libX11.6.dylib +0 -0
  301. package/node_modules/canvas/build/Release/libXau.6.dylib +0 -0
  302. package/node_modules/canvas/build/Release/libXdmcp.6.dylib +0 -0
  303. package/node_modules/canvas/build/Release/libXext.6.dylib +0 -0
  304. package/node_modules/canvas/build/Release/libXrender.1.dylib +0 -0
  305. package/node_modules/canvas/build/Release/libcairo-gobject.2.dylib +0 -0
  306. package/node_modules/canvas/build/Release/libcairo.2.dylib +0 -0
  307. package/node_modules/canvas/build/Release/libffi.8.dylib +0 -0
  308. package/node_modules/canvas/build/Release/libfontconfig.1.dylib +0 -0
  309. package/node_modules/canvas/build/Release/libfreetype.6.dylib +0 -0
  310. package/node_modules/canvas/build/Release/libfribidi.0.dylib +0 -0
  311. package/node_modules/canvas/build/Release/libgdk_pixbuf-2.0.0.dylib +0 -0
  312. package/node_modules/canvas/build/Release/libgif.7.2.0.dylib +0 -0
  313. package/node_modules/canvas/build/Release/libgio-2.0.0.dylib +0 -0
  314. package/node_modules/canvas/build/Release/libglib-2.0.0.dylib +0 -0
  315. package/node_modules/canvas/build/Release/libgmodule-2.0.0.dylib +0 -0
  316. package/node_modules/canvas/build/Release/libgobject-2.0.0.dylib +0 -0
  317. package/node_modules/canvas/build/Release/libgraphite2.3.2.1.dylib +0 -0
  318. package/node_modules/canvas/build/Release/libharfbuzz.0.dylib +0 -0
  319. package/node_modules/canvas/build/Release/libintl.8.dylib +0 -0
  320. package/node_modules/canvas/build/Release/libjpeg.9.dylib +0 -0
  321. package/node_modules/canvas/build/Release/libpango-1.0.0.dylib +0 -0
  322. package/node_modules/canvas/build/Release/libpangocairo-1.0.0.dylib +0 -0
  323. package/node_modules/canvas/build/Release/libpangoft2-1.0.0.dylib +0 -0
  324. package/node_modules/canvas/build/Release/libpcre.1.dylib +0 -0
  325. package/node_modules/canvas/build/Release/libpixman-1.0.40.0.dylib +0 -0
  326. package/node_modules/canvas/build/Release/libpng16.16.dylib +0 -0
  327. package/node_modules/canvas/build/Release/libxcb-render.0.0.0.dylib +0 -0
  328. package/node_modules/canvas/build/Release/libxcb-shm.0.0.0.dylib +0 -0
  329. package/node_modules/canvas/build/Release/libxcb.1.1.0.dylib +0 -0
  330. package/src/commands/Client.js +0 -45
  331. package/src/commands/instances/Instance.js +0 -35
@@ -0,0 +1,49 @@
1
+ const log = require('../../../logging')
2
+ const InstanceCLI = require('../../../clients/Instance')
3
+
4
+ async function builder (yargs) {
5
+ yargs
6
+ .positional('instanceId', {
7
+ type: 'string',
8
+ describe: 'Instance id',
9
+ demandOption: true
10
+ })
11
+ .positional('outputFile', {
12
+ type: 'string',
13
+ describe: 'Path to output',
14
+ demandOption: true
15
+ })
16
+ .option('verbose', {
17
+ alias: 'v',
18
+ type: 'boolean',
19
+ describe: 'Console will receive verbose error output',
20
+ demandOption: false
21
+ })
22
+ }
23
+
24
+ async function handler (argv) {
25
+ try {
26
+ const instance = new InstanceCLI(argv)
27
+ await instance.download('netdump.pcap', argv.outputFile)
28
+ log.info(`Success, pcap saved to ${argv.outputFile}`)
29
+ } catch (e) {
30
+ if (e.response) {
31
+ log.error(`${e.response.status} ${e.response.data.error || e.response.statusText}`)
32
+ } else {
33
+ if (e.message) {
34
+ log.error(e.message)
35
+ } else {
36
+ log.error('Urecognized error, use --verbose for details')
37
+ }
38
+ }
39
+
40
+ if (argv.verbose) { log.error(JSON.stringify(e)) }
41
+ }
42
+ }
43
+
44
+ module.exports = {
45
+ builder,
46
+ handler,
47
+ command: 'download <instanceId> <outputFile> [--verbose]',
48
+ describe: 'Download pcap file'
49
+ }
@@ -0,0 +1,72 @@
1
+ const log = require('../../../logging')
2
+ const InstanceCLI = require('../../../clients/Instance')
3
+
4
+ async function builder (yargs) {
5
+ yargs
6
+ .positional('instanceId', {
7
+ type: 'string',
8
+ describe: 'Instance id',
9
+ demandOption: true
10
+ })
11
+ .option('srcPorts', {
12
+ type: 'array',
13
+ describe: 'Source ports to filter'
14
+ })
15
+ .option('dstPorts', {
16
+ type: 'array',
17
+ describe: 'Destination ports to filter'
18
+ })
19
+ .option('ports', {
20
+ type: 'array',
21
+ describe: 'Source or destination ports to filter'
22
+ })
23
+ .option('processes', {
24
+ type: 'array',
25
+ describe: 'List of process names or pids to filter'
26
+ })
27
+ .option('portRanges', {
28
+ type: 'array',
29
+ describe: 'List of port ranges in that format \'[beginPort]-[endport]\''
30
+ })
31
+ .option('protocols', {
32
+ type: 'array',
33
+ describe: 'List of protocols'
34
+ })
35
+ .option('verbose', {
36
+ alias: 'v',
37
+ type: 'boolean',
38
+ describe: 'Console will receive verbose error output',
39
+ demandOption: false
40
+ })
41
+ }
42
+
43
+ async function handler (argv) {
44
+ try {
45
+ const { srcPorts, dstPorts, ports, processes, portRanges, protocols } = argv
46
+
47
+ const instance = new InstanceCLI(argv)
48
+ await instance.enableMonitoring({
49
+ srcPorts, dstPorts, ports, processes, portRanges, protocols
50
+ })
51
+ log.info('Success')
52
+ } catch (e) {
53
+ if (e.response) {
54
+ log.error(`${e.response.status} ${e.response.data.error || e.response.statusText}`)
55
+ } else {
56
+ if (e.message) {
57
+ log.error(e.message)
58
+ } else {
59
+ log.error('Urecognized error, use --verbose for details')
60
+ }
61
+ }
62
+
63
+ if (argv.verbose) { log.error(JSON.stringify(e)) }
64
+ }
65
+ }
66
+
67
+ module.exports = {
68
+ builder,
69
+ handler,
70
+ command: 'enable <instanceId> [--verbose]',
71
+ describe: 'Enable network monitoring'
72
+ }
@@ -0,0 +1,15 @@
1
+ const subcommands = [
2
+ require('./enable'),
3
+ require('./disable'),
4
+ require('./download'),
5
+ require('./stream')
6
+ ]
7
+
8
+ let _yargs
9
+
10
+ module.exports = {
11
+ builder: yargs => (_yargs = yargs) && yargs.command(subcommands).scriptName(''),
12
+ handler: argv => !argv[1] && _yargs.showHelp(),
13
+ command: 'netmon',
14
+ describe: 'Network Monitoring related commands'
15
+ }
@@ -0,0 +1,48 @@
1
+ const log = require('../../../logging')
2
+ const InstanceCLI = require('../../../clients/Instance')
3
+
4
+ async function builder (yargs) {
5
+ yargs
6
+ .positional('instanceId', {
7
+ type: 'string',
8
+ describe: 'Instance id',
9
+ demandOption: true
10
+ })
11
+ .option('verbose', {
12
+ alias: 'v',
13
+ type: 'boolean',
14
+ describe: 'Console will receive verbose error output',
15
+ demandOption: false
16
+ })
17
+ }
18
+
19
+ async function handler (argv) {
20
+ try {
21
+ const instance = new InstanceCLI(argv)
22
+ const { netdump } = await instance.info()
23
+ if (netdump && netdump.enabled) {
24
+ instance.wss(netdump.info).pipe(process.stdout)
25
+ } else {
26
+ log.error('Network monitoring is not enabled')
27
+ }
28
+ } catch (e) {
29
+ if (e.response) {
30
+ log.error(`${e.response.status} ${e.response.data.error || e.response.statusText}`)
31
+ } else {
32
+ if (e.message) {
33
+ log.error(e.message)
34
+ } else {
35
+ log.error('Urecognized error, use --verbose for details')
36
+ }
37
+ }
38
+
39
+ if (argv.verbose) { log.error(JSON.stringify(e)) }
40
+ }
41
+ }
42
+
43
+ module.exports = {
44
+ builder,
45
+ handler,
46
+ command: 'stream <instanceId> [--verbose]',
47
+ describe: 'Stream monitoring events'
48
+ }
@@ -1,5 +1,5 @@
1
1
  const log = require('../../logging')
2
- const InstanceCLI = require('./Instance')
2
+ const InstanceCLI = require('../../clients/Instance')
3
3
  const { readProfile } = require('../../profile')
4
4
  const { v4: uuidv4 } = require('uuid')
5
5
  const { basename } = require('path')
@@ -1,7 +1,7 @@
1
1
  const { getErrorMessage } = require('../../error')
2
2
  const asciiArt = require('ascii-art')
3
3
 
4
- const Client = require('../Client')
4
+ const Client = require('../../clients/Client')
5
5
  async function builder (yargs) {
6
6
  yargs.positional('instanceId', {
7
7
  type: 'string',
@@ -1,6 +1,7 @@
1
1
  const { getErrorMessage } = require('../../error')
2
2
  const asciiArt = require('ascii-art')
3
- const { getApi, waitForState } = require('../../utils')
3
+ const { waitForState } = require('../../utils')
4
+ const InstanceCLI = require('../../clients/Instance')
4
5
 
5
6
  async function builder (yargs) {
6
7
  yargs.positional('instanceId', {
@@ -17,25 +18,33 @@ async function builder (yargs) {
17
18
  type: 'boolean',
18
19
  describe: 'Wait for the instance to be fully started'
19
20
  })
21
+ .option('paused', {
22
+ type: 'boolean',
23
+ describe: 'Start instance in a paused state'
24
+ })
25
+ .option('sockcap', {
26
+ type: 'boolean',
27
+ describe: 'Start sockcap add-on if loaded'
28
+ })
20
29
  }
21
30
 
22
31
  async function handler (argv) {
23
- const api = await getApi()
24
- const instanceId = argv.instanceId
32
+ const { sockcap, paused } = argv
33
+ const instance = new InstanceCLI(argv)
25
34
  try {
26
- await api.v1StartInstance(instanceId)
35
+ await instance.start({ sockcap, paused })
27
36
  if (argv.wait) {
28
37
  // Wait 60 attempts for the instance to be created (5 minutes)
29
- await waitForState(instanceId, api.v1GetInstance.bind(api), 'on', 60)
38
+ await waitForState(argv.instanceId, instance.info.bind(instance), 'on', 60)
30
39
  }
31
40
  console.log(
32
- asciiArt.style(`Successfully started instance ${instanceId}`, 'green', true)
41
+ asciiArt.style(`Successfully started instance ${argv.instanceId}`, 'green', true)
33
42
  )
34
43
  } catch (error) {
35
44
  const errorMessage = getErrorMessage(error)
36
- console.error(`Failed to start ${instanceId}: ${errorMessage}`)
45
+ console.error(`Failed to start ${argv.instance}: ${errorMessage}`)
37
46
 
38
- if (argv.detailedErrors) {
47
+ if (argv.verbose) {
39
48
  console.log(error)
40
49
  }
41
50
  }
@@ -44,6 +53,6 @@ async function handler (argv) {
44
53
  module.exports = {
45
54
  builder,
46
55
  handler,
47
- command: 'start <instanceId> [wait]',
56
+ command: 'start <instanceId> [--wait] [--verbose] [--paused] [--sockcap]',
48
57
  describe: 'Start instance'
49
58
  }
@@ -1,5 +1,5 @@
1
1
  const log = require('../../logging')
2
- const InstanceCLI = require('./Instance')
2
+ const InstanceCLI = require('../../clients/Instance')
3
3
  const { getErrorMessage } = require('../../error')
4
4
  const { waitForState, waitForIntervalMilliSec } = require('../../utils')
5
5
 
@@ -1,4 +1,4 @@
1
- const TrialAccount = require('../TrialAccount')
1
+ const TrialAccount = require('../clients/TrialAccount')
2
2
  const { makePassword, validateNonEmpty } = require('../utils')
3
3
  const { getErrorMessage } = require('../error')
4
4
  const log = require('../logging')
@@ -7,7 +7,7 @@ async function builder (yargs) {
7
7
  yargs.options({
8
8
  endpoint: {
9
9
  type: 'input',
10
- describe: 'Server endpoint e.g. https://app.ci-4.corellium.co',
10
+ describe: 'Server endpoint e.g. https://app.corellium.co',
11
11
  demandOption: true,
12
12
  string: true,
13
13
  validateNonEmpty
@@ -1,4 +1,4 @@
1
- const Webplayer = require('./Webplayer')
1
+ const Webplayer = require('../../clients/Webplayer')
2
2
  const log = require('../../logging')
3
3
  const { displayTable } = require('../../table')
4
4
  const { validateNonEmpty } = require('../../utils')
@@ -1,4 +1,4 @@
1
- const Webplayer = require('./Webplayer')
1
+ const Webplayer = require('../../clients/Webplayer')
2
2
  const log = require('../../logging')
3
3
  const { validateNonEmpty } = require('../../utils')
4
4
  const { getErrorMessage } = require('../../error')
@@ -1,4 +1,4 @@
1
- const Webplayer = require('./Webplayer')
1
+ const Webplayer = require('../../clients/Webplayer')
2
2
  const log = require('../../logging')
3
3
  const { displayTable } = require('../../table')
4
4
  const { validateNonEmpty } = require('../../utils')
@@ -1,4 +1,4 @@
1
- const Webplayer = require('./Webplayer')
1
+ const Webplayer = require('../../clients/Webplayer')
2
2
  const log = require('../../logging')
3
3
  const { validateNonEmpty } = require('../../utils')
4
4
  const { getErrorMessage } = require('../../error')
package/t.log ADDED
Binary file
@@ -1,45 +0,0 @@
1
- const axios = require('axios').default
2
- const { readProfile } = require('../profile')
3
-
4
- /**
5
- * Client Base class
6
- */
7
- class Client {
8
- constructor (argv) {
9
- this.argv = Object.assign({}, argv)
10
- this.project = argv.project || argv.projectId
11
- this.instance = argv.instance || argv.instanceId
12
- this._profile = readProfile()
13
- }
14
-
15
- /**
16
- * Perform HTTP transaction
17
- * @protected
18
- * @param {string} method
19
- * @param {string} path
20
- * @param {object} data
21
- * @returns {Promise<any>}
22
- */
23
- _fetch = async (method, path, data) => {
24
- const headers = {
25
- Authorization: `Bearer ${this._profile.token}`,
26
- 'User-Agent': `corellium-cli v${require('../../package.json').version}`
27
- }
28
- let response
29
- switch (method) {
30
- case 'GET':
31
- response = await axios.get(`${this._profile.endpoint}/api/${path}`, { headers })
32
- break
33
- case 'POST':
34
- response = await axios.post(`${this._profile.endpoint}/api/${path}`, data, { headers })
35
- break
36
- case 'DELETE':
37
- response = await axios.delete(`${this._profile.endpoint}/api/${path}`, { headers })
38
- break
39
- }
40
- if (response.status >= 400) { throw new Error(response.statusText) }
41
- return response.data || {}
42
- }
43
- }
44
-
45
- module.exports = Client
@@ -1,35 +0,0 @@
1
- const Client = require('../Client')
2
-
3
- /**
4
- * Instance class
5
- */
6
- class InstanceCLI extends Client {
7
- instanceBasePath = () => `v1/instances/${this.instance}`
8
-
9
- /**
10
- * Upgrade iOS version on instance
11
- * @returns {Promise<any>}
12
- */
13
- upgrade = async (options) => {
14
- const { os, osbuild } = options
15
- return await this._fetch('POST', `${this.instanceBasePath()}/upgrade`, { os, osbuild })
16
- }
17
-
18
- /**
19
- * Restore backup to instance
20
- * @returns {Promise<any>}
21
- */
22
- restoreBackup = async () => {
23
- return await this._fetch('POST', `${this.instanceBasePath()}/restoreBackup`)
24
- }
25
-
26
- /**
27
- * Fetch instance information
28
- * @returns {Promise<any>}
29
- */
30
- info = async () => {
31
- return await this._fetch('GET', `${this.instanceBasePath()}`, {})
32
- }
33
- }
34
-
35
- module.exports = InstanceCLI