Skip to content

A script to extract domain names from Content Security Policy(CSP) headers

License

Notifications You must be signed in to change notification settings

0xbharath/domains-from-csp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]: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

About

A script to extract domain names from Content Security Policy(CSP) headers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages