Code Monkey home page Code Monkey logo

aws-waf-cidr-converter's Introduction

AWS WAF CIDR converter

Build Status Coverage Status Codacy Badge

Conversion between typical CIDR ranges and the ranges allowed by AWS WAF:

AWS WAF supports /8, /16, /24, and /32 IPv4 address ranges and /16, /24, /32, /56, /64, and /128 IPv6 address ranges

Usage

$ ./converter.py -h
usage: converter.py [-h] cidr_range

Converts CIDR ranges into AWS WAF IP Set allowed ranges

positional arguments:
  cidr_range  eg. 192.168.0.0/23

optional arguments:
  -h, --help  show this help message and exit

$ ./converter.py 192.168.0.0/23
192.168.0.0/24
192.168.1.0/24

Requirements

Supports both Python 2.7 and 3.6 (others may run but no tests are ran against them).

For Python2 you will need to install some dependencies:

pip install -r requirements.txt

These are backported modules from Python3's Standard Library so Python3 has no such dependencies.

Contributing

Running the tests

To run all the tests for both Python2.7 and 3.6 just run:

tox

Obviously you will need tox available but this will install all dependencies for each environment in a virtual environment.

There is a pre-commit hook available that will automatically run the tests for you. Simply copy it into your .git/hooks folder to install it:

cp pre-commit .git/hooks/

aws-waf-cidr-converter's People

Contributors

tomelliff avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

madhusudhanbn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.