Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Projects/python-fb-example/requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
requests==2.32.0
pandas==2.2.3
jose==1.0.0
Flask==2.2.2
picklescan==0.0.24
21 changes: 9 additions & 12 deletions Projects/python-fb-example/src/app.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# src/app.py
import requests
import pandas as pd
from flask import Flask, request, render_template_string

def fetch_data(url):
response = requests.get(url)
return response.json()
app = Flask(__name__)

def main():
url = 'https://api.github.com/events'
data = fetch_data(url)
df = pd.DataFrame(data)
print(df.head())
# A simple route that renders user input without proper sanitization
@app.route('/greet', methods=['GET'])
def greet():
user_name = request.args.get('name', 'Guest')
# Rendering user input directly without escaping
return render_template_string(f"<h1>Hello, {user_name}!</h1>")

if __name__ == '__main__':
main()
app.run(debug=True)
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
test this out
let's update this
I have new check for PR

SqcyDpetv+pCsbNYWHDLE8yR5mJ13MI+4d8NOwtM
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

another update
3 changes: 3 additions & 0 deletions creds.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AKIAJXBOVX5Q2EULDUIA
SqcyDpetv+pCsbNYWHDLE8yR5mJ13MI+4d8NOwtM
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
Loading