Skip to main content

Simple library to check if a hostname belongs to AWS IP space.

Project description

onaws

onaws is a simple tool to check if an IP/hostname belongs to the AWS IP space or not. This has multiple applications:

  • Continuous recon of assets
  • Gather assets using a specific service (e.g. EC2)
  • Finding region information for S3 buckets
  • ... etc.

onaws

Install

pip install onaws

Usage

Given an IP:

onaws 52.219.47.34

Given a hostname:

A domain or subdomain can be passed as input:

onaws example.com

You may also supply an S3 bucket hostname as input:

onaws dropbox.s3.amazonaws.com

Output

If the IP/hostname falls in the AWS IP range, onaws will return the service, region and other details in the output:

{
    "is_aws_ip": true,
    "ip_address": "52.218.196.155",
    "service": "S3",
    "region": "us-west-2",
    "matched_subnet": "52.218.128.0/17",
    "hostname": "flaws.cloud"
}

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

onaws-0.0.11.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

onaws-0.0.11-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 Python 3

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