Commit Graph

813 Commits (91924a735e5f6ca98bb5fa8b2ff36691562c6799)

Author SHA1 Message Date
Jordan 631cd1ad13 Fixed the way Angular POSTS data
Added error code to checkError to support responses such as BadRequest, NotFound, etc.
2014-02-12 10:43:54 -06:00
Jordan cdc776ec03 Implemented PUT /api/groups/:id
Updated documentation of functions in db module (other modules to come)
Created consistency in API documentation
2014-02-11 17:32:29 -06:00
Jordan c68bb5ab71 Added Swagger API Docs
Will work on trying to make the look more consistent later.
2014-02-11 11:39:36 -06:00
Jordan 73db7fbdf9 Fixed invalid/unset API Key header to be 400 instead of 500
Successfully handle OPTIONS header for API
2014-02-11 00:14:58 -06:00
Jordan eb8491c144 Implemented ChangePassword() (now password can be changed from /settings)
A couple of UI fixes in tables
2014-02-10 13:02:44 -06:00
Jordan 34b93b7bf4 Updated campaigns view to support ng-table pagination
Updated Edit Group modal to support ng-table pagination
2014-02-10 09:44:15 -06:00
Jordan d72bc4b7df Updated interfacing with ng-table module. Will propagate changes to campaigns soon.
Updated footer copyright year
Cleaned up tables in templates
2014-02-10 01:15:36 -06:00
Jordan b471a886e3 Updated angular ui to support adding group
Updated POST /api/groups/ to successfully add group
Fixed CSRF in API issue
Moved PUT and DELETE to /api/groups/:id (TODO: Implement)
Changed SQL to use user_id instead of API key
It is now possible to add a new group! Will propagate logic to campaigns soon.
2014-02-09 19:34:47 -06:00
Jordan 79ba4fadb6 Improved usability/implementation of adding/editing groups and campaigns. 2014-02-08 15:16:36 -06:00
Jordan 6cbc47e80c Added ng-table support (for future pagination, sorting, etc.)
Created services for campaigns/groups
Changed modals to be binded to the data. Will improve on this soon!
Added trailing slash to api endpoints (I hope to be able to remove this later)
2014-02-07 19:40:16 -06:00
Jordan f1aade0bfa Quick bugfixes
Added dropdown to dashboard table
2014-02-06 21:36:00 -06:00
Jordan cb39888c54 Added buttons to appear onhover for the rows (to select Edit/View/Delete etc.) 2014-02-06 19:17:20 -06:00
Jordan 12d86c7e13 Moved Group insertion to db.PostGroup()
Stubbed db.DeleteGroup()
Added better logging to db (Logging to come soon for all other packages)
2014-02-06 19:16:29 -06:00
Jordan cfd4e23b2b Updated API (/api/groups) 2014-02-06 13:30:05 -06:00
Jordan 4b97a88238 Fixed issues with GET /api/groups
Group names must now be unique (there's a bug here, but it will be fixed soon!)
2014-02-06 11:14:51 -06:00
Jordan 40cd2ae837 Cleaned up some errors
Implemented using db.* helpers (ie GetUser)
Implemented ChangePassword (not reachable from UI currently)
Fixed angular issue in settings.html template
2014-02-06 10:49:53 -06:00
Jordan af7a8f4c4e Added easier support for Flashes
Moving DB access (as much as possible) into `db` package.
2014-02-05 10:57:53 -06:00
Jordan 0bb9dc186c Finished implementing first version of GET, POST /api/groups 2014-02-04 21:53:11 -06:00
Jordan fb6cdb5caf Implementing /api/groups functionality. POST is almost working :) 2014-02-04 21:08:09 -06:00
Jordan 50292da53f Implemented Registration
Created auth.GenerateSecureKey to handle generating API Keys
2014-02-04 18:39:01 -06:00
Jordan 359fa01c1c Cleaned up csrf exemptions
Cleaned up models
Added UNIQUE constraint on many-many tables
Added form parsing/ userid from API key lookup in middleware
2014-02-04 15:23:09 -06:00
Jordan 4c722afe8b Creating layout for group add/edit modal 2014-02-04 10:21:07 -06:00
Jordan 7045c7f3e2 Refined CSRF Protection Exempt Glob (/api/* to /api/*/*) to provide CSRF protection /api/reset
Added stub for /api/campaigns/:id/launch
2014-02-03 23:41:31 -06:00
Jordan e0e15221b1 Updated README
Added CSRF Protection to login, /api/reset functions
Added auto highlighting of API key when clicked
2014-02-03 17:21:56 -06:00
Jordan ca884fd384 Implemented Logout function 2014-02-02 16:55:26 -06:00
Jordan 43417d160f Cleaning up some broken links
Changed default admin password to 'gophish'
Fixed bug in POST /api/campaigns
Starting to implements groups and users functionality
2014-02-02 16:37:36 -06:00
Jordan e312e90570 Added ability to reset API token
Cleaned up session flash handling
2014-02-02 14:47:06 -06:00
Jordan 2cfe2b8f8f Cleaning up documentation
Added targets, groups, group_target tables
2014-02-01 16:35:16 -06:00
Jordan 3edcc11e61 Cleaning up router
/campaigns - depreciated
/api/doc - now /api/
2014-01-31 21:49:35 -06:00
Jordan c75e55154b Dates in dashboard template are working now.
Changed column spacing to make Name column wider
2014-01-31 20:56:21 -06:00
Jordan 87fbd41184 Changing int to int64
Starting to implement angularjs
Implemented /api/campaigns/:id GET
Changed template delims to {{% and %}}
2014-01-31 20:49:22 -06:00
Jordan c4c57639e2 Implemented POST /api/campaigns
Renamed "apikey" table to "api_key" for consistency
Bug fix in checkError()
2014-01-31 16:25:02 -06:00
Jordan 6802fe6800 Changed to indent JSON
Changed default username to admin (instead of jordan)
2014-01-30 23:11:06 -06:00
Jordan c60b9d584b - Working on implementing the API (started working on /api/campaigns)
- Implemented APIKey middleware
- Changed settings template to look a bit nicer and to, you know, work.
2014-01-30 22:46:25 -06:00
Jordan e9aa8d2c88 Updated settings template and route to show basic user info 2014-01-30 15:15:12 -06:00
Jordan c59415a133 Adding some models - Incorporated use of `gorp` package to allow ORM'ish functionality 2014-01-30 15:08:14 -06:00
Jordan e993e8c898 Updated dashboard and nav template to handle user context 2014-01-14 21:20:28 -06:00
Jordan 6944854005 Added support for --setup flag to reset database 2014-01-12 22:39:40 -06:00
Jordan c42ddf3dd7 Added createTableSQL script to better manage table creation
Added creation of Campaigns table
2014-01-12 21:46:51 -06:00
Jordan 4272d5a12b Created Campaigns struct 2014-01-12 21:36:26 -06:00
Jordan 4ad8c3c468 Implemented GetUserByAPIKey and changed GetUser to GetUserById 2014-01-12 20:00:52 -06:00
Jordan 2a88b259b3 Working on API layout 2014-01-12 20:00:20 -06:00
Jordan ef1bf55484 Updated README 2014-01-11 20:47:24 -06:00
Jordan cdb4181406 Renamed CheckLogin to Login
Changed encryption cookie to be 32 bytes (64 bytes not supported)
2014-01-11 00:10:52 -06:00
Jordan 2a62f62bc6 Cleaned API even more (everything is via HandlerFunc)
Sessions are now encrypted as well as signed.
2014-01-10 22:37:42 -06:00
Jordan 42d7c463df Moved Use() to controllers from middleware for cleaner usage (I'll consider moving it back if it doesn't logically make sense)
Renamed Base_Campaigns to Campaigns
2014-01-10 22:11:44 -06:00
Jordan 61ef18b3b4 Implemented auth.GetUser(id)
Impemented RequireLogin() middleware
Login is now working, just need to clean up the architecture a bit
2014-01-09 22:21:12 -06:00
Jordan bb627396ee Implemented Flashes (Model and functionality)
Working on login functionality
Changed the way templates are loaded and rendered
2014-01-09 21:21:54 -06:00
Jordan 7eb90b27ad Moved DB to root folder
Created db package to handle DB connection/queries
Removed Setup.go (now handled in db package)
Setup context in middleware
2014-01-09 17:18:49 -06:00
Jordan d4dbf30499 Changed Setup() to only return an error - I will need to find a way to handle the database connection either globally, or per package as needed. Not sure yet. 2014-01-09 01:08:32 -06:00