We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1199825 commit 6a88320Copy full SHA for 6a88320
pcap2curl.py
@@ -6,7 +6,7 @@
6
7
def payload2curl(p):
8
lines = re.compile("[\n\r]+").split(p.decode())
9
- start_line = re.search('^([A-Z]+) ([^ ]+) (HTTP\/[0-9\/]+)', lines[0])
+ start_line = re.search("^([A-Z]+) ([^ ]+) (HTTP\/[0-9\/]+)", lines[0])
10
method = start_line.group(1)
11
url = start_line.group(2)
12
version = start_line.group(3) # Never used
@@ -21,7 +21,7 @@ def payload2curl(p):
21
host_name = host_header.group(1)
22
23
if host_name not in url:
24
- url = 'http://{}/{}'.format(host_name, url)
+ url = "http://{}/{}".format(host_name, url)
25
curl = "curl '{}' \\\n -X {} \\\n".format(url, method)
26
curl += " \\\n".join(headers)
27
return curl
0 commit comments