Skip to main content

Defangs and refangs malicious URLs

Project description

Defangs and refangs malicious URLs


  • As a script: use the defang command to defang or “refang” content, supporting both stdin/stdout streams as well as to/from files on disk:

    $ echo | defang
  • As a library:

    >>> from defang import defang
    >>> url = ""
    >>> defang(url)


  • added some regex fixes and arbitrary protocol defanging

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for defang, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size defang-0.3.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page