Skip to main content

Devkit for quickly creating client robots for remote communications

Project description

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

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

pybots-2.1.4.tar.gz (214.4 kB view details)

Uploaded Source

Built Distribution

pybots-2.1.4-py3-none-any.whl (100.6 kB view details)

Uploaded Python 3

File details

Details for the file pybots-2.1.4.tar.gz.

File metadata

  • Download URL: pybots-2.1.4.tar.gz
  • Upload date:
  • Size: 214.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pybots-2.1.4.tar.gz
Algorithm Hash digest
SHA256 f206762779d038b538d4433e282407f556054993c25a1b4ed8cd5512cf5104ac
MD5 4a9a4f45dd6eedc279ee53a61c9eda79
BLAKE2b-256 a3bfa0550a8b5e6b639ed06ade22f7c278ad8de9a36b6c5bd228d12128a44f07

See more details on using hashes here.

File details

Details for the file pybots-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: pybots-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 100.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pybots-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2da26a9e3de2aa46061f0c06f4d827affc35c3594ba82cb3ad6308eec49f876e
MD5 71095fafd8313140bee6b39a7c80f94d
BLAKE2b-256 381afc5fbeee09485796c03382d085a03191d1f7da851d3491c87f0cde43c69b

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