forked from ron190/jsql-injection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add php5 et php7 to test-bed scripts - Add issue template to Github
- Loading branch information
Showing
50 changed files
with
494 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## What's the expected behavior? | ||
|
||
## And what's the actual behavior? | ||
|
||
## Any detailed information about the Issue? | ||
|
||
## Steps to reproduce the behavior | ||
|
||
1. ... | ||
2. ... | ||
|
||
## [Community] Any request for a new feature? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
web/test-bed/mysql/method/get.php → web/test-bed/mysql/php5/method/get.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?php | ||
# http://127.0.0.1/mysql/method/get.php?id=1 | ||
|
||
mysql_connect("127.0.0.1", "login", "password"); | ||
mysql_connect('127.0.0.1', 'login', 'password'); | ||
|
||
mysql_select_db("my_database"); | ||
mysql_select_db('my_database'); | ||
|
||
$result = mysql_query("SELECT col1, col2 FROM my_table where id={$_GET['id']}"); | ||
|
||
while ($row = mysql_fetch_array($result, MYSQL_NUM)) | ||
echo join(',',$row); | ||
echo join(',', $row); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
# http://127.0.0.1/mysql/preference/redirection/source.php?id=1 | ||
# Open Preferences and choose option 'Follow HTTP redirection' | ||
|
||
header("Location: destination.php?$_SERVER[QUERY_STRING]"); | ||
exit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
# Do not use | ||
# Only a test client | ||
|
||
$client = new SoapClient( | ||
"definition.wsdl", | ||
array( | ||
"trace" => 1, | ||
"exceptions" => 0 | ||
) | ||
); | ||
|
||
try { | ||
echo "\n"; | ||
print($client->getParameters("version")); | ||
echo "\n<br>"; | ||
print "<span style=width:1024px>\n"; | ||
print "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n<br>"; | ||
print "Response:\n".htmlspecialchars($client->__getLastResponse())."\n<br>"; | ||
print "</span><br><br>"; | ||
|
||
print($client->getParameters("version_comment")); | ||
echo "\n\n<br>"; | ||
|
||
print "<span style=width:1024px>\n"; | ||
print "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n<br>"; | ||
print "Response:\n".htmlspecialchars($client->__getLastResponse())."\n<br>"; | ||
print "</span>"; | ||
} catch (SoapFault $exception) { | ||
echo $exception; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# put this file in the root folder of web server, usually www/ | ||
|
||
RewriteEngine On | ||
|
||
RewriteRule ^mysql/special/in-url/(.*)/url-rewriting.php /mysql/special/in-url/url-rewriting.php | ||
|
||
# Call a URL like http://127.0.0.1/mysql/special/in-url/inject-sql-here/url-rewriting.php | ||
# Currently you need to define at least one QueryString parameter: http://127.0.0.1/mysql/special/in-url/1*/url-rewriting.php?fake-param=whatever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
# http://127.0.0.1/mysql/special/in-url/1*/url-rewriting.php?fake-param=whatever | ||
|
||
$url = explode('/', $_SERVER['REQUEST_URI']); | ||
|
||
$urldecode = urldecode($url[2]); | ||
|
||
mysql_connect('127.0.0.1', 'login', 'password'); | ||
|
||
mysql_select_db('my_database'); | ||
|
||
$result = mysql_query("SELECT col1, col2 FROM my_table where id=$urldecode"); | ||
|
||
while ($row = mysql_fetch_array($result, MYSQL_NUM)) | ||
echo join(',', $row); |
15 changes: 8 additions & 7 deletions
15
web/test-bed/mysql/strategy/get-all.php → web/test-bed/mysql/php5/strategy/get-all.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
<?php | ||
# http://127.0.0.1/mysql/strategy/get-all.php?id=1* | ||
|
||
mysql_connect("127.0.0.1", "login", "password"); | ||
mysql_connect('127.0.0.1', 'login', 'password'); | ||
|
||
mysql_select_db("my_database"); | ||
mysql_select_db('my_database'); | ||
|
||
$result = mysql_query("SELECT col1, col2 FROM my_table where id=$_GET[id]") # time | ||
or die("Could not connect: ". mysql_error()); # error | ||
or die(mysql_error()); # error | ||
|
||
echo rand(); | ||
?> A <?php | ||
|
||
# blind | ||
if (mysql_num_rows($result) != 0) | ||
echo "."; | ||
# blind | ||
echo '.'; | ||
|
||
?> B <?php | ||
|
||
while ($row = mysql_fetch_array($result, MYSQL_NUM)) | ||
# normal | ||
echo join(',',$row); | ||
echo join(',', $row); | ||
|
||
?> C <?php echo rand(); | ||
?> C <?php | ||
echo rand(); |
Oops, something went wrong.