Skip to content

Commit 6a88320

Browse files
authored
Change to keep the quotes consistent
1 parent 1199825 commit 6a88320

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
@@ -6,7 +6,7 @@
66

77
def payload2curl(p):
88
lines = re.compile("[\n\r]+").split(p.decode())
9-
start_line = re.search('^([A-Z]+) ([^ ]+) (HTTP\/[0-9\/]+)', lines[0])
9+
start_line = re.search("^([A-Z]+) ([^ ]+) (HTTP\/[0-9\/]+)", lines[0])
1010
method = start_line.group(1)
1111
url = start_line.group(2)
1212
version = start_line.group(3) # Never used
@@ -21,7 +21,7 @@ def payload2curl(p):
2121
host_name = host_header.group(1)
2222

2323
if host_name not in url:
24-
url = 'http://{}/{}'.format(host_name, url)
24+
url = "http://{}/{}".format(host_name, url)
2525
curl = "curl '{}' \\\n -X {} \\\n".format(url, method)
2626
curl += " \\\n".join(headers)
2727
return curl

0 commit comments

Comments
 (0)