Parcourir la source

avoid error when host_header is None

tags/v0.3.0
Jonathan Cobb il y a 5 ans
Parent
révision
a3dadfc42b
1 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. +6
    -5
      automation/roles/mitmproxy/files/dns_spoofing.py

+ 6
- 5
automation/roles/mitmproxy/files/dns_spoofing.py Voir le fichier

@@ -62,11 +62,12 @@ class Rerouter:

host_header = flow.request.host_header
bubble_log("dns_spoofing.request: host_header is "+repr(host_header))
m = parse_host_header.match(host_header)
if m:
host_header = m.group("host").strip("[]")
if m.group("port"):
port = int(m.group("port"))
if host_header:
m = parse_host_header.match(host_header)
if m:
host_header = m.group("host").strip("[]")
if m.group("port"):
port = int(m.group("port"))

# Determine if this request should be filtered
if sni or host_header:


Chargement…
Annuler
Enregistrer