@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.
- package/corellium-corellium-cli-1.0.3.tgz +0 -0
- package/netdump.pcap +0 -0
- package/node_modules/@babel/cli/node_modules/commander/package.json +27 -58
- package/node_modules/@babel/cli/node_modules/make-dir/package.json +62 -93
- package/node_modules/@babel/cli/node_modules/pify/package.json +54 -85
- package/node_modules/@babel/cli/node_modules/semver/package.json +20 -51
- package/node_modules/@babel/cli/node_modules/slash/package.json +37 -68
- package/node_modules/@babel/cli/package.json +37 -69
- package/node_modules/@corellium/client-api/package.json +15 -40
- package/node_modules/@jridgewell/resolve-uri/package.json +40 -75
- package/node_modules/@jridgewell/sourcemap-codec/package.json +43 -74
- package/node_modules/@jridgewell/trace-mapping/package.json +40 -72
- package/node_modules/@mapbox/node-pre-gyp/package.json +27 -61
- package/node_modules/@nicolo-ribaudo/chokidar-2/package.json +22 -55
- package/node_modules/abbrev/package.json +18 -52
- package/node_modules/agent-base/package.json +33 -62
- package/node_modules/ansi-regex/package.json +58 -89
- package/node_modules/ansi-styles/package.json +59 -95
- package/node_modules/anymatch/package.json +28 -56
- package/node_modules/aproba/package.json +23 -50
- package/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +32 -60
- package/node_modules/are-we-there-yet/package.json +32 -62
- package/node_modules/ascii-art/package.json +51 -83
- package/node_modules/ascii-art-ansi/package.json +30 -61
- package/node_modules/ascii-art-braille/package.json +7 -32
- package/node_modules/ascii-art-font/package.json +17 -47
- package/node_modules/ascii-art-graph/package.json +10 -34
- package/node_modules/ascii-art-image/node_modules/ascii-art-braille/package.json +7 -32
- package/node_modules/ascii-art-image/package.json +11 -36
- package/node_modules/ascii-art-table/package.json +10 -35
- package/node_modules/ascii-art-utf/package.json +18 -47
- package/node_modules/async/package.json +29 -55
- package/node_modules/async-arrays/package.json +34 -62
- package/node_modules/asynckit/package.json +45 -74
- package/node_modules/axios/package.json +46 -72
- package/node_modules/balanced-match/package.json +22 -49
- package/node_modules/binary-extensions/package.json +41 -73
- package/node_modules/brace-expansion/package.json +23 -50
- package/node_modules/braces/package.json +30 -76
- package/node_modules/call-bind/package.json +83 -125
- package/node_modules/canvas/build/Release/.deps/Release/canvas.node.d +1 -1
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Backends.o.d +362 -368
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d +365 -375
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d +351 -353
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d +682 -698
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d +690 -702
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d +684 -697
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/ImageData.o.d +50 -45
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/Backend.o.d +59 -53
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/ImageBackend.o.d +59 -54
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/PdfBackend.o.d +363 -369
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/backend/SvgBackend.o.d +363 -369
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/bmp/BMPParser.o.d +2 -2
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/closure.o.d +357 -364
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/color.o.d +1 -1
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/init.o.d +715 -729
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/register_font.o.d +345 -346
- package/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d +1 -0
- package/node_modules/canvas/build/Release/canvas.node +0 -0
- package/node_modules/canvas/build/Release/libcairo-gobject.so.2 +0 -0
- package/node_modules/canvas/build/Release/libcairo.so.2 +0 -0
- package/node_modules/canvas/build/Release/libexpat.so.1 +0 -0
- package/node_modules/canvas/build/Release/libffi.so.7 +0 -0
- package/node_modules/canvas/build/Release/libfontconfig.so.1 +0 -0
- package/node_modules/canvas/build/Release/libfreetype.so.6 +0 -0
- package/node_modules/canvas/build/Release/libfribidi.so.0 +0 -0
- package/node_modules/canvas/build/Release/libgdk_pixbuf-2.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libgif.so.7 +0 -0
- package/node_modules/canvas/build/Release/libgio-2.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libglib-2.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libgmodule-2.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libgobject-2.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/{librsvg-2.2.dylib → libharfbuzz.so.0} +0 -0
- package/node_modules/canvas/build/Release/libjpeg.so.62 +0 -0
- package/node_modules/canvas/build/Release/libpango-1.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libpangocairo-1.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libpangoft2-1.0.so.0 +0 -0
- package/node_modules/canvas/build/Release/libpcre.so.1 +0 -0
- package/node_modules/canvas/build/Release/libpixman-1.so.0 +0 -0
- package/node_modules/canvas/build/Release/libpng16.so.16 +0 -0
- package/node_modules/canvas/build/Release/librsvg-2.so.2 +0 -0
- package/node_modules/canvas/build/Release/libstdc++.so.6 +0 -0
- package/node_modules/canvas/build/Release/libxml2.so.2 +0 -0
- package/node_modules/canvas/build/Release/libz.so.1 +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/Backends.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/Image.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/Backend.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/closure.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/color.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/init.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas/src/register_font.o +0 -0
- package/node_modules/canvas/build/Release/obj.target/canvas.node +0 -0
- package/node_modules/canvas/package.json +43 -86
- package/node_modules/chokidar/package.json +40 -74
- package/node_modules/chownr/package.json +24 -56
- package/node_modules/cli/package.json +23 -70
- package/node_modules/cliui/package.json +53 -87
- package/node_modules/color/node_modules/color-convert/package.json +26 -60
- package/node_modules/color/node_modules/color-name/package.json +18 -45
- package/node_modules/color/package.json +26 -57
- package/node_modules/color-convert/package.json +25 -59
- package/node_modules/color-difference/package.json +26 -52
- package/node_modules/color-model/package.json +17 -44
- package/node_modules/color-name/package.json +32 -60
- package/node_modules/color-string/package.json +26 -67
- package/node_modules/color-support/package.json +26 -60
- package/node_modules/combined-stream/package.json +19 -52
- package/node_modules/component-emitter/package.json +17 -45
- package/node_modules/concat-map/package.json +45 -89
- package/node_modules/console-control-strings/package.json +22 -55
- package/node_modules/convert-source-map/package.json +28 -55
- package/node_modules/cookiejar/package.json +16 -44
- package/node_modules/core-util-is/package.json +21 -51
- package/node_modules/d3/package.json +43 -70
- package/node_modules/d3-array/package.json +24 -55
- package/node_modules/d3-axis/package.json +27 -54
- package/node_modules/d3-brush/package.json +33 -60
- package/node_modules/d3-chord/package.json +28 -55
- package/node_modules/d3-collection/package.json +25 -54
- package/node_modules/d3-color/package.json +28 -58
- package/node_modules/d3-contour/package.json +27 -54
- package/node_modules/d3-dispatch/package.json +28 -60
- package/node_modules/d3-drag/package.json +32 -61
- package/node_modules/d3-dsv/node_modules/commander/package.json +25 -56
- package/node_modules/d3-dsv/package.json +36 -64
- package/node_modules/d3-ease/package.json +28 -56
- package/node_modules/d3-fetch/package.json +31 -58
- package/node_modules/d3-force/package.json +30 -57
- package/node_modules/d3-format/package.json +29 -57
- package/node_modules/d3-geo/package.json +35 -62
- package/node_modules/d3-hierarchy/package.json +33 -60
- package/node_modules/d3-interpolate/package.json +31 -63
- package/node_modules/d3-path/package.json +28 -57
- package/node_modules/d3-polygon/package.json +28 -55
- package/node_modules/d3-quadtree/package.json +29 -57
- package/node_modules/d3-random/package.json +26 -53
- package/node_modules/d3-scale/package.json +29 -56
- package/node_modules/d3-scale-chromatic/package.json +33 -60
- package/node_modules/d3-selection/package.json +29 -60
- package/node_modules/d3-shape/package.json +32 -59
- package/node_modules/d3-time/package.json +28 -57
- package/node_modules/d3-time-format/package.json +33 -61
- package/node_modules/d3-timer/package.json +28 -57
- package/node_modules/d3-transition/package.json +35 -64
- package/node_modules/d3-voronoi/package.json +24 -51
- package/node_modules/d3-zoom/package.json +34 -61
- package/node_modules/debug/package.json +37 -87
- package/node_modules/decompress-response/package.json +53 -84
- package/node_modules/delayed-stream/package.json +19 -53
- package/node_modules/delegates/package.json +11 -45
- package/node_modules/detect-libc/package.json +26 -60
- package/node_modules/dirname-shim/package.json +26 -60
- package/node_modules/dotenv/package.json +37 -64
- package/node_modules/duplexer/package.json +18 -49
- package/node_modules/emoji-regex/package.json +32 -58
- package/node_modules/escalade/package.json +28 -59
- package/node_modules/extended-emitter/package.json +37 -65
- package/node_modules/fast-safe-stringify/package.json +33 -73
- package/node_modules/fill-range/package.json +28 -72
- package/node_modules/follow-redirects/package.json +42 -77
- package/node_modules/form-data/package.json +42 -74
- package/node_modules/formidable/package.json +22 -52
- package/node_modules/fs-minipass/package.json +24 -52
- package/node_modules/fs-readdir-recursive/package.json +20 -50
- package/node_modules/fs.realpath/package.json +21 -53
- package/node_modules/fsevents/package.json +38 -63
- package/node_modules/ftp-response-parser/node_modules/isarray/package.json +22 -54
- package/node_modules/ftp-response-parser/node_modules/readable-stream/package.json +22 -55
- package/node_modules/ftp-response-parser/node_modules/string_decoder/package.json +17 -45
- package/node_modules/ftp-response-parser/package.json +23 -64
- package/node_modules/function-bind/package.json +28 -61
- package/node_modules/gauge/package.json +25 -52
- package/node_modules/generate-password/package.json +28 -54
- package/node_modules/get-caller-file/package.json +27 -53
- package/node_modules/get-intrinsic/package.json +91 -124
- package/node_modules/glob/package.json +34 -68
- package/node_modules/glob-parent/package.json +27 -70
- package/node_modules/has/package.json +26 -55
- package/node_modules/has-symbols/package.json +104 -133
- package/node_modules/has-unicode/package.json +25 -52
- package/node_modules/https-proxy-agent/package.json +30 -59
- package/node_modules/iconv-lite/package.json +48 -77
- package/node_modules/inflight/package.json +20 -48
- package/node_modules/inherits/package.json +17 -54
- package/node_modules/is-binary-path/package.json +43 -75
- package/node_modules/is-extglob/package.json +22 -52
- package/node_modules/is-fullwidth-code-point/package.json +45 -79
- package/node_modules/is-glob/package.json +26 -68
- package/node_modules/is-number/package.json +26 -65
- package/node_modules/jsftp/node_modules/debug/package.json +28 -67
- package/node_modules/jsftp/package.json +22 -59
- package/node_modules/json2csv/node_modules/commander/package.json +25 -56
- package/node_modules/json2csv/package.json +37 -64
- package/node_modules/jsonparse/package.json +18 -53
- package/node_modules/lodash/package.json +15 -61
- package/node_modules/lodash.get/package.json +16 -67
- package/node_modules/lru-cache/package.json +27 -61
- package/node_modules/make-dir/node_modules/semver/package.json +20 -51
- package/node_modules/make-dir/package.json +62 -93
- package/node_modules/maplex/package.json +22 -54
- package/node_modules/methods/package.json +22 -64
- package/node_modules/mime/package.json +20 -48
- package/node_modules/mime-db/package.json +25 -67
- package/node_modules/mime-types/package.json +20 -64
- package/node_modules/mimic-response/package.json +45 -76
- package/node_modules/minimatch/package.json +25 -61
- package/node_modules/minipass/package.json +30 -64
- package/node_modules/minizlib/package.json +27 -59
- package/node_modules/mkdirp/package.json +27 -57
- package/node_modules/ms/package.json +24 -58
- package/node_modules/multi-progress/package.json +20 -46
- package/node_modules/nan/package.json +27 -87
- package/node_modules/node-fetch/package.json +77 -104
- package/node_modules/nopt/package.json +22 -54
- package/node_modules/normalize-path/package.json +25 -63
- package/node_modules/npmlog/package.json +23 -55
- package/node_modules/object-assign/package.json +20 -51
- package/node_modules/object-inspect/package.json +53 -81
- package/node_modules/once/package.json +19 -56
- package/node_modules/parse-listing/package.json +27 -56
- package/node_modules/path-is-absolute/package.json +16 -47
- package/node_modules/picomatch/package.json +28 -60
- package/node_modules/progress/package.json +21 -65
- package/node_modules/qs/package.json +78 -105
- package/node_modules/readdirp/package.json +47 -83
- package/node_modules/require-directory/package.json +29 -57
- package/node_modules/rimraf/package.json +23 -61
- package/node_modules/rw/package.json +19 -46
- package/node_modules/safe-buffer/package.json +10 -38
- package/node_modules/safer-buffer/package.json +18 -43
- package/node_modules/semver/package.json +36 -70
- package/node_modules/set-blocking/package.json +29 -56
- package/node_modules/side-channel/package.json +70 -98
- package/node_modules/sift/package.json +30 -62
- package/node_modules/signal-exit/package.json +29 -58
- package/node_modules/simple-concat/package.json +22 -46
- package/node_modules/simple-get/package.json +9 -33
- package/node_modules/simple-swizzle/node_modules/is-arrayish/package.json +28 -59
- package/node_modules/simple-swizzle/package.json +23 -57
- package/node_modules/strangler/package.json +39 -67
- package/node_modules/stream-combiner/package.json +15 -48
- package/node_modules/string-tools/package.json +16 -50
- package/node_modules/string-width/package.json +59 -97
- package/node_modules/string_decoder/package.json +18 -47
- package/node_modules/strip-ansi/package.json +57 -94
- package/node_modules/superagent/node_modules/form-data/package.json +42 -74
- package/node_modules/superagent/node_modules/readable-stream/package.json +32 -60
- package/node_modules/superagent/package.json +13 -59
- package/node_modules/tar/package.json +27 -59
- package/node_modules/through/package.json +17 -50
- package/node_modules/to-regex-range/package.json +25 -61
- package/node_modules/tr46/package.json +24 -51
- package/node_modules/unorm/package.json +34 -75
- package/node_modules/util-deprecate/package.json +19 -49
- package/node_modules/uuid/package.json +74 -102
- package/node_modules/webidl-conversions/package.json +18 -53
- package/node_modules/whatwg-url/package.json +15 -49
- package/node_modules/wide-align/package.json +21 -53
- package/node_modules/wolfy87-eventemitter/package.json +25 -49
- package/node_modules/wrap-ansi/package.json +65 -97
- package/node_modules/wrappy/package.json +21 -50
- package/node_modules/y18n/package.json +43 -73
- package/node_modules/yallist/package.json +20 -55
- package/node_modules/yargs/package.json +72 -99
- package/node_modules/yargs-parser/package.json +52 -83
- package/package.json +2 -1
- package/src/{commands/agent → clients}/Agent.js +1 -1
- package/src/clients/Client.js +96 -0
- package/src/clients/Instance.js +76 -0
- package/src/{TrialAccount.js → clients/TrialAccount.js} +3 -3
- package/src/{commands/webplayer → clients}/Webplayer.js +2 -2
- package/src/commands/agent/apps.js +1 -1
- package/src/commands/agent/file.js +1 -1
- package/src/commands/agent/ready.js +1 -1
- package/src/commands/instances/index.js +1 -0
- package/src/commands/instances/netmon/disable.js +44 -0
- package/src/commands/instances/netmon/download.js +49 -0
- package/src/commands/instances/netmon/enable.js +72 -0
- package/src/commands/instances/netmon/index.js +15 -0
- package/src/commands/instances/netmon/stream.js +48 -0
- package/src/commands/instances/restoreBackup.js +1 -1
- package/src/commands/instances/rotate.js +1 -1
- package/src/commands/instances/start.js +18 -9
- package/src/commands/instances/upgrade.js +1 -1
- package/src/commands/signup.js +2 -2
- package/src/commands/webplayer/create.js +1 -1
- package/src/commands/webplayer/destroy.js +1 -1
- package/src/commands/webplayer/list.js +1 -1
- package/src/commands/webplayer/login.js +1 -1
- package/t.log +0 -0
- package/node_modules/canvas/build/Release/libX11.6.dylib +0 -0
- package/node_modules/canvas/build/Release/libXau.6.dylib +0 -0
- package/node_modules/canvas/build/Release/libXdmcp.6.dylib +0 -0
- package/node_modules/canvas/build/Release/libXext.6.dylib +0 -0
- package/node_modules/canvas/build/Release/libXrender.1.dylib +0 -0
- package/node_modules/canvas/build/Release/libcairo-gobject.2.dylib +0 -0
- package/node_modules/canvas/build/Release/libcairo.2.dylib +0 -0
- package/node_modules/canvas/build/Release/libffi.8.dylib +0 -0
- package/node_modules/canvas/build/Release/libfontconfig.1.dylib +0 -0
- package/node_modules/canvas/build/Release/libfreetype.6.dylib +0 -0
- package/node_modules/canvas/build/Release/libfribidi.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgdk_pixbuf-2.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgif.7.2.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgio-2.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libglib-2.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgmodule-2.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgobject-2.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libgraphite2.3.2.1.dylib +0 -0
- package/node_modules/canvas/build/Release/libharfbuzz.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libintl.8.dylib +0 -0
- package/node_modules/canvas/build/Release/libjpeg.9.dylib +0 -0
- package/node_modules/canvas/build/Release/libpango-1.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libpangocairo-1.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libpangoft2-1.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libpcre.1.dylib +0 -0
- package/node_modules/canvas/build/Release/libpixman-1.0.40.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libpng16.16.dylib +0 -0
- package/node_modules/canvas/build/Release/libxcb-render.0.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libxcb-shm.0.0.0.dylib +0 -0
- package/node_modules/canvas/build/Release/libxcb.1.1.0.dylib +0 -0
- package/src/commands/Client.js +0 -45
- 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,7 +1,7 @@
|
|
1
1
|
const { getErrorMessage } = require('../../error')
|
2
2
|
const asciiArt = require('ascii-art')
|
3
3
|
|
4
|
-
const Client = require('
|
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 {
|
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
|
24
|
-
const
|
32
|
+
const { sockcap, paused } = argv
|
33
|
+
const instance = new InstanceCLI(argv)
|
25
34
|
try {
|
26
|
-
await
|
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,
|
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 ${
|
45
|
+
console.error(`Failed to start ${argv.instance}: ${errorMessage}`)
|
37
46
|
|
38
|
-
if (argv.
|
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
|
}
|
package/src/commands/signup.js
CHANGED
@@ -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.
|
10
|
+
describe: 'Server endpoint e.g. https://app.corellium.co',
|
11
11
|
demandOption: true,
|
12
12
|
string: true,
|
13
13
|
validateNonEmpty
|
package/t.log
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/src/commands/Client.js
DELETED
@@ -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
|