A tool to perform DNS lookup and open IP addresses in a browser
Project description
nsopen
A command-line tool to perform DNS lookups and open resolved IP addresses in a web browser.
Particularly useful when you want to test behind a load balancer that resolves into multiple server IPs.
Installation
python -m pip install .
Usage
Note: pip packages executable directory should be in your PATH environmental variable
# Open all IPs for google.com using HTTPS (default)
nsopen google.com
# Open specific path /elmah.axd on example.com using HTTP protocol
nsopen -p http example.com /elmah.axd
if you didnt install, you can run it via python -m may need to add src folder to PYTHONPATH env var if you are in a different directory
python -m nsopen google.com
Example
nsopen -p https example.com /about
Command line options
usage: nsopen [-h] [-p {http,https}] hostname [path]
Perform DNS lookup and open IP addresses in a browser
positional arguments:
hostname The hostname to lookup
path [Optional] path to append to the URL (e.g. /elmah.axd)
options:
-h, --help show this help message and exit
-p, --protocol {http,https}
The URL protocol to use (default: https)
Development
Setup
# Install dev dependencies
pip install -r requirements-dev.txt
# (optional) install package in editable mode for CLI entry point
pip install -e .
Test
If you didn't install the package, set PYTHONPATH so tests can import the nsopen package.
# From the project root
$env:PYTHONPATH = "${PWD}\src"; pytest
Tooling
Common tooling is configured in pyproject.toml:
- black (code formatting)
- isort (import sorting)
- flake8 (linting)
- pytest (test runner defaults)
Run them as needed, e.g.:
black .
isort .
flake8
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nsopen-0.1.0.tar.gz.
File metadata
- Download URL: nsopen-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bfe97fbb44b804450a571bfa2472ce131f0dbf5a27bae67c349afea8655048b
|
|
| MD5 |
8a119a43ed31b7d426e1300aa5ad21bc
|
|
| BLAKE2b-256 |
01696c765e9c81cc913127eda22052e2b7169f44673b83b300a90ce2d02ad1a2
|
File details
Details for the file nsopen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nsopen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85870959161b9b0e3f115fbc47e02b186bef76551df0ad4047715a170f1612b2
|
|
| MD5 |
b5091acf5a11174b41796bf10a60bf59
|
|
| BLAKE2b-256 |
c0600ff3120a02afc1bef463fd03675186bc913af95054566f05d8c4e2e8afef
|