Skip to main content

urlscanio

Summary

URLScan.io is a useful tool for scanning and obtaining information from potentially malicious websites. The creators of URLScan have very helpfully made an API which can be used to add some automation to your workflow. urlscanio is a simple Python CLI utility which makes use of the aforementioned APIs to automate my own personal workflow when it comes to using URLScan.

Requirements

urlscanio requires Python >= 3.8. You will also need a URLScan.io account and/or API key.

Installation

If you have a compatible Python version installed, simply run (using pip3 if necessary):

pip install urlscanio

How to use

In this section, the different functions of the CLI are outlined. You may also use urlscanio -h or urlscanio --help for information within your terminal.

API key and download directory

This tool requires an environment variable named URLSCAN_API_KEY containing your API key. Optionally, you may also set an environment variable called URLSCAN_DATA_DIR to specify where the screenshots and DOM should be downloaded. If not set, they will be downloaded in the directory you run urlscanio from.

It is recommended to use .bashrc or .zshrc for this. If using PowerShell, add URLSCAN_API_KEY and URLSCAN_DATA_DIR to your user profile.

Investigate URL

Provided a URL (containing the protocol and domain at minimum), will request a scan and download the corresponding screenshot and DOM, as well as the report URL.

Examples:

urlscanio -i https://www.some-dodgy.website
urlscanio --investigate http://some-dodgy.website

Submit scan request

Provided a URL (containing the protocol and domain at minimum), will request a scan and return the UUID generated. This can then be used to determine eg the screenshot location.

Examples:

urlscan -s https://www.some-dodgy.website
urlscan --submit http://some-dodgy.website

Retrieve scan information

Provided the UUID linked to the scan in question, will query the API to download the screenshot and DOM from the report, as well as return the report URL.

urlscan -r c5be1459-0a64-4751-bf25-8dd6d3c5742d
urlscan --retrieve c5be1459-0a64-4751-bf25-8dd6d3c5742d

Metadata

Release files for urlscanio 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urlscanio 0.1.1
File Size Uploaded Provenance Actions
urlscanio-0.1.1.tar.gz 5.7 kB Without provenance Details for urlscanio-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for urlscanio 0.1.1
File Interpreter ABI Platform Actions
urlscanio-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for urlscanio-0.1.1-py2.py3-none-any.whl

Total release size: 12.4 kB

Release files / urlscanio-0.1.1.tar.gz

Download URL urlscanio-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6dee0384fb3566166ba8058c4df9642599da8cfa89625fbdc745e9a06aef05a5
BLAKE2b-256 checksum
How to use checksums
5fdf9c12e84552f08b3774a7229538682ac959859e25530d55ba4e10fa2f2c47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / urlscanio-0.1.1-py2.py3-none-any.whl

Download URL urlscanio-0.1.1-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5a80f823ff451388c6759eddbcac12be1e1a9deed8807acba1242f6cc617eb13
BLAKE2b-256 checksum
How to use checksums
54ed61d89a74de884894c082a8b18b3f2a9cd862354a1950a9b796ba32c454d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Security for urlscanio 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page