forked from Audi-1/sqli-labs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
732 additions
and
21 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,3 @@ | ||
<?php | ||
phpinfo(); | ||
?> |
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,73 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>ORDER BY-Error-Numeric</title> | ||
</head> | ||
|
||
<body bgcolor="#000000"> | ||
<div style=" margin-top:70px;color:#FFF; font-size:23px; text-align:center">Welcome <font color="#FF0000"> Dhakkan </font><br> | ||
<font size="3" color="#FFFF00"> | ||
|
||
<?php | ||
include("../sql-connections/sql-connect.php"); | ||
$id=$_GET['sort']; | ||
if(isset($id)) | ||
{ | ||
//logging the connection parameters to a file for analysis. | ||
$fp=fopen('result.txt','a'); | ||
fwrite($fp,'SORT:'.$id."\n"); | ||
fclose($fp); | ||
|
||
$sql = "SELECT * FROM users ORDER BY $id"; | ||
$result = mysql_query($sql); | ||
if ($result) | ||
{ | ||
?> | ||
<center> | ||
<font color= "#00FF00" size="4"> | ||
|
||
<table border=1'> | ||
<tr> | ||
<th> ID </th> | ||
<th> USERNAME </th> | ||
<th> PASSWORD </th> | ||
</tr> | ||
</font> | ||
</font> | ||
<?php | ||
while ($row = mysql_fetch_assoc($result)) | ||
{ | ||
echo '<font color= "#00FF11" size="3">'; | ||
echo "<tr>"; | ||
echo "<td>".$row['id']."</td>"; | ||
echo "<td>".$row['username']."</td>"; | ||
echo "<td>".$row['password']."</td>"; | ||
echo "</tr>"; | ||
echo "</font>"; | ||
} | ||
echo "</table>"; | ||
|
||
} | ||
else | ||
{ | ||
echo '<font color= "#FFFF00">'; | ||
print_r(mysql_error()); | ||
echo "</font>"; | ||
} | ||
} | ||
else | ||
{ | ||
echo "Please input parameter as SORT with numeric value<br><br><br><br>"; | ||
echo "<br><br><br>"; | ||
echo '<img src="../images/Less-46.jpg" /><br>'; | ||
echo "Lesson Concept and code Idea by <b>D4rk</b>"; | ||
} | ||
?> | ||
|
||
|
||
</font> </div></br></br></br> | ||
|
||
</center> | ||
</body> | ||
</html> |
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,73 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>ORDER BY Clause-Error-Single quote</title> | ||
</head> | ||
|
||
<body bgcolor="#000000"> | ||
<div style=" margin-top:70px;color:#FFF; font-size:23px; text-align:center">Welcome <font color="#FF0000"> Dhakkan </font><br> | ||
<font size="3" color="#FFFF00"> | ||
|
||
<?php | ||
include("../sql-connections/sql-connect.php"); | ||
$id=$_GET['sort']; | ||
if(isset($id)) | ||
{ | ||
//logging the connection parameters to a file for analysis. | ||
$fp=fopen('result.txt','a'); | ||
fwrite($fp,'SORT:'.$id."\n"); | ||
fclose($fp); | ||
|
||
$sql = "SELECT * FROM users ORDER BY '$id'"; | ||
$result = mysql_query($sql); | ||
if ($result) | ||
{ | ||
?> | ||
<center> | ||
<font color= "#00FF00" size="4"> | ||
|
||
<table border=1'> | ||
<tr> | ||
<th> ID </th> | ||
<th> USERNAME </th> | ||
<th> PASSWORD </th> | ||
</tr> | ||
</font> | ||
</font> | ||
<?php | ||
while ($row = mysql_fetch_assoc($result)) | ||
{ | ||
echo '<font color= "#00FF11" size="3">'; | ||
echo "<tr>"; | ||
echo "<td>".$row['id']."</td>"; | ||
echo "<td>".$row['username']."</td>"; | ||
echo "<td>".$row['password']."</td>"; | ||
echo "</tr>"; | ||
echo "</font>"; | ||
} | ||
echo "</table>"; | ||
|
||
} | ||
else | ||
{ | ||
echo '<font color= "#FFFF00">'; | ||
print_r(mysql_error()); | ||
echo "</font>"; | ||
} | ||
} | ||
else | ||
{ | ||
echo "Please input parameter as SORT with numeric value<br><br><br><br>"; | ||
echo "<br><br><br>"; | ||
echo '<img src="../images/Less-47.jpg" /><br>'; | ||
echo "Lesson Concept and code Idea by <b>D4rk</b>"; | ||
} | ||
?> | ||
|
||
|
||
</font> </div></br></br></br> | ||
|
||
</center> | ||
</body> | ||
</html> |
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,67 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>ORDER BY Clause Blind based</title> | ||
</head> | ||
|
||
<body bgcolor="#000000"> | ||
<div style=" margin-top:70px;color:#FFF; font-size:23px; text-align:center">Welcome <font color="#FF0000"> Dhakkan </font><br> | ||
<font size="3" color="#FFFF00"> | ||
|
||
<?php | ||
include("../sql-connections/sql-connect.php"); | ||
$id=$_GET['sort']; | ||
if(isset($id)) | ||
{ | ||
//logging the connection parameters to a file for analysis. | ||
$fp=fopen('result.txt','a'); | ||
fwrite($fp,'SORT:'.$id."\n"); | ||
fclose($fp); | ||
|
||
$sql = "SELECT * FROM users ORDER BY $id"; | ||
$result = mysql_query($sql); | ||
if ($result) | ||
{ | ||
?> | ||
<center> | ||
<font color= "#00FF00" size="4"> | ||
|
||
<table border=1'> | ||
<tr> | ||
<th> ID </th> | ||
<th> USERNAME </th> | ||
<th> PASSWORD </th> | ||
</tr> | ||
</font> | ||
</font> | ||
<?php | ||
while ($row = mysql_fetch_assoc($result)) | ||
{ | ||
echo '<font color= "#00FF11" size="3">'; | ||
echo "<tr>"; | ||
echo "<td>".$row['id']."</td>"; | ||
echo "<td>".$row['username']."</td>"; | ||
echo "<td>".$row['password']."</td>"; | ||
echo "</tr>"; | ||
echo "</font>"; | ||
} | ||
echo "</table>"; | ||
|
||
} | ||
} | ||
else | ||
{ | ||
echo "Please input parameter as SORT with numeric value<br><br><br><br>"; | ||
echo "<br><br><br>"; | ||
echo '<img src="../images/Less-47.jpg" /><br>'; | ||
echo "Lesson Concept and code Idea by <b>D4rk</b>"; | ||
} | ||
?> | ||
|
||
|
||
</font> </div></br></br></br> | ||
|
||
</center> | ||
</body> | ||
</html> |
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,67 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>ORDER BY Clause Blind based</title> | ||
</head> | ||
|
||
<body bgcolor="#000000"> | ||
<div style=" margin-top:70px;color:#FFF; font-size:23px; text-align:center">Welcome <font color="#FF0000"> Dhakkan </font><br> | ||
<font size="3" color="#FFFF00"> | ||
|
||
<?php | ||
include("../sql-connections/sql-connect.php"); | ||
$id=$_GET['sort']; | ||
if(isset($id)) | ||
{ | ||
//logging the connection parameters to a file for analysis. | ||
$fp=fopen('result.txt','a'); | ||
fwrite($fp,'SORT:'.$id."\n"); | ||
fclose($fp); | ||
|
||
$sql = "SELECT * FROM users ORDER BY '$id'"; | ||
$result = mysql_query($sql); | ||
if ($result) | ||
{ | ||
?> | ||
<center> | ||
<font color= "#00FF00" size="4"> | ||
|
||
<table border=1'> | ||
<tr> | ||
<th> ID </th> | ||
<th> USERNAME </th> | ||
<th> PASSWORD </th> | ||
</tr> | ||
</font> | ||
</font> | ||
<?php | ||
while ($row = mysql_fetch_assoc($result)) | ||
{ | ||
echo '<font color= "#00FF11" size="3">'; | ||
echo "<tr>"; | ||
echo "<td>".$row['id']."</td>"; | ||
echo "<td>".$row['username']."</td>"; | ||
echo "<td>".$row['password']."</td>"; | ||
echo "</tr>"; | ||
echo "</font>"; | ||
} | ||
echo "</table>"; | ||
|
||
} | ||
} | ||
else | ||
{ | ||
echo "Please input parameter as SORT with numeric value<br><br><br><br>"; | ||
echo "<br><br><br>"; | ||
echo '<img src="../images/Less-47.jpg" /><br>'; | ||
echo "Lesson Concept and code by <b>D4rk</b>"; | ||
} | ||
?> | ||
|
||
|
||
</font> </div></br></br></br> | ||
|
||
</center> | ||
</body> | ||
</html> |
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,87 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>ORDER BY Clause Blind based</title> | ||
</head> | ||
|
||
<body bgcolor="#000000"> | ||
<div style=" margin-top:70px;color:#FFF; font-size:23px; text-align:center">Welcome <font color="#FF0000"> Dhakkan </font><br> | ||
<font size="3" color="#FFFF00"> | ||
|
||
<?php | ||
include("../sql-connections/sqli-connect.php"); | ||
$id=$_GET['sort']; | ||
if(isset($id)) | ||
{ | ||
//logging the connection parameters to a file for analysis. | ||
$fp=fopen('result.txt','a'); | ||
fwrite($fp,'SORT:'.$id."\n"); | ||
fclose($fp); | ||
|
||
$sql="SELECT * FROM users ORDER BY $id"; | ||
/* execute multi query */ | ||
if (mysqli_multi_query($con1, $sql)) | ||
{ | ||
|
||
?> | ||
<center> | ||
<font color= "#00FF00" size="4"> | ||
|
||
<table border=1'> | ||
<tr> | ||
<th> ID </th> | ||
<th> USERNAME </th> | ||
<th> PASSWORD </th> | ||
</tr> | ||
</font> | ||
</font> | ||
<?php | ||
/* store first result set */ | ||
if ($result = mysqli_store_result($con1)) | ||
{ | ||
while($row = mysqli_fetch_row($result)) | ||
{ | ||
echo '<font color= "#00FF11" size="3">'; | ||
echo "<tr>"; | ||
echo "<td>"; | ||
printf("%s", $row[0]); | ||
echo "</td>"; | ||
echo "<td>"; | ||
printf("%s", $row[1]); | ||
echo "</td>"; | ||
echo "<td>"; | ||
printf("%s", $row[2]); | ||
echo "</td>"; | ||
echo "</tr>"; | ||
echo "</font>"; | ||
|
||
} | ||
|
||
} | ||
echo "</table>"; | ||
} | ||
|
||
else | ||
{ | ||
echo '<font color= "#FFFF00">'; | ||
print_r(mysqli_error($con1)); | ||
echo "</font>"; | ||
} | ||
} | ||
else | ||
{ | ||
echo "Please input parameter as SORT with numeric value<br><br><br><br>"; | ||
echo "<br><br><br>"; | ||
echo '<img src="../images/Less-50.jpg" /><br>'; | ||
} | ||
?> | ||
</font> | ||
</div> | ||
</br> | ||
</br> | ||
</br> | ||
|
||
</center> | ||
</body> | ||
</html> |
Oops, something went wrong.