Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,28 @@ $ audiness --help

Usage: audiness [OPTIONS] COMMAND [ARGS]...

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --access-key TEXT Nessus API access key [env var: ACCESS_KEY] [default: None] [required] │
│ * --secret-key TEXT Nessus API secret key [env var: SECRET_KEY] [default: None] [required] │
│ --host TEXT URL to Nessus instance [default: https://localhost:8834] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ folders │
│ scans │
│ server │
│ software │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --access-key TEXT Nessus API access key [env var: ACCESS_KEY] [required] │
│ * --secret-key TEXT Nessus API secret key [env var: SECRET_KEY] [required] │
│ --url TEXT URL to Nessus instance [env var: URL] [default: https://localhost:8834] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ folders │
│ policies │
│ scans │
│ server │
│ software │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

If you don't want to enter the access key and the secrect key then put them in the
If you don't want to enter the access key and the secret key then put them in the
environment of your shell.

```bash
$ exoprt URL="https://localhost:8838"
$ export ACCESS_KEY="ae0bf3d57f8f8f6bcd8d01d3aedde60937d08647da4d89a6eb4dba2a9bee5d5d"
$ export SECRET_KEY="5f671a64819221e6b5c2361016af7dcaeb30de359009fee589b3a5d85dea11b4"
```
Expand Down
12 changes: 9 additions & 3 deletions audiness/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,17 @@ def main(
callback=validate_key,
),
],
host: Annotated[
str, typer.Option(help="URL to Nessus instance", callback=validate_host)
url: Annotated[
str,
typer.Option(
envvar="URL",
help="URL to Nessus instance",
prompt=True,
callback=validate_host,
),
] = "https://localhost:8834",
):
connection = setup_connection(host, access_key, secret_key)
connection = setup_connection(url, access_key, secret_key)
ctx.obj = {"connection": connection}


Expand Down