Skip to content

Commit

Permalink
Adding web security 2/3 presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenekolo committed Mar 4, 2016
1 parent 02848e5 commit 0859d58
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Binary file added web-security1/[0xBU]Web_Security1.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions web-security1/refuel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print ("i am refueling")
14 changes: 14 additions & 0 deletions web-security1/robot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/python
from flask import Flask, request, json, session
from subprocess import check_output

app = Flask(__name__)

@app.route('/robot/<path:task>', methods=['GET'])
def robot_task(task):
print("python " + task + ".py")
r = check_output("python " + task + ".py", shell=True)
return r

app.run(host='127.0.0.1', port=5000, debug=True)

17 changes: 17 additions & 0 deletions web-security1/test_http.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/python
#******************************************************************************
# How to script HTTP requests, and receive their responses
# http://canyouhack.it/Content/Challenges/Web/Web2.php
#******************************************************************************
import requests

website = r"http://canyouhack.it/Content/Challenges/Web/Web2.php"
r = requests.get(website)
print r.headers
print r.status_code
print r.text

headers = {"isAdmin" : "1"}
r = requests.post(website, cookies=headers)
print r.status_code
print r.text

0 comments on commit 0859d58

Please sign in to comment.