A tool for adding items to the inhibition list via API
Project description
inhibitor_tool
📌 Introduction
inhibitor_tool is a Python CLI tool that allows users to send inhibition requests via an API.
It supports authentication through environment variables loaded from auth_token.
🛠 Installation
You can install the package using pip:
pip3 install inhibitor_tool
🔧 Configuration
1️⃣ Set Up Authentication
Before using inhibitor_tool, you must configure authentication credentials in ~/.auth_token and load them into the environment:
echo 'export USERNAME="mmwei3"' >> ~/.auth_token
echo 'export PASSWORD="mmwei3password"' >> ~/.auth_token
echo 'export LOGIN_URL="https://auth.example.com/token"' >> ~/.auth_token
echo 'export INHIBIT_URL="https://inhibitor.example.com/add"' >> ~/.auth_token
source ~/.auth_token
💡 Important: The
source ~/.auth_tokencommand must be executed every time a new session is started.
🚀 Usage
2️⃣ Inhibit an Item (Default TTL: 3 hours)
inhibitor-tool --content "MaliciousIP:192.168.1.1"
3️⃣ Specify a Custom TTL
inhibitor-tool --content "MaliciousIP:192.168.1.1" --ttl 6
--ttl 6means the inhibition will last 6 hours (default is 3 hours).
4️⃣ Add a Custom Remark
inhibitor-tool --content "MaliciousIP:192.168.1.1" --ttl 6 --remark "Security alert"
- The remark helps track the reason for inhibition.
- If omitted, it defaults to
"tmp_inhibitor".
📜 Open-Source Information
- Author: mmwei3
- Email: mmwei3@iflytek.com
- Contact: 178555350258
- Date: 2025-03-19
- License: MIT License
📦 Packaging & Deployment
5️⃣ Build the Package
python setup.py sdist bdist_wheel
6️⃣ Install from Local Package
pip install dist/inhibitor_tool-1.0.0-py3-none-any.whl
7️⃣ Uninstall the Package
pip uninstall inhibitor_tool
📜 License (MIT)
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
📌 Dependencies (requirements.txt)
requests
This README.md provides a clear, structured, and fully configurable CLI tool for API-based inhibition with authentication and pip installation. 🚀
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inhibitor_tool-3.0.0.tar.gz.
File metadata
- Download URL: inhibitor_tool-3.0.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9870672c2c0c2cfd1fc7c7ad8bd1f8fbba4c5e5a066c112e9bdac633fac55d64
|
|
| MD5 |
b960e2b7e7bf87ace01dc185ae669196
|
|
| BLAKE2b-256 |
c23279060ce2e698967a2628cadb963d379612323d657d813faac96eb0c4c18f
|
File details
Details for the file inhibitor_tool-3.0.0-py3-none-any.whl.
File metadata
- Download URL: inhibitor_tool-3.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e91ea26e5e1016c873016e081d2734b2064257f2f78817d24520fd50e0ac686f
|
|
| MD5 |
0ad0bd19fb9d162d71f543249c3dcd4b
|
|
| BLAKE2b-256 |
c41766550837179733e491fbb1b850c432901790316d38ef02114a662f8bb52c
|