Skip to content

Commit 1574733

Browse files
author
manuel.pascual
committed
added host Host an X-Host support
jullrich#14
1 parent eac51b7 commit 1574733

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pcap2curl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def payload2curl(p):
3232
for line in lines:
3333
if ":" in line:
3434
headers.append("-H '{}'".format(line))
35-
if "Host:" in line:
36-
host_header = re.search("^Host: (.*)", line)
35+
if re.match("^Host:", line, re.I):
36+
host_header = re.search("^Host: (.*)", line, re.I)
3737
host_name = host_header.group(1)
3838

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

0 commit comments

Comments
 (0)