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 accidentially 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.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.3.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for find-and-check-hosts-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 962c6b049a7d511584e0b6eb79dfc94d59d64450ba3187786d995d1704c814ca |
|
MD5 | 52a27b53a4186a3186bfc9fa83a639d2 |
|
BLAKE2b-256 | b91d2edf620bf52bb889f49fd6d045b520569521a6de787948fbb06f0923a0d4 |
Close
Hashes for find_and_check_hosts-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aad803779b2ce11befd4271dfa7ebdcb280b0f67319e41ad80d60ec6dffaef1 |
|
MD5 | 108c79e1b91eb499b36281c00667b6de |
|
BLAKE2b-256 | 773f9007c2ef58d881d107e9b07bd2f7bd7e9055fc61058dfa762a49e7bec72d |