diff --git a/core/phishlet.go b/core/phishlet.go index df5876b5b..21ade5a24 100644 --- a/core/phishlet.go +++ b/core/phishlet.go @@ -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 } @@ -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() @@ -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 { @@ -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") diff --git a/main.go b/main.go index 74f6173cc..5dd4f96de 100644 --- a/main.go +++ b/main.go @@ -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) } } diff --git a/phishlets/amazon.yaml b/phishlets/amazon.yaml index 8e7ad80f1..91ba9d109 100644 --- a/phishlets/amazon.yaml +++ b/phishlets/amazon.yaml @@ -1,4 +1,3 @@ -name: 'amazon' author: '@customsync' min_ver: '2.2.0' proxy_hosts: diff --git a/phishlets/facebook.yaml b/phishlets/facebook.yaml index 345b06751..cc2deeb19 100644 --- a/phishlets/facebook.yaml +++ b/phishlets/facebook.yaml @@ -1,4 +1,3 @@ -name: 'facebook' author: '@mrgretzky' min_ver: '2.2.0' proxy_hosts: diff --git a/phishlets/linkedin.yaml b/phishlets/linkedin.yaml index 19ff924bf..85526f713 100644 --- a/phishlets/linkedin.yaml +++ b/phishlets/linkedin.yaml @@ -1,4 +1,3 @@ -name: 'linkedin' author: '@mrgretzky' min_ver: '2.2.0' proxy_hosts: diff --git a/phishlets/outlook.yaml b/phishlets/outlook.yaml index f01ced6fa..0e092adce 100644 --- a/phishlets/outlook.yaml +++ b/phishlets/outlook.yaml @@ -1,4 +1,3 @@ -name: 'outlook' author: '@mrgretzky' min_ver: '2.2.0' proxy_hosts: diff --git a/phishlets/reddit.yaml b/phishlets/reddit.yaml index fd42d9b3a..ff3196665 100644 --- a/phishlets/reddit.yaml +++ b/phishlets/reddit.yaml @@ -1,4 +1,3 @@ -name: 'reddit' author: '@customsync' min_ver: '2.2.0' proxy_hosts: diff --git a/phishlets/twitter.yaml b/phishlets/twitter.yaml index 1750b0c14..32c93475f 100644 --- a/phishlets/twitter.yaml +++ b/phishlets/twitter.yaml @@ -1,4 +1,3 @@ -name: 'twitter' author: '@white_fi' min_ver: '2.2.0' proxy_hosts: