Find hostnames and IPv4 addresses in text files and check them against a set of rules
Project description
find-and-check-hosts
Searches files for IPs and hostnames and checks them against a rule list to prevent accidentally leaking sensitive information.
Installation
This repo can now be installed with pip:
pip install find-and-check-hosts
Or you can install it manually by following these steps:
- Clone this repository
- Install the dependencies listed in
./requirements.txt
with pip - (Optional) Do a
pip install .
to add thefind-and-check-hosts
command to your PATH
Usage
If you did the pip installation, you should be able to just call the installed script:
find-and-check-hosts <arguments>
If you just cloned it, you need to call it by path:
./src/main.py <arguments>
Notable changes
Version 0.1.4
- Added
--extensions
,--exclude-extensions
and--ignore-directories
files.
Version 0.1.3
- Added flags that can be used to check if results were returned (
--assert-results
and--assert-no-results
). - Made regexes case insensitive, so that they can find and properly handle domains such as
eXampLe.coM
.
Version 0.1.2
- Added a
domain
filter, that will match a domain and any subdomains. For exampledomain: example.com
will matchexample.com
,my.subdomain.example.com
, but notmy-example.com
orexample-com
. - Allowed the
regex
,glob
anddomain
fields to also accept a list of values. For example:hostname_rules: - status: ok - domain: - example.com - example.org
Tests
find-and-check-hosts -c src/find_and_check_hosts/example-config.yaml tests/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
find-and-check-hosts-0.1.4.tar.gz
(16.8 kB
view hashes)
Built Distribution
Close
Hashes for find-and-check-hosts-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0d8df6ed8b4f9e97370411e8a5e8d540493ac71adf9ab5f91a2df54c7cad0f4 |
|
MD5 | 36d4ac1e2157107387976042eeb6d886 |
|
BLAKE2b-256 | a0de8a58026b98f1bb6661e77108acc83082bf6afb2735cd3daf52ea79122673 |
Close
Hashes for find_and_check_hosts-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3daa8187566d1e7632485575b8d105accf9155c1e9a98bb9ea7e1998f9783fcc |
|
MD5 | 4c1795e529153faaa7d0b65cda8831e0 |
|
BLAKE2b-256 | 42246d3baaf2dd6ed984cf740a5741a41b9f3394f1a61e020bba5051820e8334 |