malspider
malspider copied to clipboard
Email alert capability
daily email summary of alerts
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.
- Get the latest code from github
- 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;
-
from the root malspider directory, apply django model migrations with "python malspider_django/manage.py migrate"
-
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
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)
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.