-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathless-1.asp
executable file
·115 lines (101 loc) · 5.36 KB
/
less-1.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gbk">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MSSQL SQLi Labs</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 70px;
text-align: center;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a href="#" class="navbar-brand">MSSQL SQLi Labs</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="index.asp">Index</a></li>
<li><a href="install.asp">Install</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<a class="list-group-item" href="less-1.asp">Less-1</a>
<a class="list-group-item" href="less-2.asp">Less-2</a>
<a class="list-group-item" href="less-3.asp">Less-3</a>
<a class="list-group-item" href="less-4.asp">Less-4</a>
<a class="list-group-item" href="less-5.asp">Less-5</a>
<a class="list-group-item" href="less-6.asp">Less-6</a>
<a class="list-group-item" href="less-7.asp">Less-7</a>
<a class="list-group-item" href="less-8.asp">Less-8</a>
<a class="list-group-item" href="less-9.asp">Less-9</a>
<a class="list-group-item" href="less-10.asp">Less-10</a>
</div>
</div>
<div class="col-sm-8">
<div class="jumbotron">
<h1>Less-1</h1>
<p class="lead">Error based - String</p>
<p><a class="btn btn-lg btn-success" href="less-1.asp?id=1" role="button">id = 1</a></p>
</div>
<dir class="alert alert-info" role="alert">
<!--#include file="config.asp"-->
<%
On Error Resume Next
Dim id
Set id = Request.QueryString("id")
Dim cmd, cmd_str, sql_str
Set cmd=Server.CreateObject("ADODB.Command")
cmd.ActiveConnection=conn
sql_str = "select * from users where id='" & id & "'"
cmd.CommandText=sql_str
Dim rs
Set rs=cmd.Execute
If Err.Number <> 0 Then
Response.Write(Err.Description)
'Response.End()
ElseIf rs("id") > 0 Then 'same as rs.BOF = False And rs.EOF = False Then
Response.Write("Your Login name:" & rs("username") & "<br />")
Response.Write("Your Password:" & rs("password"))
End If
%>
</dir>
</div>
<div class="col-sm-2">
<div class="list-group">
<a class="list-group-item" href="less-11.asp">Less-11</a>
<a class="list-group-item" href="less-12.asp">Less-12</a>
<a class="list-group-item" href="less-13.asp">Less-13</a>
<a class="list-group-item" href="less-14.asp">Less-14</a>
<a class="list-group-item" href="less-15.asp">Less-15</a>
<a class="list-group-item" href="less-16.asp">Less-16</a>
<a class="list-group-item" href="less-17.asp">Less-17</a>
<a class="list-group-item" href="less-18.asp">Less-18</a>
<a class="list-group-item" href="less-19.asp">Less-19</a>
<a class="list-group-item" href="less-20.asp">Less-20</a>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>