# Usage Guide ## Running ```bash # From project directory derp # With options derp --config /path/to/derp.toml --verbose ``` ## CLI Flags | Flag | Description | |------|-------------| | `-c, --config PATH` | Config file path | | `-v, --verbose` | Debug logging | | `--cprofile [PATH]` | Enable cProfile, dump to PATH [derp.prof] | | `-V, --version` | Print version | | `-h, --help` | Show help | ## Configuration All settings in `config/derp.toml`: ```toml [server] host = "irc.libera.chat" # IRC server hostname port = 6697 # Port (6697 = TLS, 6667 = plain) tls = true # Enable TLS encryption nick = "derp" # Bot nickname user = "derp" # Username (ident) realname = "derp IRC bot" # Real name field password = "" # Server password (optional) sasl_user = "" # SASL PLAIN username (optional) sasl_pass = "" # SASL PLAIN password (optional) ircv3_caps = [ # IRCv3 capabilities to request "multi-prefix", "away-notify", "server-time", "cap-notify", "account-notify", ] [bot] prefix = "!" # Command prefix character channels = ["#test"] # Channels to join on connect plugins_dir = "plugins" # Plugin directory path rate_limit = 2.0 # Max messages per second (default: 2.0) rate_burst = 5 # Burst capacity (default: 5) admins = [] # Hostmask patterns (fnmatch), IRCOPs auto-detected timezone = "UTC" # Timezone for calendar reminders (IANA tz name) [logging] level = "info" # Logging level: debug, info, warning, error format = "text" # Log format: "text" (default) or "json" ``` ## Built-in Commands | Command | Description | |---------|-------------| | `!ping` | Bot responds with "pong" | | `!help` | List all available commands | | `!help ` | Show help for a specific command | | `!help ` | Show plugin description and its commands | | `!version` | Show bot version | | `!uptime` | Show how long the bot has been running | | `!echo ` | Echo back text (example plugin) | | `!cert [...]` | Lookup CT logs for up to 5 domains | | `!whoami` | Show your hostmask and admin status | | `!load ` | Hot-load a plugin (admin) | | `!reload ` | Reload a plugin (admin) | | `!unload ` | Unload a plugin (admin) | | `!admins` | Show admin patterns and detected opers (admin) | | `!plugins` | List loaded plugins with handler counts | | `!state [key]` | Inspect plugin state store (admin) | | `!kick [reason]` | Kick user from channel (admin) | | `!ban ` | Ban a hostmask in channel (admin) | | `!unban ` | Remove a ban from channel (admin) | | `!topic [text]` | Set or query channel topic (admin) | | `!mode [args]` | Set channel mode (admin) | | `!dns [type]` | DNS lookup (A, AAAA, MX, NS, TXT, CNAME, PTR, SOA) | | `!tdns [type] [@server]` | TCP DNS lookup via SOCKS5 proxy | | `!encode ` | Encode text (b64, hex, url, rot13) | | `!decode ` | Decode text (b64, hex, url, rot13) | | `!hash [algo] ` | Generate hash digests (md5, sha1, sha256, sha512) | | `!hashid ` | Identify hash type by format | | `!defang ` | Defang URLs/IPs/domains for safe sharing | | `!refang ` | Restore defanged IOCs | | `!revshell ` | Generate reverse shell one-liner | | `!cidr ` | Subnet info (range, hosts, mask) | | `!cidr contains ` | Check if IP belongs to network | | `!whois ` | WHOIS lookup via raw TCP (port 43) | | `!portcheck [ports]` | Async TCP port scan (max 20 ports) | | `!httpcheck ` | HTTP status, redirects, response time | | `!tlscheck [port]` | TLS version, cipher, cert details | | `!blacklist ` | Check IP against 10 DNSBLs | | `!rand [args]` | Random: password, hex, uuid, bytes, int, coin, dice | | `!timer [label]` | Set countdown timer with notification | | `!timer list` | Show active timers | | `!timer cancel