Skip to content

Instantly share code, notes, and snippets.

@Swalloow
Created March 12, 2017 12:19
Show Gist options
  • Save Swalloow/6ddf641ae4cef63ac479c0865aecf23c to your computer and use it in GitHub Desktop.
Save Swalloow/6ddf641ae4cef63ac479c0865aecf23c to your computer and use it in GitHub Desktop.
XSS Python
@app.route('/hi/<user>')
def hi(user):
return "<h1>hello, %s!</h1>"%user
# 위와 같은 간단한 라우팅에서 아래와 같이 공격할 수 있습니다.
# GET /hi/alert("hacked!")
# <h1> hello, alert("hacked!") </h1>
# 이걸 본 유저는 javascript alert창이 나타난다
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment