Skip to content

Commit

Permalink
webapp: fix replay templates
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Jul 6, 2024
1 parent e460b53 commit f6babfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions webapp/templates/http-replay.py.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Corresponding flow id: {{ data[0].flow_id }}
Service: {{ ns.service_name }}
"""

# Load environment variables
# Load variables
# EXTRA is an array of the flagids for current service and team
HOST = os.getenv("TARGET_IP")
EXTRA = json.loads(os.getenv("TARGET_EXTRA", "[]"))
Expand Down Expand Up @@ -50,7 +50,7 @@ r = s.{{ req.http_method | lower }}(
},
timeout=2,
)
if r.status_code != req.status:
if r.status_code != {{ req.status }}:
print(f"[!] Request returned wrong status code {r.status_code}, expected {{ req.status }}")
print(r.text)

Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/raw-replay-socket.py.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Corresponding flow id: {{ data.flow_id }}
Service: {{ ns.service_name }}
"""

# Load environment variables
# Load variables
# EXTRA is an array of the flagids for current service and team
HOST = os.getenv("TARGET_IP")
EXTRA = json.loads(os.getenv("TARGET_EXTRA", "[]"))
Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/raw-replay.py.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Service: {{ ns.service_name }}
# Set logging level
context.log_level = "DEBUG" # or INFO, WARNING, ERROR

# Load environment variables
# Load variables
# EXTRA is an array of the flagids for current service and team
HOST = os.getenv("TARGET_IP")
EXTRA = json.loads(os.getenv("TARGET_EXTRA", "[]"))
Expand Down

0 comments on commit f6babfb

Please sign in to comment.