Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to run resource script on startup #115

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added resource file argument, relative imports
  • Loading branch information
TheTechromancer committed Nov 20, 2018
commit ba1297fa7083e7d94274f3eae0b369384496ec3d
11 changes: 8 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"path/filepath"
"regexp"

"github.com/kgretzky/evilginx2/core"
"github.com/kgretzky/evilginx2/database"
"github.com/kgretzky/evilginx2/log"
"./core"
"./database"
"./log"
)

var phishlets_dir = flag.String("p", "", "Phishlets directory path")
var resource_file = flag.String("rc", "", "Resource script to run on startup")
var debug_log = flag.Bool("debug", false, "Enable debug output")
var developer_mode = flag.Bool("developer", false, "Enable developer mode (generates self-signed certificates for all hostnames)")

Expand Down Expand Up @@ -47,6 +48,10 @@ func main() {
log.Fatal("provided phishlets directory path does not exist: %s", *phishlets_dir)
return
}
if _, err := os.Stat(*resource_file); os.IsNotExist(err) {
log.Fatal("provided resource file does not exist: %s", *resource_file)
return
}
log.DebugEnable(*debug_log)
if *debug_log {
log.Info("debug output enabled")
Expand Down