Skip to main content

PyBots Tweet

Create your robot clients with Python.

PyPi Read The Docs Build Status Python Versions Known Vulnerabilities License

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, ...).

pip install pybots

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:

from pybots import TCPBot

with 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.

with TCPBot("LAN_host", 1234, no_proxy=True) as bot:
    # ...

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

Examples

Real-Life Projects

CTF

Release files for pybots 2.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybots 2.1.5
File Size Uploaded
pybots-2.1.5.tar.gz 214.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybots 2.1.5
File Interpreter ABI Platform
pybots-2.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 314.9 kB

Release files / pybots-2.1.5.tar.gz

Download URL pybots-2.1.5.tar.gz
Size 214.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dec4b92c026888109b5f4a144e90baa911ac1633725820154123dcb17fa23167
BLAKE2b-256 checksum
How to use checksums
44556f6ea9a96243c1d424fffe1750cd02393f3f5717a76616c735424621c7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / pybots-2.1.5-py3-none-any.whl

Download URL pybots-2.1.5-py3-none-any.whl
Size 100.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
186d3669601bfceaf42802a6eed473ef3a42a15068b49dfe5e57eddfbb2e555d
BLAKE2b-256 checksum
How to use checksums
816478fc79b471860b9b508497a9de6745ecb207a947efdbb077f6f440ba5e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

2.1.5 This release

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

1 release file

2.0.12

1 release file

2.0.11

1 release file

2.0.10

1 release file

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

1.7.2

1 release file

1.6.2

1 release file

1.5.7

1 release file

1.4.1

1 release file

1.3.1

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.1

2 release files

1.2.0

1 release file

1.1.8

1 release file

1.0.3

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page