Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.19 KB

README.md

File metadata and controls

58 lines (38 loc) · 1.19 KB

slack ban bot

  • TODO: Why? What for?

Install

  • TODO: How?
  • python3
  • perhaps venv & pip install -r requirements.txt

Run

  • FLASK_APP=bot/app.py flask run -h 0.0.0.0 --debugger --reload
 * Serving Flask app "bot.app"
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
  • Expose port (and Link to custom domain)

Link to Slack

  • Slack > Manage Apps > Custom Integrations > Slash Commands > Add Configuration

Auto Run

  • TODO: How?

Features

  • /etc/hosts.deny $ip

    • add hosts.deny $ip - Done
    • remove hosts.allow $ip
  • /etc/hosts.allow $ip

    • add hosts.allow $ip
    • remove hosts.deny $ip
  • /usr/bin/whois $ip

    • country info return
  • /sbin/iptables -D $ip

    • ?
  • /help

/etc/sudoers

bot    ALL=(root) NOPASSWD: /home/bot/slack_bot/sbin/