1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
|
Metadata-Version: 2.4
Name: censys
Version: 2.2.19
Summary: An easy-to-use and lightweight API wrapper for Censys APIs (censys.io).
License: Apache-2.0
License-File: LICENSE
Keywords: censys,api,search,attack surface management
Author: Censys, Inc.
Author-email: support@censys.io
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: argcomplete (>=2.0.0,<4.0.0)
Requires-Dist: backoff (>=2.0.0,<3.0.0)
Requires-Dist: requests (>=2.29.0)
Requires-Dist: rich (>=10.16.2)
Requires-Dist: urllib3 (<3.0.0)
Project-URL: Censys Homepage, https://censys.io/
Project-URL: Censys Search, https://search.censys.io/
Project-URL: Changelog, https://github.com/censys/censys-python/releases
Project-URL: Discussions, https://github.com/censys/censys-python/discussions
Project-URL: Documentation, https://censys-python.rtfd.io
Project-URL: Source, https://github.com/censys/censys-python
Project-URL: Tracker, https://github.com/censys/censys-python/issues
Description-Content-Type: text/markdown
# Censys Python Library
[](https://pypi.org/project/censys/)
[](https://www.python.org/downloads/)
[](https://censys-python.readthedocs.io/en/stable/?badge=stable)
[](https://github.com/censys/censys-python/discussions)
[](http://makeapullrequest.com)
[](https://github.com/censys/censys-python/blob/main/LICENSE)
> [!WARNING]
> **DEPRECATION NOTICE**: The Censys Search v1 and v2 APIs will be deprecated soon. Please migrate to the new **Censys Platform**.
>
> - 📖 **New API Documentation**: [https://docs.censys.com/reference/get-started#/](https://docs.censys.com/reference/get-started#/)
> - 📦 **New Python SDK**: Install with `pip install censys-platform` - [https://pypi.org/project/censys-platform/](https://pypi.org/project/censys-platform/)
> - 🖥️ **New CLI Tool** (`cencli`): [https://docs.censys.com/docs/platform-cli](https://docs.censys.com/docs/platform-cli)
> - ⚠️ **If you plan to use the new CLI, you will need to uninstall this package's CLI first** as both use the `censys` command name
>
> The **Censys ASM APIs in this library are NOT deprecated** and will continue to be supported.
An easy-to-use and lightweight API wrapper for Censys APIs ([censys.io](https://censys.io/)). Python 3.8+ is currently supported. This library has been tested on Python 3.8 and 3.x (Currently version 3.10).
## Features
- [Search Censys data](https://censys-python.readthedocs.io/en/stable/usage-v2.html)
- [Bulk Certificate lookups](https://censys-python.readthedocs.io/en/stable/usage-v2.html#bulk-view)
- [Download Bulk Data](https://censys-python.readthedocs.io/en/stable/usage-v1.html#data)
- [Manage assets, events, and seeds in Censys ASM](https://censys-python.readthedocs.io/en/stable/usage-asm.html)
- [Command-line interface](https://censys-python.readthedocs.io/en/stable/cli.html)
<!-- markdownlint-disable MD033 -->
<a href="https://asciinema.org/a/500416" target="_blank"><img src="https://asciinema.org/a/500416.svg" width="600"/></a>
<!-- markdownlint-enable MD033 -->
## Getting Started
The library can be installed using `pip`.
```sh
pip install censys
```
To upgraded using `pip`.
```sh
pip install --upgrade censys
```
Alternatively, you can install the library using `poetry`.
```sh
git clone https://github.com/censys/censys-python.git
cd censys-python/
poetry install
```
Optionally, you can enable tab completion for the CLI by adding this line to your `~/.bashrc`, `~/.zshrc`, or equivalent.
> Please note that autocomplete is supported for field names in the `search` command.
```sh
eval "$(register-python-argcomplete censys)"
```
To configure your search credentials run `censys config` or set both `CENSYS_API_ID` and `CENSYS_API_SECRET` environment variables.
```sh
$ censys config
Censys API ID: XXX
Censys API Secret: XXX
Do you want color output? [y/n]: y
Successfully authenticated for your@email.com
```
If you have a Censys ASM account, you can configure your ASM credentials by running `censys asm config` or set both `CENSYS_ASM_API_KEY` environment variables.
```sh
$ censys asm config
Censys ASM API Key: XXX
Do you want color output? [y/n]: y
Successfully authenticated
```
## Examples
The examples located in the [`examples/`](examples/) directory are a great place to start. You can also find more examples in the [usage documentation](https://censys-python.readthedocs.io/en/stable/usage-v2.html).
## [Documentation](https://censys-python.readthedocs.io/)
[](https://censys-python.readthedocs.io/)
## Resources
- [Source](https://github.com/censys/censys-python)
- [Issue Tracker](https://github.com/censys/censys-python/issues)
- [Changelog](https://github.com/censys/censys-python/releases)
- [Documentation](https://censys-python.rtfd.io)
- [Discussions](https://github.com/censys/censys-python/discussions)
- [Censys Homepage](https://censys.io/)
- [Censys Search](https://search.censys.io/)
## Contributing
All contributions (no matter how small) are always welcome. See [Contributing to Censys Python](.github/CONTRIBUTING.md)
## Development
This project uses [poetry](https://python-poetry.org/) for dependency management. Please ensure you have [installed the latest version](https://python-poetry.org/docs/#installation).
```sh
git clone git@github.com:censys/censys-python.git
cd censys-python/
poetry install
```
## Testing
```sh
# Run tests
poetry run pytest
# With coverage report
poetry run pytest --cov-report html
```
## License
This software is licensed under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
- Copyright (C) 2024 Censys, Inc.
|