Skip to main content

Faraday cli package

Project description

Faraday on the terminal

Use faraday directly from your favorite terminal

Example

faraday-cli is the official client that make automating your security workflows, easier.

Install from source

git clone https://github.com/infobyte/faraday-cli.git
cd faraday-cli
pip install .

Install from pip

pip install faraday-cli

Documentation

For more info you can check our documentation

Use it like a command

Login

Configure auth for farday-cli

$ faraday-cli auth

Example

Create a workspace

When you create a workspace by default is selected as active, unless you use the "-d" flag

$ faraday-cli create_ws some_name
✔ Created workspace: some_name

Select active workspace

$ faraday-cli select_ws some_name
✔ Selected workspace: some_name

List workspaces

$ faraday-cli list_ws
NAME         HOSTS    SERVICES    VULNS  ACTIVE    PUBLIC    READONLY
---------  -------  ----------  -------  --------  --------  ----------
some_name       14          13       39  True      False     False

List hosts of a workspace

$ faraday-cli list_host
  ID  IP           OS       HOSTNAMES          SERVICES  VULNS
----  -----------  -------  ---------------  ----------  -------
 574  127.0.0.1    unknown                            1  3
 566  127.0.0.10   unknown                            1  3
 569  127.0.0.11   unknown                            1  3
 568  127.0.0.12   unknown                            1  3
 570  127.0.0.13   unknown                            1  3
 576  127.0.0.2    unknown                            1  3
 565  127.0.0.3    unknown                            1  3
 572  127.0.0.4    unknown                            1  3
 573  127.0.0.5    unknown                            1  3
 567  127.0.0.6    unknown                            1  3
 571  127.0.0.7    unknown                            1  3
 564  127.0.0.8    unknown                            1  3
 575  127.0.0.9    unknown                            1  3
 590  58.76.184.4  unknown  www.googlec.com           0  -

Get host

$ faraday-cli get_host 574

$ faraday-cli get_host 574
Host:
  ID  IP         OS       HOSTNAMES    OWNER    OWNED      VULNS
----  ---------  -------  -----------  -------  -------  -------
 574  127.0.0.1  unknown               faraday  False          3

Services:
  ID  NAME    DESCRIPTION    PROTOCOL      PORT  VERSION    STATUS      VULNS
----  ------  -------------  ----------  ------  ---------  --------  -------
2638  ssh                    tcp             22  unknown    open            2

Vulnerabilities:
   ID  NAME                                      SEVERITY    STATUS    CONFIRMED    TOOL
-----  ----------------------------------------  ----------  --------  -----------  -------
13509  SSH Weak Encryption Algorithms Supported  MED         opened    False        Openvas
13510  SSH Weak MAC Algorithms Supported         LOW         opened    False        Openvas
13511  TCP timestamps                            LOW         opened    False        Openvas

Create hosts

$ faraday-cli create_host -d \''[{"ip": "stan.local", "description": "some server"}]'\'

Or pipe it

$ echo '[{"ip": "1.1.1.5", "description": "some text"}]' | faraday-cli create_host --stdin

The escaping of the single quotes (\') is only needed when using it as a command. In the shell or using pipes it not necessary

Import vulnerabilities from tool report

$ faraday-cli process_report "/path/to/report.xml"

Example

Import vulnerabilities from command

$ faraday-cli ping -c 1 www.google.com

Example

List agents

$ faraday-cli list_agent
  id  name      active    status    executors
----  --------  --------  --------  -----------
   8  internal  True      online    nmap

Run executor

$ faraday-cli run_executor -a 1 -e nmap -p \''{"target": "www.google.com"}'\'
Run executor: internal/nmap [{'successful': True}]

Use it like a shell

Faraday-cli can be used as a shell and have all the same commands you have as a cli

Example

Use cases

Continuous scan your assets with faraday

For example run nmap for all the hosts in faraday that listen on the 443 port and import the results back to faraday

$ faraday-cli list_host --port 443 -ip | nmap -iL - -oX /tmp/nmap.xml  && faraday-cli process_report /tmp/nmap.xml

Scan your subdomains

Use a tool like assetfinder to do a domains lookup, scan them with nmap and send de results to faraday

$ assetfinder -subs-only example.com| sort | uniq |awk 'BEGIN { ORS = ""; print " {\"target\":\""}
{ printf "%s%s", separator, $1, $2
separator = ","}END { print "\"}" }' | faraday-cli  run_executor -a 1 -e nmap --stdin

2.0.0 [Jun 29th, 2021]:

  • [MOD] Change commands to verbs
  • Enable and disable Workspaces
  • Fix to use cmd2 2.0 and update requirements
  • Show message if license is expired
  • [MOD] Change to V3 api of faraday
  • Add command to upload evidence to vuln

1.1.1 [Jun 9th, 2021]:

  • Fix to use cmd2 2.0 and update requirements
  • Show message if license is expired
  • [MOD] Change to V3 api of faraday

1.1.0 [Apr 16th, 2021]:

  • Add new command to process a tool execution
  • Add command to list vulnerabilities
  • Add versions to dependencies
  • Add setting to ignore INFO vulns
  • Show only active workspaces by default unless you use the --show-inactive parameter
  • [MOD] Add support for tags
  • Update faraday_plugins version dependency
  • Fix create_hosts docs typo
  • Show user in status
  • [MOD] Update faraday-plugins

1.0.2 [Feb 17th, 2021]:

  • ADD documentation (made with mkdocs)
  • MOD Convert some command and help to plural
  • FIX Exit shell in case of invalid authorization result
  • FIX faraday 3.14.1 updated security lib, and make login bugged

1.0.1 [Jan 4th, 2021]:

  • Fix error in list_host command

1.0.0 [Dec 28th, 2020]:

  • Add List Services command
  • Change the import command/report message
  • Add support for executive reports
  • Show in status if token is valid

0.1.0 [Aug 28th, 2020]:

  • First version released, use with caution as it is still beta phase.
  • Access a faraday server from your CLI, your CI o any other bash interpreter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faraday-cli-2.0.0.tar.gz (49.5 kB view details)

Uploaded Source

Built Distribution

faraday_cli-2.0.0-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file faraday-cli-2.0.0.tar.gz.

File metadata

  • Download URL: faraday-cli-2.0.0.tar.gz
  • Upload date:
  • Size: 49.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for faraday-cli-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9ae0e91f946b102d574d8b140ecfc8de2f5021b0cad46ec08445eee69a3e6d92
MD5 6cd86cf0e0d235c34ef8edace724f473
BLAKE2b-256 48177533e000868c45fc70c8e69fceab2ee144718a0250dbd3603bd02ed220aa

See more details on using hashes here.

File details

Details for the file faraday_cli-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: faraday_cli-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for faraday_cli-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0f76ccc39fc3795a1c4ffb6b598b9c4c5f58a1344ecba02f353a58a0d8aeb7
MD5 3105fddecb59e2500b02802af40c897e
BLAKE2b-256 09ddcf18798ff10b0e649b8657d3923ee095d274fced1b6484cfb7be7566fd94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page