| #!/usr/bin/python | |
| # All SSH libraries for Python are junk (2011-10-13). | |
| # Too low-level (libssh2), too buggy (paramiko), too complicated | |
| # (both), too poor in features (no use of the agent, for instance) | |
| # Here is the right solution today: | |
| import subprocess | |
| import sys |
| global: | |
| scrape_interval: 1m | |
| scrape_timeout: 10s | |
| evaluation_interval: 1m | |
| alerting: | |
| alertmanagers: | |
| - kubernetes_sd_configs: | |
| - role: pod | |
| bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | |
| tls_config: |
Please refer to this blogpost to get an overview.
Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.
I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.
Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.
| # Encodes ioprox data to format used by proxmark, if using a version that doesn't allow you to specify | |
| # the version/facility/cardnumber seperately. | |
| id_str = "XSF(01)66:25342" | |
| version = id_str.split('(')[1].split(')')[0] | |
| facility = id_str.split('(')[1].split(')')[1].split(':')[0] | |
| code = id_str.split(':')[1] | |
| version = int(version, 16) #is this hex? Have only seen 1 or 2 here |