GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tenable/asm-python-examples: Bit Discovery REST API scripts

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
bitdiscovery
bitdiscovery
 
 
pdf
pdf
 
 
README.md
README.md
 
 
auto-add-assets.py
auto-add-assets.py
 
 
delete-ip.py
delete-ip.py
 
 
pdf-report.py
pdf-report.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Bit Discovery Python scripts

These scripts demonstrate how you can integrate your work with the Bit Discovery API.

To run these scripts, you have to have Python 3.6+ installed on your computer and your Bit Discovery API keys for an inventory. (You can get this on your Bit Discovery profile page.) The best way is to save your API key to a variable and reuse it for every script.

APIKEY=eyJh...hUFs
python pdf-report.py $APIKEY

If you need more information about the options of any script, just see the help message:

python pdf-report.py --help

PDF Report

The pdf-report.py script exports the assets from one or all of your inventories (--multiple flag), and creates a PDF file analysis based on the inventory data.

Usage

Install the dependencies:

pip install argparse datetime fpdf2 matplotlib pypdf2 requests

Create a pdf report by passing the inventory api key:

python3 pdf-report.py $APIKEY

If you want to create a pdf report for every inventory you own, you can pass the --multiple flag:

python3 pdf-report.py $APIKEY --multiple

Auto add assets

The auto-add-assets.py script can search your cloud provider, AWS, Google Cloud or Azure (using their respective command-line tools), and add your running instances to the provided inventory.

Usage

For this script you need to have and be signed in to the command-line interfaces of your cloud provider of choice. For AWS, install the AWS CLI, for GCP Cloud the gcloud CLI and for Azure az.

After that, install the Python dependencies:

pip install argparse datetime requests sh

Read your running EC2 instances and buckets from your AWS account:

python3 auto-add-assets.py amazon-ec2 $APIKEY

Similarly for Google Cloud and Azure:

# GCP
python3 auto-add-assets.py google-cloud $APIKEY
# Azure
python3 auto-add-assets.py azure $APIKEY

Delete ip or source

The delete-ip.py script deletes one specific IP or source from your inventory.

Usage

First, install the Python dependencies:

pip install argparse requests sh

Delete an IP or a source (with its id) from the given inventory:

python3 delete-ip.py ip 1.1.1.1 $APIKEY
python3 delete-ip.py source 13 $APIKEY

About

Bit Discovery REST API scripts

Resources

Readme

Security policy

Security policy
Activity
Custom properties

Stars

3 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.