static.html
13.6 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>VulnNotti</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="{% static 'vendor/freelancer_bootstrap/css/bootstrap.min.css' %}">
<!-- Custom fonts for this template -->
<link rel="stylesheet" href="{% static 'vendor/freelancer_font-awesome/css/font-awesome.min.css' %}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<!-- Plugin CSS -->
<link rel="stylesheet" href="{% static 'vendor/magnific-popup/magnific-popup.css' %}">
<!-- Custom styles for this template -->
<link rel="stylesheet" href="{% static 'css/freelancer.min.css' %}">
<!-- highlight.js -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.5.0/styles/vs2015.min.css">
<script src="//cdn.jsdelivr.net/highlight.js/9.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg bg-secondary fixed-top text-uppercase" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="/">Home</a>
<!-- <button class="navbar-toggler navbar-toggler-right text-uppercase bg-primary text-white rounded" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item mx-0 mx-lg-1">
<a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="/myapp">Chart</a>
</li>
<li class="nav-item mx-0 mx-lg-1">
<a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="/myapp/table">Table</a>
</li>
</ul>
</div> -->
</div>
</nav>
<!-- Header -->
<header class="bg-primary text-white text-center">
<div class="container">
<h3 class="text-uppercase mb-0">정적 분석 페이지 입니다.</h3>
<hr class="star-light">
</div>
</header>
<!-- Portfolio Grid Section -->
<!-- <section class="portfolio" id="portfolio"> -->
<div class="col-lg-4" style="float: left;">
<div class="container">
<canvas id="barChart" width="700" height="400"></canvas>
</div>
</div>
<div class="col-lg-4" style="float: right;">
<div class="container">
<canvas id="barChart2" width="700" height="400"></canvas>
</div>
</div>
<div class="col-lg-4" style="float: right;">
<div class="container">
<canvas id="pieChart" width="600" height="300"></canvas>
</div>
</div>
<p> </p>
<p> </p>
<div class="col-md-12 col-lg-12">
<div style="width: 100%; margin-left: 0px; margin-right: 0px;">
<!-- <form method="post" action=".">
<fieldset>{% csrf_token %}
<div>
{{ form.text.label_tag }} {{ form.text }}
</div>
<input type="submit" value="submit"/>
</fieldset>
</form> -->
<table class="table table-hover">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>이름</th>
<th>CVE</th>
<th>내용</th>
<th>이름</th>
</tr>
{% for object in object_list %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ object.vulnId }}</td>
<td>{{ object.lenBlock }}</td>
<td>{{ object.cve }}</td>
<td>{{ object.funcName }}</td>
<td>{{ object.numBlock }}</td>
<td id="modal_{{ forloop.counter }}">
<a class="portfolio-item d-block mx-auto" href="#portfolio-modal-{{ forloop.counter }}">
<button class="btn btn-primary">자세히보기</button></td>
</a>
</td>
</tr>
{% endfor %}
</table>
</div>
<div style="text-align: center;">
<button id="prev" class="btn btn-primary" style="background-color: #FF0066; border: #FF0066;"><< Prev</button>
<button id="next" class="btn btn-primary" style="margin-left: 200px; background-color: #FF0066; border: #FF0066;">Next >></button>
</div>
{% for object in object_list %}
<div class="portfolio-modal mfp-hide" id="portfolio-modal-{{ forloop.counter }}">
<div class="portfolio-modal-dialog bg-white">
<!-- header -->
<div class="modal-header">
<h2 class="text-secondary text-uppercase mb-0" style="text-align: center;">cve function name</h2>
</div>
<!-- left side -->
<div class="col-lg-6" style="float: left; border: 1px solid red; height: 1000px;">
<h2 class="text-secondary text-uppercase mb-0" style="text-align: center;">previous sourcecode</h2>
<hr class="star-dark mb-5">
<pre><code>
<!-- #include <iostream>;
using namespace std;
int main()
{
return 0;
} -->
</code></pre>
</div>
<!-- right side -->
<div class="col-lg-6" style="float: left; border: 1px solid red; height: 1000px;">
<h2 class="text-secondary text-uppercase mb-0" style="text-align: center;">modified sourcecode</h2>
<hr class="star-dark mb-5">
<pre><code>
{{ object.codeOriBefore }}
</code></pre>
</div>
<!-- footer -->
<div class="modal-footer" style="float: clear;">
<a class="btn btn-primary btn-lg rounded-pill portfolio-modal-dismiss" href="#">
<i class="fa fa-close"></i>
Close
</a>
</div>
</div>
</div>
{% endfor %}
</body>
<script src="{% static 'js/Chart.min.js' %}"></script>
<script src="{% static 'vendor/freelancer_jquery/jquery.min.js' %}"></script>
<script src="{% static 'vendor/freelancer_bootstrap/js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'vendor/jquery-easing/jquery.easing.min.js' %}"></script>
<script src="{% static 'vendor/magnific-popup/jquery.magnific-popup.min.js' %}"></script>
<script src="{% static 'js/jqBootstrapValidation.js' %}"></script>
<script src="{% static 'js/contact_me.js' %}"></script>
<script src="{% static 'js/freelancer.min.js' %}"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
<script type="text/javascript" src="{% static 'js/Chart.min.js' %}"></script>
<script type="text/javascript">
// $(document).on("click", "#next", function() {
// $.ajax({
// url: '{% url 'static' %}',
// data: {
// idx : $('#idx').val(),
// method : 'next',
// },
// dataType: "json",
// success: function(){
// object_list = []
// var tbody = document.getElementById('tbody');
// tbody.innerHTML = '';
// },
// error: function(e){
// alert("error");
// },
// });
// });
// barChart
var level0 = {{ level0 }};
var level1 = {{ level1 }};
var level2 = {{ level2 }};
var level3 = {{ level3 }};
var level4 = {{ level4 }};
var level5 = {{ level5 }};
var level6 = {{ level6 }};
var level7 = {{ level7 }};
var level8 = {{ level8 }};
var level9 = {{ level9 }};
var ctx = document.getElementById("barChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["0-1", "1-2", "2-3", "3-4", "4-5", "5-6", "6-7", "7-8", "8-9", "9-10"],
datasets: [{
label: 'level',
data: [level0, level1, level2, level3, level4, level5, level6, level7, level8, level9],
backgroundColor: [
'rgba(0, 196, 0, 0.4)',
'rgba(0, 224, 32, 0.4)',
'rgba(0, 240, 0, 0.4)',
'rgba(209, 255, 0, 0.4)',
'rgba(255, 224, 0, 0.4)',
'rgba(255, 204, 0, 0.4)',
'rgba(255, 188, 16, 0.4)',
'rgba(255, 156, 32, 0.4)',
'rgba(255, 128, 0, 0.4)',
'rgba(255, 0, 0, 0.4)',
],
borderColor: [
'rgba(0,196,0,1)',
'rgba(0, 224, 32, 1)',
'rgba(0, 240, 0, 1)',
'rgba(209, 255, 0, 1)',
'rgba(255, 224, 0, 1)',
'rgba(255, 204, 0, 1)',
'rgba(255, 188, 16, 1)',
'rgba(255, 156, 32, 1)',
'rgba(255, 128, 0, 1)',
'rgba(255, 0, 0, 1)',
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
var year2009 = {{ year2009 }};
var year2010 = {{ year2010 }};
var year2011 = {{ year2011 }};
var year2012 = {{ year2012 }};
var year2013 = {{ year2013 }};
var year2014 = {{ year2014 }};
var year2015 = {{ year2015 }};
var year2016 = {{ year2016 }};
var year2017 = {{ year2017 }};
var year2018 = {{ year2018 }};
var ctx = document.getElementById("barChart2").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018"],
datasets: [{
label: '',
data: [year2009, year2010, year2011, year2012, year2013, year2014, year2015, year2016, year2017, year2018],
backgroundColor: [
'rgba(50, 50, 50, 0.4)',
'rgba(0, 196, 0, 0.4)',
'rgba(255, 0, 0, 0.4)',
'rgba(255, 128, 0, 0.4)',
'rgba(100, 100, 0, 0.4)',
'rgba(0, 192, 192, 0.4)',
'rgba(96, 0, 255, 0.4)',
'rgba(200, 200, 0, 0.4)',
'rgba(0, 0, 255, 0.4)',
'rgba(255, 60, 60, 0.4)',
],
borderColor: [
'rgba(50, 50, 50, 1)',
'rgba(0, 196, 0, 1)',
'rgba(255, 0, 0, 1)',
'rgba(255, 128, 0, 1)',
'rgba(100, 100, 0, 1)',
'rgba(0, 192, 192, 1)',
'rgba(96, 0, 255, 1)',
'rgba(100, 200, 100, 1)',
'rgba(0, 0, 255, 1)',
'rgba(255, 60, 60, 1)',
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
// pieChart
// var red = {{ red }}
// var green = {{ green }}
// var blue = {{ blue }}
// var test = 10;
var Dos = {{ Dos }};
var Overflow = {{ Overflow }};
var XSS = {{ XSS }};
var SqlInjection = {{ SqlInjection }};
var CSRF = {{ CSRF }};
var FileInclusion = {{ FileInclusion }};
var MemoryCorruption = {{ MemoryCorruption }};
var GainPrivilege = {{ GainPrivilege }};
var ExecuteCode = {{ ExecuteCode }};
var Bypasssomething = {{ Bypasssomething }};
var ctx = document.getElementById("pieChart").getContext('2d');
// var ctx2 = document.getElementById("pieChart2").getContext('2d');
var data = {
datasets: [{
data: [Dos, Overflow, XSS, SqlInjection, CSRF, FileInclusion, MemoryCorruption, GainPrivilege, ExecuteCode, Bypasssomething],
backgroundColor: [
'rgba(50, 50, 50, 0.4)',
'rgba(0, 196, 0, 0.4)',
'rgba(255, 0, 0, 0.4)',
'rgba(255, 128, 0, 0.4)',
'rgba(100, 100, 0, 0.4)',
'rgba(0, 192, 192, 0.4)',
'rgba(96, 0, 255, 0.4)',
'rgba(200, 200, 0, 0.4)',
'rgba(0, 0, 255, 0.4)',
'rgba(255, 60, 60, 0.4)',
],
borderColor: [
'rgba(50, 50, 50, 1)',
'rgba(0, 196, 0, 1)',
'rgba(255, 0, 0, 1)',
'rgba(255, 128, 0, 1)',
'rgba(100, 100, 0, 1)',
'rgba(0, 192, 192, 1)',
'rgba(96, 0, 255, 1)',
'rgba(100, 200, 100, 1)',
'rgba(0, 0, 255, 1)',
'rgba(255, 60, 60, 1)',
],
borderWidth: 1
}],
// These labels appear in the legend and in the tooltips when hovering different arcs
labels: [
'DoS',
'Overflow',
'XSS',
'Sql Injection',
'CSRF',
'File Inclusion',
'Memory Corruption',
'Gain Privilege',
'Execute Code',
'Bypass something'
]
};
var options = {
title: {
display: true,
text: 'CVE',
position: 'top'
},
rotation: -0.7 * Math.PI
};
var myChart = new Chart(ctx, {
type: 'pie',
data: data,
options: options
});
// var myChart2 = new Chart(ctx2, {
// type: 'pie',
// data: data,
// options: options
// });
</script>
</html>