fishing-ainpm/Totr- ? reverse-engineered prompt
Reverse engineered prompt
Build me a Rust command line tool called antibot that watches nginx or Apache access logs and spots suspicious traffic by request volume. I want it to keep a shared blacklist in a database, so if one server bans an IP, the other servers can pick it up and block it too.
It should have a setup flow that creates the config file and gets everything ready with as little manual work as possible, plus a command to create the database tables. I also want an interactive mode when I run the app with no arguments, with simple commands to start monitoring, do maintenance like listing, banning, and unbanning IPs, and then log out cleanly.
Please include the older manual commands too, like watching a server, syncing bans, banning, unbanning, and listing the blacklist, since I may want to use it in scripts or cron later. It should apply bans locally with nftables if available, or fall back to iptables. If you need to check current Rust or SQL docs online for anything, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit