https://github.com/dhondta/python-pybots
:wrench: Devkit for quickly creating client bots for remote communications
https://github.com/dhondta/python-pybots
bot cli client development devkit http irc programming python ringzer0 rootme tcp tinyscript
Last synced: 4 months ago
JSON representation
:wrench: Devkit for quickly creating client bots for remote communications
- Host: GitHub
- URL: https://github.com/dhondta/python-pybots
- Owner: dhondta
- License: gpl-3.0
- Created: 2018-01-01T14:22:43.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T22:19:53.000Z (7 months ago)
- Last Synced: 2025-02-10T03:34:50.659Z (4 months ago)
- Topics: bot, cli, client, development, devkit, http, irc, programming, python, ringzer0, rootme, tcp, tinyscript
- Language: Python
- Homepage:
- Size: 2.41 MB
- Stars: 15
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PyBots
![]()
Create your robot clients with Python.
[](https://pypi.python.org/pypi/pybots/)
[](http://python-pybots.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/dhondta/python-pybots/actions/workflows/python-package.yml)
[](https://pypi.python.org/pypi/pybots/)
[](https://snyk.io/test/github/dhondta/python-pybots?targetFile=requirements.txt)
[](https://pypi.python.org/pypi/pybots/)This library aims to quickly write client bots for communicating with remote hosts in a standardized way using context managers. It implements a few bots for some common protocols (HTTP, JSON, IRC, ...) and for communicating with specific applications (Shodan, Censys, HaveIBeenPwned?, RootMe, RingZer0, ...).
```sh
pip install pybots
```## :sunglasses: Usage
Each bot class is implemented as a context manager and has a logger attached. It can thus be instantiated in a clear and straightforward way. Here is an example:
```py
from pybots import TCPBotwith TCPBot("remote_host", 1234) as bot:
data = bot.send_receive("Hello!")
# do something with data
```Note that, if a bot is used behind a proxy, it will use system's proxy settings. This can be bypassed by using `no_proxy=True` while instantiating the bot.
```py
with TCPBot("LAN_host", 1234, no_proxy=True) as bot:
# ...
```## :ghost: Supported Bots
### Generic Purpose
All the following bots use the same interface providing uniformized logging.
**Name** | **Description**
:----------:|---------------------------------------------------------------
HTTP | For browsing and parsing a Web page with BeautifulSoup
IRC | For connecting to an IRC server on a given channel with a given nickname
JSON | For dealing with a JSON API
TCP | For opening a TCP socket### CTF Platforms
Each of these bots is aimed to parse inputs from a challenge and to send the answer computed in the context of the bot to the target website for retrieving the flag.
**Name** | **Description**
:----------:|---------------------------------------------------------------
RingZer0 | Web bot for all kinds of challenges
RootMe | IRC bot for programming challenges
ZSIS | Web bot for progrmming challenges### Security Services
These bots are built upon an API layer that defines corresponding interfaces to the online services' functionalities as described in their documentation. The bots implement common operations that may involve multiple calls to the online services' API.
**Name** | **Description**
:----------:|---------------------------------------------------------------
Censys | JSON bot that checks for IP's and domains
Ghost Project | Web bot that checks for emails
HaveIBeenPwned? | JSON bot that checks for emails and passwords
HaveIBeenSold? | JSON bot that checks for emails
Nuclear Leaks | Web bot that checks for emails and domains
Shodan | JSON bot that checks for IP's### Utility Services
**Name** | **Description**
:----------:|---------------------------------------------------------------
Git | Web bot that can retrieve a Git repository
PostBin | Web bot that can perform Bin operations## :mag: Examples
### Real-Life Projects
* [Bots Scheduler](https://github.com/dhondta/bots-scheduler/) (uses [`ShodanBot`](https://github.com/dhondta/python-pybots/blob/main/src/pybots/bots/security/shodan.py), [`HaveIBeenPwnedBot`](https://github.com/dhondta/python-pybots/blob/main/src/pybots/bots/security/haveibeenpwned.py), [`GhostProjectBot`](https://github.com/dhondta/python-pybots/blob/main/src/pybots/bots/security/ghostproject.py) and a few others)
### CTF
* [Hackvent 2017 (Day 06 & 10)](https://github.com/dhondta/python-pybots/blob/main/docs/pages/examples/hackvent-2017.md)
* [RingZer0 / Coding (13 & 17)](https://github.com/dhondta/python-pybots/blob/main/docs/pages/examples/ringzer0.md)
* [Root-Me / Programming](https://github.com/dhondta/python-pybots/blob/main/docs/pages/examples/rootme.md)## :clap: Supporters
[](https://github.com/dhondta/python-pybots/stargazers)
[](https://github.com/dhondta/python-pybots/network/members)