Provide a set of networking tools which operate from chat.
pip3 install legos.nettools
will grab this package and the Legobot required to run it.
import threading
from Legobot.Connectors.IRC import IRC
from Legobot.Lego import Lego
from Legobot.Legos.Help import Help
from legos.nettools import LegoNettools
# Initialize lock and baseplate
lock = threading.Lock()
baseplate = Lego.start(None, lock)
baseplate_proxy = baseplate.proxy()
# Connect to a chat medium
baseplate_proxy.add_child(IRC,
channels=['#test'],
nickname='bot',
server='irc.foo.bar',
port=6697,
use_ssl=True)
# Add children
baseplate_proxy.add_child(Help)
baseplate_proxy.add_child(LegoNettools)
The nettools Lego could be triggered by various prefix.
- Whois
- Nslookup
- DNS
- Trace
- Ping
- QUALYS lab
- IP geo
!whois {--getStatus | --getEmails | --getRegistrar | --getNS} {target}
!geoloc {target}
!ping {target}
As always, pull requests and issues are welcome.