From a04f6d031b45b50cb9f9b109e87c478f6b2c6f8d Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Sat, 26 May 2018 21:37:22 -0500 Subject: [PATCH] Cleaned up dashboard page when no campaigns have been launched --- gophish.go | 8 ++--- templates/dashboard.html | 64 +++++++++++++++++++++++++++------------- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/gophish.go b/gophish.go index d0aee6d9..2df7933a 100644 --- a/gophish.go +++ b/gophish.go @@ -99,11 +99,11 @@ func main() { if err != nil { log.Fatal(err) } - log.Infof("Starting admin server at https://%s\n", config.Conf.AdminConf.ListenURL) + log.Infof("Starting admin server at https://%s", config.Conf.AdminConf.ListenURL) log.Info(http.ListenAndServeTLS(config.Conf.AdminConf.ListenURL, config.Conf.AdminConf.CertPath, config.Conf.AdminConf.KeyPath, handlers.CombinedLoggingHandler(log.Writer(), adminHandler))) } else { - log.Infof("Starting admin server at http://%s\n", config.Conf.AdminConf.ListenURL) + log.Infof("Starting admin server at http://%s", config.Conf.AdminConf.ListenURL) log.Info(http.ListenAndServe(config.Conf.AdminConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, adminHandler))) } }() @@ -112,11 +112,11 @@ func main() { defer wg.Done() phishHandler := gziphandler.GzipHandler(controllers.CreatePhishingRouter()) if config.Conf.PhishConf.UseTLS { // use TLS for Phish web server if available - log.Infof("Starting phishing server at https://%s\n", config.Conf.PhishConf.ListenURL) + log.Infof("Starting phishing server at https://%s", config.Conf.PhishConf.ListenURL) log.Info(http.ListenAndServeTLS(config.Conf.PhishConf.ListenURL, config.Conf.PhishConf.CertPath, config.Conf.PhishConf.KeyPath, handlers.CombinedLoggingHandler(log.Writer(), phishHandler))) } else { - log.Infof("Starting phishing server at http://%s\n", config.Conf.PhishConf.ListenURL) + log.Infof("Starting phishing server at http://%s", config.Conf.PhishConf.ListenURL) log.Fatal(http.ListenAndServe(config.Conf.PhishConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, phishHandler))) } }() diff --git a/templates/dashboard.html b/templates/dashboard.html index e2ca577c..908e18c9 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -3,24 +3,35 @@
@@ -38,7 +49,7 @@ No campaigns created yet. Let's create one!
-
+   
@@ -64,13 +77,23 @@ Name Created Date - - - - - + + + + + + + + + + + + + + + Status - + @@ -79,7 +102,6 @@
-{{end}} -{{define "scripts"}} +{{end}} {{define "scripts"}} -{{end}} +{{end}} \ No newline at end of file