Skip to content
A script to extract domain names from Content Security Policy(CSP) headers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Pipfile More refactoring. Mar 16, 2019
Pipfile.lock
README.md Updated README.md May 24, 2018
csp.gif
csp_parser.py

README.md

domains-from-csp

A Python script to parse domain names from CSP header

  • A script to extract domain names from Content Security Policy(CSP) headers
  • The output is print to stdout for now

Demo

script-in-action

Screenshots

3rd party package dependency

requests

click

Setup

  • Clone this repo
$ git clone git@github.com:yamakira/censys-enumeration.git
  • Install dependencies
$ pipenv install
  • Check help menu
$ python csp_parser.py --help
                                                                                                   2 ↵
Usage: csp_parser.py [OPTIONS] URL

Options:
  -r, --resolve / --no-resolve  Enable/Disable DNS resolution
  --help                        Show this message and exit.

Usage

  • Parse the CSP header for domain names but don't do DNS resolution
$ python csp_parser.py target_url
  • Parse the CSP header for domain names and also do DNS resolution
$ python csp_parser.py target_url --resolve
$ python csp_parser.py target_url -r
You can’t perform that action at this time.