Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pcap2curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def payload2curl(p):
for line in lines:
if ":" in line:
headers.append("-H '{}'".format(line))
if "Host:" in line:
host_header = re.search("^Host: (.*)", line)
if re.match("^Host:", line, re.I):
host_header = re.search("^Host: (.*)", line, re.I)
host_name = host_header.group(1)

proto_host = 'http://{}/'.format(host_name)
Expand Down