Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alterakey committed Jan 10, 2024
1 parent e5c9f53 commit 339643a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ If you want to run statelessly you omit mounting volume onto /cache (not recomme

## Usage

### Interactive mode

With trueseeing you can interactively scan/analyze/patch/etc. apps -- making it the ideal choice for manual analysis:

$ docker run -it --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --inspect target.apk
Expand All @@ -48,26 +50,47 @@ With trueseeing you can interactively scan/analyze/patch/etc. apps -- making it
...
ts[target.apk]> gh report.html

### Non-interactive scan
### Batch mode

We accept an inline command (`-c`) or script file (`-i`) to run before giving you prompt, as well as quitting right away instead of prompting (`-q`; we don't require a tty in this mode!).

You can use the features to conduct a batch scan, as follows e.g. to dump findings right onto the stderr:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing -qc 'aa' target.apk

To generate a report file in HTML format:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing -qc 'aa;gh report.html' target.apk

To generate a report file in JSON format:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing -qc 'aa;gj report.json' target.apk

To get report generated in stdout, omit filename from final `g*` command:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing -qc 'aa;gh' target.apk > report.html
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing -qc 'aa;gj' target.apk > report.json

### Non-interactive scan mode (deprecated)

Alternatively, you can scan apps with the following command line to get findings listed in stderr:
Traditionally, you can scan apps with the following command line to get findings listed in stderr:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan target.apk

To generate a report in HTML format:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan -o report.html target.apk
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --format=html -o report.html target.apk
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-output report.html target.apk
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-report=html --scan-output report.html target.apk

To generate a report in JSON format:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --format=json -o report.json target.apk
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-report=json --scan-output report.json target.apk

To get report generated in stdout, specify '-' as filename:

$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan -o - target.apk > report.html
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --format=html -o - target.apk > report.html
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --format=json -o - target.apk > report.json
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-output - target.apk > report.html
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-report=html --scan-output - target.apk > report.html
$ docker run --rm -v $(pwd):/out -v ts2:/cache ghcr.io/alterakey/trueseeing --scan --scan-report=json --scan-output - target.apk > report.json

## Build

Expand Down
9 changes: 5 additions & 4 deletions trueseeing/app/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ def _help(cls) -> str:
-c Run commands before prompt
-d/--debug Debug mode
-i Run script file before prompt
-q Quiet mode; quit instead of giving prompt
-q Batch mode; quit instead of giving prompt
--version Version information
--help Show this text
--help-signature Show signatures
--inspect Inspect mode (default)
--scan Scan mode
--inspect Inspect mode (deprecated; now default)
--scan Scan mode (deprecated; use -qc "aa;g*"; e.g. gh for HTML)
Scan mode:
Scan mode (DEPRECATED):
--scan-sigs=<sig>,.. Select signatures (use --help-signatures to list signatures)
--scan-exclude=<pattern> Excluding packages matching pattern
--scan-output=<file> Report filename ("-" for stdout)
Expand Down Expand Up @@ -197,6 +197,7 @@ def invoke(self) -> int:
if o in ['--inspect']:
self._deprecated(f'{o} is deprecated; ignored as default')
if o in ['--scan']:
self._deprecated(f'{o} is deprecated; use -qc "aa;g*"; e.g. gh for HTML')
mode = 'scan'
if o in ['--scan-update-cache']:
update_cache_mode = True
Expand Down

0 comments on commit 339643a

Please sign in to comment.