Skip to main content

Tool that checks the system capabilities

Project description

checkmaster

Server or workstation requirements validation tool, configurable, extensible and fast.

Setup

pip install checkmaster

Usage

If executed without any cofniguration file, checkmaster returns some general information about the environment where it have been executed

{
  "base": "debian",
  "name": "ubuntu",
  "codename": "focal",
  "version": "20.04",
  "public ip": "151.53.91.70",
  "private ip": "192.168.3.115",
  "private hostname": "wert-desktop.that-thing.lan",
  "other private ips": null
}

The parameter --debug ERROR will show only the errors and not the entire log

checkmaster -c example_conf.json --debug ERROR

example of the output

ERROR checkmaster.sockets.ingoing_port {'kind': 'tcp', 'port': 8080, 'addrs': ['0.0.0.0']}
ERROR checkmaster.sockets.ingoing_port {'kind': 'tcp', 'port': 8443, 'addrs': ['0.0.0.0']}
ERROR checkmaster.sockets.ingoing_port {'kind': 'tcp', 'port': 5044, 'addrs': ['0.0.0.0']}
ERROR checkmaster.sockets.ingoing_port {'kind': 'udp', 'port': 1514}
ERROR checkmaster.sockets.ingoing_port {'kind': 'tcp', 'port': 1515, 'addrs': ['0.0.0.0']}
ERROR checkmaster.sockets.outgoing_port {'addr': 'that-host.net', 'port': 5150, 'kind': 'tcp', 'timeout': 2}
ERROR checkmaster.sockets.outgoing_port {'addr': 'that-host.net', 'port': 443, 'kind': 'tcp', 'timeout': 2}
ERROR checkmaster.sockets.outgoing_port {'addr': 'that-host.net', 'port': 5986, 'kind': 'tcp', 'timeout': 2}
ERROR checkmaster.sockets.outgoing_port {'addr': 'that-host.net', 'port': 22, 'kind': 'tcp', 'timeout': 2}

Configuration file format conversions

checkmaster -c examples/example_conf.yaml --yaml-to-json
checkmaster -c examples/example_conf.json --json-to-yaml

Filter which rules to execute by tag

checkmaster -c examples/example_conf.json --tags mine
2021-10-24 15:37:32 INFO checkmaster.sockets.ingoing_port {'kind': 'tcp', 'port': 22, 'addrs': ['0.0.0.0'], 'tag': 'mine'}

Configuration file

Contribute

Feel free to open new issues and pull requests

For Developers

As you can see each checmaster rule, in the example configuration json file, have a python package and a function name like checkmaster.sockets.ingoing_port where checkmaster.sockets is the python package and the function is ingoing_port.

This means that you can load and use your own package.function in checkmaster without any changes in the code!

Compiling it for Windows

sudo apt install wine
wget https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe
wine msiexec /i python-3.7.6-amd64.exe /qb

wine /home/$USER/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Programs/Python/Python37/Scripts/pip install checkmaster pyinstaller
wine /home/$USER/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Programs/Python/Python37/Scripts/pyinstaller \
 -F --clean \
 --hidden-import checkmaster.filesystems \
 --hidden-import checkmaster.distribution \
 --hidden-import checkmaster.hardware \
 --hidden-import checkmaster.sockets \
 --hidden-import checkmaster.commands \
 --paths /home/$USER/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Programs/Python/Python37/site-packages /home/$USER/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Programs/Python/Python37/Scripts/checkmaster

Unfortunately VirtusTotal have false positive with the previous compilation, so

pip uninstall pyinstaller

Then download and install VS Cpp Community Edition. Download pyInstaller package and unzip it in C:\Pyinstaller

then

cd C:\Pyinstaller\bootloader
python ./waf all --target-arch=64bit

set PYPATH="c:\users\utente\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\roaming\python\python39"

pyinstaller -F --hidden-import checkmaster.filesystems --hidden-import checkmaster.distribution --hidden-import checkmaster.hardware --hidden-import checkmaster.sockets --hidden-import checkmaster.commands --paths $PYPATH\site-packages $PYPATH\\Scripts\checkmaster

if you still have false positive from virus total consider to notify your checkmaster.exe to antivirus vendors!

Authors

  • Giuseppe De Marco
  • 4Securitas ACSIA Team

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

checkmaster-0.7.10.tar.gz (27.9 kB view details)

Uploaded Source

File details

Details for the file checkmaster-0.7.10.tar.gz.

File metadata

  • Download URL: checkmaster-0.7.10.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.10

File hashes

Hashes for checkmaster-0.7.10.tar.gz
Algorithm Hash digest
SHA256 2bb3a2bd7bd1bac4befaf7f9f36abd1dd0c19e1d76c7bf60838675f25eef4dc5
MD5 c5d2a709aab413633f4d37b9123c525e
BLAKE2b-256 8202d73e64a258fe567c5f190ad1ad5db1e88ff8ab0bf8192f05a46c4698785f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page