Skip to content

Commit

Permalink
add xss and redirect php code and t file
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 14, 2014
1 parent 0d2759d commit c8595f9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/redirect-1.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GET /redirect.php?page=http://www.baidu.com HTTP/1.1
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8,en;q=0.6
Host: example.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
7 changes: 7 additions & 0 deletions t/xss-1.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GET /xss.php?name=%3Cscript%3Ealert%281%29;%3C/script%3E HTTP/1.1
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8,en;q=0.6
Host: example.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
1 change: 1 addition & 0 deletions vulCode/redirect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php header("Location: ".$_GET['page']); ?>
1 change: 1 addition & 0 deletions vulCode/xss/xss.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php echo $_GET["name"]; ?>

0 comments on commit c8595f9

Please sign in to comment.