Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f62e77
commit f12af50
Showing
23 changed files
with
136 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
production: | ||
driver: mysql | ||
open: root:@(:3307)/gophish?charset=utf8&parseTime=True&loc=Local | ||
dialect: mysql | ||
import: github.com/go-sql-driver/mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
CREATE TABLE IF NOT EXISTS users (id integer primary key auto_increment,username varchar(255) NOT NULL UNIQUE,hash varchar(255),api_key varchar(255) NOT NULL UNIQUE ); | ||
CREATE TABLE IF NOT EXISTS templates (id integer primary key auto_increment,user_id bigint,name varchar(255),subject varchar(255),text text,html text,modified_date datetime ); | ||
CREATE TABLE IF NOT EXISTS targets (id integer primary key auto_increment,first_name varchar(255),last_name varchar(255),email varchar(255),position varchar(255) ); | ||
CREATE TABLE IF NOT EXISTS smtp (smtp_id integer primary key auto_increment,campaign_id bigint,host varchar(255),username varchar(255),from_address varchar(255) ); | ||
CREATE TABLE IF NOT EXISTS results (id integer primary key auto_increment,campaign_id bigint,user_id bigint,r_id varchar(255),email varchar(255),first_name varchar(255),last_name varchar(255),status varchar(255) NOT NULL ,ip varchar(255),latitude real,longitude real ); | ||
CREATE TABLE IF NOT EXISTS pages (id integer primary key auto_increment,user_id bigint,name varchar(255),html text,modified_date datetime ); | ||
CREATE TABLE IF NOT EXISTS groups (id integer primary key auto_increment,user_id bigint,name varchar(255),modified_date datetime ); | ||
CREATE TABLE IF NOT EXISTS group_targets (group_id bigint,target_id bigint ); | ||
CREATE TABLE IF NOT EXISTS events (id integer primary key auto_increment,campaign_id bigint,email varchar(255),time datetime,message varchar(255) ); | ||
CREATE TABLE IF NOT EXISTS campaigns (id integer primary key auto_increment,user_id bigint,name varchar(255) NOT NULL ,created_date datetime,completed_date datetime,template_id bigint,page_id bigint,status varchar(255),url varchar(255) ); | ||
CREATE TABLE IF NOT EXISTS attachments (id integer primary key auto_increment,template_id bigint,content text,type varchar(255),name varchar(255) ); | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
DROP TABLE attachments; | ||
DROP TABLE campaigns; | ||
DROP TABLE events; | ||
DROP TABLE group_targets; | ||
DROP TABLE groups; | ||
DROP TABLE pages; | ||
DROP TABLE results; | ||
DROP TABLE smtp; | ||
DROP TABLE targets; | ||
DROP TABLE templates; | ||
DROP TABLE users; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
db/db_mysql/migrations/20160227180335_0.1.2_store-smtp-settings.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
-- Move the relationship between campaigns and smtp to campaigns | ||
ALTER TABLE campaigns ADD COLUMN smtp_id bigint; | ||
-- Create a new table to store smtp records | ||
DROP TABLE smtp; | ||
CREATE TABLE smtp( | ||
id integer primary key auto_increment, | ||
user_id bigint, | ||
interface_type varchar(255), | ||
name varchar(255), | ||
host varchar(255), | ||
username varchar(255), | ||
password varchar(255), | ||
from_address varchar(255), | ||
modified_date datetime, | ||
ignore_cert_errors BOOLEAN | ||
); | ||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
db/db_mysql/migrations/20160605210903_0.2_campaign_scheduling.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE campaigns ADD COLUMN launch_date DATETIME; | ||
|
||
UPDATE campaigns SET launch_date = created_date; | ||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
db/db_sqlite3/migrations/20160131153104_0.1.2_add_event_details.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE events ADD COLUMN details BLOB; | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
8 changes: 8 additions & 0 deletions
8
db/db_sqlite3/migrations/20160211211220_0.1.2_add_ignore_cert_errors.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE smtp ADD COLUMN ignore_cert_errors BOOLEAN; | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
8 changes: 8 additions & 0 deletions
8
db/db_sqlite3/migrations/20160217211342_0.1.2_create_from_col_results.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE results ADD COLUMN position VARCHAR(255); | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
9 changes: 9 additions & 0 deletions
9
db/db_sqlite3/migrations/20160225173824_0.1.2_capture_credentials.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE pages ADD COLUMN capture_credentials BOOLEAN; | ||
ALTER TABLE pages ADD COLUMN capture_passwords BOOLEAN; | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
-- +goose Up | ||
-- SQL in section 'Up' is executed when this migration is applied | ||
ALTER TABLE pages ADD COLUMN redirect_url VARCHAR(255); | ||
|
||
-- +goose Down | ||
-- SQL section 'Down' is executed when this migration is rolled back | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters