forked from 0c34/govwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.idor1.html
87 lines (85 loc) · 3.75 KB
/
template.idor1.html
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
{{define "template.idor1"}} {{template "template.header" .}} {{template "template.sidebar" .}}
<!-- update modal -->
<div id="profile" class="modal fade" role="dialog">
<div class="modal-dialog modal-sm">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">My Profile:</h4>
</div>
<div class="modal-body">
<form id="formdata" class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2" for="name">Name:</label>
<div class="col-sm-10">
<input type="hidden" name="uid" id="uid" value="{{.uid}}">
<input type="text" class="form-control" name="name" id="name" value="{{.name}}">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="city">City:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="city" name="city" value="{{.city}}">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="number">Num:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="number" name="number" value="{{.number}}">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" id="update">Update</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-primary">
<div class="panel-heading">Insecure Direct Object References Vulnerability</div>
<div class="panel-body">
<div class="pnl">
<!-- <span class="subheader">SQL Injection Vulnerability</span> -->
<p>Protect the Cookie</p>
<p>Update Your Profile :</p>
<div class="well">
<button class="btn btn-small btn-primary" id="view">View</button>
</div>
<div id="alert" style="display: none"></div>
<div class="more-info">
<span>More Info :</span>
<a target="_blank" href="https://en.wikipedia.org/wiki/HTTP_cookie">https://en.wikipedia.org/wiki/HTTP_cookie</a>
<a target="_blank" href="http://www.hackingarticles.in/beginner-guide-insecure-direct-object-references/">http://www.hackingarticles.in/beginner-guide-insecure-direct-object-references/</a>
</div>
</div>
</div>
</div>
</div>
<script>
$("#view").on('click',function(){
$("#profile").modal("show");
});
$("#update").on('click', function(){
var data = $("#formdata").serialize()
var url = "{{.weburl}}idor1action"
$.post(url, data)
.done(function(res){
$("#profile").modal("hide");
if(res[0].status != 1){
$("#alert").addClass("alert alert-danger")
$("#alert").html(res[0].message)
$("#alert").show()
$("#alert").delay(2000).fadeOut();
}else{
$("#alert").addClass("alert alert-success")
$("#alert").html(res[0].message)
$("#alert").show()
$("#alert").delay(2000).fadeOut();
}
});
});
</script>
{{template "template.footer"}} {{ end }}