malspider icon indicating copy to clipboard operation
malspider copied to clipboard

Email alert capability

Open jasheppa5 opened this issue 7 years ago • 3 comments

daily email summary of alerts

jasheppa5 avatar Mar 28 '17 16:03 jasheppa5

I just pushed code to enable email alert capabilities (if desired). If you are on an older version of Malspider, you'll need to make a few changes.

  1. Get the latest code from github
  2. start mysql with "mysql -u root -p", enter your root password and add the email alert table with the following sql:

DROP TABLE IF EXISTS email_alert; CREATE TABLE email_alert ( id int(11) NOT NULL AUTO_INCREMENT, recipients text, subject varchar(250) NOT NULL, frequency varchar(50) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

  1. from the root malspider directory, apply django model migrations with "python malspider_django/manage.py migrate"

  2. Add the following cronjobs:

@hourly python <your_root_malspider_directory>/malspider_django/manage.py email_alerts hourly 0 8 * * * <your_root_malspider_directory>/malspider_django/manage.py email_alerts daily 0 8 * * 7 python <your_root_malspider_directory>/malspider_django/manage.py email_alerts weekly

jasheppa5 avatar Apr 17 '17 18:04 jasheppa5

Add email alerts via the admin interface: Admin Panel -> Email Alerts -> "Add Email Alert"

Provide a subject line for your email "ie. Malspider Email Summary", a list of recipients, and the frequency (daily, hourly, weekly)

jasheppa5 avatar Apr 17 '17 18:04 jasheppa5

Forgot one thing - you'll need to navigate to malspider_django/malspider_django/settings.py, at the bottom of the file is a variable for the EMAIL_HOST and EMAIL_PORT. Uncomment these and apply your settings.

jasheppa5 avatar Apr 17 '17 19:04 jasheppa5