Teatime is an RPC attack Framework, which aims to make it easier to detect incorrect configurations on blockchain nodes.
It detects a wide variety of issues security, from leaking information to opening accounts and manipulating settings.
Its goal is to enable node vulnerability scanning tools and minimize the risk of malware attacks. base the nodes because of the common vulnerabilities that exist. Teatime uses a plugin-based architecture, so the extension of the library with your own controls is simple and easy to use.
Installation
Teatime runs on Python 3.6 +.
To get started, just run
$ pip3 install teatime
Alternatively, download the repository and run it
$ pip3 install .
Or directly via Python's setuptools:
$ python3 setup.py install
Example
To get started, simply create a Scanner class and pass your target IP, port, node type, and list of installed plugins. Consider the following example to check if a node is synchronized and working:
from teatime.scanner import Scanner from teatime.plugins.context import NodeType from teatime.plugins.eth1 import NodeSync, MiningStatus TARGET_IP = "127.0.0.1" TARGET_PORT = 8545 INFURA_URL = "Infura api "Endpoint" def get_scanner(): return Scanner( ip=TARGET_IP, port=TARGET_PORT, node_type=NodeType.geth, plugins=[ NodeSync(infura_url=INFURA_URL, block_threshold=10), MiningStatus(should_mine=False)]) if __name__ == '__main__': scanner = get_scanner() report = scanner.run() print(report.to_dict()