-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web(baby-flask, master-flask, loooong) - flasks: make path_traversal …
…accesible via a GET request, loooong: put the flag in the body of the redirect
- Loading branch information
1 parent
b5f6b76
commit 95e4194
Showing
8 changed files
with
42 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% block content %} | ||
{% extends "layout.html" %} {% block content %} | ||
<div class="container my-5"> | ||
<h1 class="text-center text-neon">Welcome to my Flask File Manager</h1> | ||
<h1 class="text-center text-neon">Welcome to my Flask File Manager</h1> | ||
|
||
<div class="card bg-dark mt-4"> | ||
<div class="card-header text-neon"> | ||
<h3>Have a look at my files</h3> | ||
</div> | ||
<div class="card-body"> | ||
<h4 class="text-neon">Click on a file to view it!</h4> | ||
<ul class="list-group"> | ||
{% for file in files %} | ||
<li class="list-group-item bg-dark border-light"> | ||
<form action="/get_file" method="post" class="d-inline"> | ||
<input type="hidden" name="filename" value="/app/files/{{ file }}"> | ||
<button type="submit" class="btn btn-link text-neon">{{ file }}</button> | ||
</form> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="card bg-dark mt-4"> | ||
<div class="card-header text-neon"> | ||
<h3>Have a look at my files</h3> | ||
</div> | ||
<div class="card-body"> | ||
<h4 class="text-neon">Click on a file to view it!</h4> | ||
<ul class="list-group"> | ||
{% for file in files %} | ||
<li class="list-group-item bg-dark border-light"> | ||
<a href="/get_file?filename=/app/files/{{ file }}" class="text-neon" | ||
>{{ file }}</a | ||
> | ||
<!-- <form action="/get_file" method="post" class="d-inline"> | ||
<input | ||
type="hidden" | ||
name="filename" | ||
value="/app/files/{{ file }}" | ||
/> | ||
<button type="submit" class="btn btn-link text-neon"> | ||
{{ file }} | ||
</button> | ||
</form> --> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{flag}} |