├── README.md ├── codescan ├── admin.py ├── apps.py ├── forms.py ├── models.py ├── static │ ├── assets │ │ ├── css │ │ │ ├── admin.css │ │ │ ├── amazeui.datatables.min.css │ │ │ ├── amazeui.min.css │ │ │ ├── app.css │ │ │ ├── app.less │ │ │ ├── fullcalendar.min.css │ │ │ └── fullcalendar.print.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── i │ │ │ ├── app-icon72x72@2x.png │ │ │ ├── examples │ │ │ │ ├── admin-chrome.png │ │ │ │ ├── admin-firefox.png │ │ │ │ ├── admin-ie.png │ │ │ │ ├── admin-opera.png │ │ │ │ ├── admin-safari.png │ │ │ │ ├── adminPage.png │ │ │ │ ├── blogPage.png │ │ │ │ ├── landing.png │ │ │ │ ├── landingPage.png │ │ │ │ ├── loginPage.png │ │ │ │ └── sidebarPage.png │ │ │ ├── favicon.png │ │ │ └── startup-640x1096.png │ │ ├── img │ │ │ ├── a5.png │ │ │ ├── k.jpg │ │ │ ├── logo.png │ │ │ ├── logoa.png │ │ │ ├── logob.png │ │ │ ├── user01.png │ │ │ ├── user02.png │ │ │ ├── user03.png │ │ │ ├── user04.png │ │ │ ├── user05.png │ │ │ ├── user06.png │ │ │ └── user07.png │ │ └── js │ │ │ ├── amazeui.datatables.min.js │ │ │ ├── amazeui.min.js │ │ │ ├── app.js │ │ │ ├── dataTables.responsive.min.js │ │ │ ├── echarts.min.js │ │ │ ├── fullcalendar.min.js │ │ │ ├── jquery.min.js │ │ │ ├── moment.js │ │ │ └── theme.js │ ├── 白色.psd │ └── 黑色.psd ├── tasks.py ├── templates │ ├── base.html │ ├── chart.html │ ├── detail.html │ ├── form.html │ ├── index.html │ ├── login.html │ ├── result.html │ ├── sign-up.html │ ├── table-list.html │ └── tables.html ├── tests.py ├── urls.py └── views.py ├── db.sqlite3 ├── demo ├── cs.JPG ├── cs2.JPG ├── cs3.JPG └── cs4.JPG ├── manage.py └── mysite ├── __init__.py ├── __pycache__ ├── __init__.cpython-36.pyc ├── celery.cpython-36.pyc ├── settings.cpython-36.pyc ├── urls.cpython-36.pyc └── wsgi.cpython-36.pyc ├── celery.py ├── settings.py ├── urls.py └── wsgi.py /README.md: -------------------------------------------------------------------------------- 1 | # CodeScanner 2 | A code security platform based on fortify sca windows 3 | 4 | ## 功能 5 | 6 | 后端基于fortify sca的一款自动化代码审计管理平台 7 | 8 | 可以在CI流程中嵌入,可自动化拉取gitlab代码仓库或手动上传代码包进行代码审计 9 | 10 | 本系统包含基本功能,可以使用Celery轻易扩展其他功能 11 | 12 | 基于python3 + celery +redis + sqlite3开发,适用Windows 13 | 14 | ## 依赖 15 | 16 | python3 redis celery djcelery 17 | 18 | ## 使用 19 | 20 | ### 1 安装代码 21 | 22 |
23 |   git clone https://github.com/0FuzzingQ/CodeScanner.git
24 |   cd mysite
25 |   
26 | 27 | ### 2 同步数据库 28 | 29 |
30 |   python3 manage.py makemigrations
31 |   python3 manage.py migrate
32 |   
33 | 34 | ### 3 开启celery队列 + web 35 | 36 |
37 |   celery worker -A mysite -l debug -P eventlet
38 |   python manage.py runserver
39 |   
40 | 41 | ## demo 42 | 43 | ### 主页 44 | avatar 45 | 46 | ### 任务列表 47 | avatar 48 | 49 | ### 漏洞列表 50 | avatar 51 | 52 | ### 漏洞定位 53 | avatar 54 | -------------------------------------------------------------------------------- /codescan/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /codescan/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CodescanConfig(AppConfig): 5 | name = 'codescan' 6 | -------------------------------------------------------------------------------- /codescan/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | class AddTask(forms.Form): 4 | 5 | taskname = forms.CharField(label = 'taskname',required=True) 6 | 7 | 8 | -------------------------------------------------------------------------------- /codescan/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | class Task (models.Model): 6 | 7 | id = models.AutoField(primary_key=True,max_length=20) 8 | taskid = models.CharField(null=True,max_length=40,default='1') 9 | name = models.CharField(null=True,max_length=100) 10 | mathod = models.CharField(null=False,max_length=2,default='a') 11 | java = models.CharField(null=False,max_length=2,default='1') 12 | other = models.CharField(null=False,max_length=1024,default='nothing') 13 | filepath = models.CharField(null=False,max_length=100,default='no') 14 | datetime = models.CharField(null=False,max_length=100) 15 | 16 | class Meta: 17 | db_table = 'Task' 18 | ordering = ['id'] 19 | 20 | class Result (models.Model): 21 | 22 | id = models.AutoField(primary_key=True) 23 | taskid = models.CharField(null=False,max_length=64,default='1') 24 | issue = models.CharField(null=False,max_length=1024,default='1') 25 | desc = models.CharField(null=False,max_length=1024,default='1') 26 | title = models.CharField(null=False,max_length=64,default='1') 27 | level = models.CharField(null=False,max_length=2,default='1') #0,1,2,3 info,low,mid,high 28 | filepath = models.CharField(null=False,max_length=128,default='1') 29 | line = models.CharField(null=False,max_length=64,default='1') 30 | content = models.CharField(null=False,max_length=1024,default='1') 31 | 32 | class Meta: 33 | db_table = 'Result' 34 | ordering = ['id'] 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /codescan/static/assets/css/admin.css: -------------------------------------------------------------------------------- 1 | /** 2 | * admin.css 3 | */ 4 | 5 | 6 | /* 7 | fixed-layout 固定头部和边栏布局 8 | */ 9 | 10 | html, 11 | body { 12 | height: 100%; 13 | overflow: hidden; 14 | } 15 | 16 | ul { 17 | margin-top: 0; 18 | } 19 | 20 | .admin-icon-yellow { 21 | color: #ffbe40; 22 | } 23 | 24 | .admin-header { 25 | position: fixed; 26 | top: 0; 27 | left: 0; 28 | right: 0; 29 | z-index: 1500; 30 | font-size: 1.4rem; 31 | margin-bottom: 0; 32 | } 33 | 34 | .admin-header-list a:hover :after { 35 | content: none; 36 | } 37 | 38 | .admin-main { 39 | position: relative; 40 | height: 100%; 41 | padding-top: 51px; 42 | background: #f3f3f3; 43 | } 44 | 45 | .admin-menu { 46 | position: fixed; 47 | z-index: 10; 48 | bottom: 30px; 49 | right: 20px; 50 | } 51 | 52 | .admin-sidebar { 53 | width: 260px; 54 | min-height: 100%; 55 | float: left; 56 | border-right: 1px solid #cecece; 57 | } 58 | 59 | .admin-sidebar.am-active { 60 | z-index: 1600; 61 | } 62 | 63 | .admin-sidebar-list { 64 | margin-bottom: 0; 65 | } 66 | 67 | .admin-sidebar-list li a { 68 | color: #5c5c5c; 69 | padding-left: 24px; 70 | } 71 | 72 | .admin-sidebar-list li:first-child { 73 | border-top: none; 74 | } 75 | 76 | .admin-sidebar-sub { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | box-shadow: 0 16px 8px -15px #e2e2e2 inset; 80 | background: #ececec; 81 | padding-left: 24px; 82 | } 83 | 84 | .admin-sidebar-sub li:first-child { 85 | border-top: 1px solid #dedede; 86 | } 87 | 88 | .admin-sidebar-panel { 89 | margin: 10px; 90 | } 91 | 92 | .admin-content { 93 | display: -webkit-box; 94 | display: -webkit-flex; 95 | display: -ms-flexbox; 96 | display: flex; 97 | -webkit-box-orient: vertical; 98 | -webkit-box-direction: normal; 99 | -webkit-flex-direction: column; 100 | -ms-flex-direction: column; 101 | flex-direction: column; 102 | background: #fff; 103 | } 104 | 105 | .admin-content, 106 | .admin-sidebar { 107 | height: 100%; 108 | overflow-x: hidden; 109 | overflow-y: scroll; 110 | -webkit-overflow-scrolling: touch; 111 | } 112 | 113 | .admin-content-body { 114 | -webkit-box-flex: 1; 115 | -webkit-flex: 1 0 auto; 116 | -ms-flex: 1 0 auto; 117 | flex: 1 0 auto; 118 | } 119 | 120 | .admin-content-footer { 121 | font-size: 85%; 122 | color: #777; 123 | } 124 | 125 | .admin-content-list { 126 | border: 1px solid #e9ecf1; 127 | margin-top: 0; 128 | } 129 | 130 | .admin-content-list li { 131 | border: 1px solid #e9ecf1; 132 | border-width: 0 1px; 133 | margin-left: -1px; 134 | } 135 | 136 | .admin-content-list li:first-child { 137 | border-left: none; 138 | } 139 | 140 | .admin-content-list li:last-child { 141 | border-right: none; 142 | } 143 | 144 | .admin-content-table a { 145 | color: #535353; 146 | } 147 | .admin-content-file { 148 | margin-bottom: 0; 149 | color: #666; 150 | } 151 | 152 | .admin-content-file p { 153 | margin: 0 0 5px 0; 154 | font-size: 1.4rem; 155 | } 156 | 157 | .admin-content-file li { 158 | padding: 10px 0; 159 | } 160 | 161 | .admin-content-file li:first-child { 162 | border-top: none; 163 | } 164 | 165 | .admin-content-file li:last-child { 166 | border-bottom: none; 167 | } 168 | 169 | .admin-content-file li .am-progress { 170 | margin-bottom: 4px; 171 | } 172 | 173 | .admin-content-file li .am-progress-bar { 174 | line-height: 14px; 175 | } 176 | 177 | .admin-content-task { 178 | margin-bottom: 0; 179 | } 180 | 181 | .admin-content-task li { 182 | padding: 5px 0; 183 | border-color: #eee; 184 | } 185 | 186 | .admin-content-task li:first-child { 187 | border-top: none; 188 | } 189 | 190 | .admin-content-task li:last-child { 191 | border-bottom: none; 192 | } 193 | 194 | .admin-task-meta { 195 | font-size: 1.2rem; 196 | color: #999; 197 | } 198 | 199 | .admin-task-bd { 200 | font-size: 1.4rem; 201 | margin-bottom: 5px; 202 | } 203 | 204 | .admin-content-comment { 205 | margin-bottom: 0; 206 | } 207 | 208 | .admin-content-comment .am-comment-bd { 209 | font-size: 1.4rem; 210 | } 211 | 212 | .admin-content-pagination { 213 | margin-bottom: 0; 214 | } 215 | .admin-content-pagination li a { 216 | padding: 4px 8px; 217 | } 218 | 219 | @media only screen and (min-width: 641px) { 220 | .admin-sidebar { 221 | display: block; 222 | position: static; 223 | background: none; 224 | } 225 | 226 | .admin-offcanvas-bar { 227 | position: static; 228 | width: auto; 229 | background: none; 230 | -webkit-transform: translate3d(0, 0, 0); 231 | -ms-transform: translate3d(0, 0, 0); 232 | transform: translate3d(0, 0, 0); 233 | overflow-y: visible; 234 | min-height: 100%; 235 | } 236 | .admin-offcanvas-bar:after { 237 | content: none; 238 | } 239 | } 240 | 241 | @media only screen and (max-width: 640px) { 242 | .admin-sidebar { 243 | width: inherit; 244 | } 245 | 246 | .admin-offcanvas-bar { 247 | background: #f3f3f3; 248 | } 249 | 250 | .admin-offcanvas-bar:after { 251 | background: #BABABA; 252 | } 253 | 254 | .admin-sidebar-list a:hover, .admin-sidebar-list a:active{ 255 | -webkit-transition: background-color .3s ease; 256 | -moz-transition: background-color .3s ease; 257 | -ms-transition: background-color .3s ease; 258 | -o-transition: background-color .3s ease; 259 | transition: background-color .3s ease; 260 | background: #E4E4E4; 261 | } 262 | 263 | .admin-content-list li { 264 | padding: 10px; 265 | border-width: 1px 0; 266 | margin-top: -1px; 267 | } 268 | 269 | .admin-content-list li:first-child { 270 | border-top: none; 271 | } 272 | 273 | .admin-content-list li:last-child { 274 | border-bottom: none; 275 | } 276 | 277 | .admin-form-text { 278 | text-align: left !important; 279 | } 280 | 281 | } 282 | 283 | /* 284 | * user.html css 285 | */ 286 | .user-info { 287 | margin-bottom: 15px; 288 | } 289 | 290 | .user-info .am-progress { 291 | margin-bottom: 4px; 292 | } 293 | 294 | .user-info p { 295 | margin: 5px; 296 | } 297 | 298 | .user-info-order { 299 | font-size: 1.4rem; 300 | } 301 | 302 | /* 303 | * errorLog.html css 304 | */ 305 | 306 | .error-log .am-pre-scrollable { 307 | max-height: 40rem; 308 | } 309 | 310 | /* 311 | * table.html css 312 | */ 313 | 314 | .table-main { 315 | font-size: 1.4rem; 316 | padding: .5rem; 317 | } 318 | 319 | .table-main button { 320 | background: #fff; 321 | } 322 | 323 | .table-check { 324 | width: 30px; 325 | } 326 | 327 | .table-id { 328 | width: 50px; 329 | } 330 | 331 | @media only screen and (max-width: 640px) { 332 | .table-select { 333 | margin-top: 10px; 334 | margin-left: 5px; 335 | } 336 | } 337 | 338 | /* 339 | gallery.html css 340 | */ 341 | 342 | .gallery-list li { 343 | padding: 10px; 344 | } 345 | 346 | .gallery-list a { 347 | color: #666; 348 | } 349 | 350 | .gallery-list a:hover { 351 | color: #3bb4f2; 352 | } 353 | 354 | .gallery-title { 355 | margin-top: 6px; 356 | font-size: 1.4rem; 357 | } 358 | 359 | .gallery-desc { 360 | font-size: 1.2rem; 361 | margin-top: 4px; 362 | } 363 | 364 | /* 365 | 404.html css 366 | */ 367 | 368 | .page-404 { 369 | background: #fff; 370 | border: none; 371 | width: 200px; 372 | margin: 0 auto; 373 | } 374 | -------------------------------------------------------------------------------- /codescan/static/assets/css/amazeui.datatables.min.css: -------------------------------------------------------------------------------- 1 | .am-datatable-hd{margin-bottom:10px}.am-datatable-hd label{font-weight:400}.am-datatable-filter{text-align:right}.am-datatable-filter input{margin-left:.5em}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after{position:absolute;top:50%;margin-top:-12px;right:8px;display:block;font-weight:400}table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after{position:absolute;top:50%;margin-top:-12px;right:8px;display:block;opacity:.5;font-weight:400}table.dataTable thead .sorting:after{opacity:.2;content:"\f0dc"}table.dataTable thead .sorting_asc:after{content:"\f15d"}table.dataTable thead .sorting_desc:after{content:"\f15e"}div.DTFC_LeftBodyWrapper table.dataTable thead .sorting:after,div.DTFC_LeftBodyWrapper table.dataTable thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table.dataTable thead .sorting_desc:after,div.DTFC_RightBodyWrapper table.dataTable thead .sorting:after,div.DTFC_RightBodyWrapper table.dataTable thead .sorting_asc:after,div.DTFC_RightBodyWrapper table.dataTable thead .sorting_desc:after,div.dataTables_scrollBody table.dataTable thead .sorting:after,div.dataTables_scrollBody table.dataTable thead .sorting_asc:after,div.dataTables_scrollBody table.dataTable thead .sorting_desc:after{display:none}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}table.dataTable thead>tr>th{padding-right:30px}table.dataTable th:active{outline:none}table.dataTable.table-condensed thead>tr>th{padding-right:20px}table.dataTable.table-condensed thead .sorting:after,table.dataTable.table-condensed thead .sorting_asc:after,table.dataTable.table-condensed thead .sorting_desc:after{top:6px;right:6px}div.dataTables_scrollHead table{margin-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,div.dataTables_scrollHead table thead tr:last-child td:first-child,div.dataTables_scrollHead table thead tr:last-child th:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.dataTables_scrollBody table{border-top:none;margin-top:0!important;margin-bottom:0!important}div.DTFC_LeftBodyWrapper tbody tr:first-child td,div.DTFC_LeftBodyWrapper tbody tr:first-child th,div.DTFC_RightBodyWrapper tbody tr:first-child td,div.DTFC_RightBodyWrapper tbody tr:first-child th,div.dataTables_scrollBody tbody tr:first-child td,div.dataTables_scrollBody tbody tr:first-child th{border-top:none}div.dataTables_scrollFoot table{margin-top:0!important;border-top:none}table.table-bordered.dataTable{border-collapse:separate!important}table.table-bordered thead td,table.table-bordered thead th{border-left-width:0;border-top-width:0}table.table-bordered tbody td,table.table-bordered tbody th,table.table-bordered tfoot td,table.table-bordered tfoot th{border-left-width:0;border-bottom-width:0}table.table-bordered td:last-child,table.table-bordered th:last-child{border-right-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}.table.dataTable tbody tr.active td,.table.dataTable tbody tr.active th{background-color:#08c;color:#fff}.table.dataTable tbody tr.active:hover td,.table.dataTable tbody tr.active:hover th{background-color:#0075b0!important}.table.dataTable tbody tr.active td>a,.table.dataTable tbody tr.active th>a{color:#fff}.table-striped.dataTable tbody tr.active:nth-child(odd) td,.table-striped.dataTable tbody tr.active:nth-child(odd) th{background-color:#017ebc}table.DTTT_selectable tbody tr{cursor:pointer}div.DTTT .btn:hover{text-decoration:none!important}ul.DTTT_dropdown.dropdown-menu{z-index:2003}ul.DTTT_dropdown.dropdown-menu a{color:#333!important}ul.DTTT_dropdown.dropdown-menu li{position:relative}ul.DTTT_dropdown.dropdown-menu li:hover a{background-color:#08c;color:#fff!important}div.DTTT_collection_background{z-index:2002}div.DTTT_print_info,div.dataTables_processing{top:50%;left:50%;text-align:center;background-color:#fff}div.DTTT_print_info{color:#333;padding:10px 30px;opacity:.95;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.5);box-shadow:0 3px 7px rgba(0,0,0,.5);position:fixed;width:400px;height:150px;margin-left:-200px;margin-top:-75px}div.DTTT_print_info h6{font-weight:400;font-size:28px;line-height:28px;margin:1em}div.DTTT_print_info p{font-size:14px;line-height:20px}div.dataTables_processing{position:absolute;width:100%;height:60px;margin-left:-50%;margin-top:-25px;padding-top:20px;padding-bottom:20px;font-size:1.2em;background:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0%,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),to(rgba(255,255,255,0)));background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}div.DTFC_LeftHeadWrapper table{background-color:#fff}div.DTFC_LeftFootWrapper table{background-color:#fff;margin-bottom:0}div.DTFC_RightHeadWrapper table{background-color:#fff}div.DTFC_RightFootWrapper table,table.DTFC_Cloned tr.even{background-color:#fff;margin-bottom:0}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{border-bottom:none!important;margin-bottom:0!important;border-top-right-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{border-top:none;margin:0!important}div.DTFC_LeftFootWrapper table,div.DTFC_RightFootWrapper table{border-top:none;margin-top:0!important}div.FixedHeader_Cloned table{margin:0!important}.am-datatable-pager{margin-top:0;margin-bottom:0}.am-datatable-info{padding-top:6px;color:#555;font-size:1.4rem}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:8px;left:4px;height:16px;width:16px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;-webkit-box-shadow:0 0 3px #444;box-shadow:0 0 3px #444;-webkit-box-sizing:content-box;box-sizing:content-box;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child.dataTables_empty:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child.dataTables_empty:before{display:none}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:12px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;-webkit-box-shadow:0 0 3px #666;box-shadow:0 0 3px #666;-webkit-box-sizing:content-box;box-sizing:content-box;content:'+';background-color:#5eb95e}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#dd514c}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:0 0!important}table.dataTable>tbody>tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:700} -------------------------------------------------------------------------------- /codescan/static/assets/css/fullcalendar.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FullCalendar v0.0.0 Stylesheet 3 | * Docs & License: http://fullcalendar.io/ 4 | * (c) 2016 Adam Shaw 5 | */.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed .fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{height:1em;line-height:1em;overflow:hidden;font-family:"Courier New",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:"\02039";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:"\0203A";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:"\000AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\000BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\25C4";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:"\25BA";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:"\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\000D7";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar{margin-bottom:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\000A0-\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee} -------------------------------------------------------------------------------- /codescan/static/assets/css/fullcalendar.print.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FullCalendar v0.0.0 Print Stylesheet 3 | * Docs & License: http://fullcalendar.io/ 4 | * (c) 2016 Adam Shaw 5 | */ 6 | 7 | /* 8 | * Include this stylesheet on your page to get a more printer-friendly calendar. 9 | * When including this stylesheet, use the media='print' attribute of the tag. 10 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 11 | */ 12 | 13 | .fc { 14 | max-width: 100% !important; 15 | } 16 | 17 | 18 | /* Global Event Restyling 19 | --------------------------------------------------------------------------------------------------*/ 20 | 21 | .fc-event { 22 | background: #fff !important; 23 | color: #000 !important; 24 | page-break-inside: avoid; 25 | } 26 | 27 | .fc-event .fc-resizer { 28 | display: none; 29 | } 30 | 31 | 32 | /* Table & Day-Row Restyling 33 | --------------------------------------------------------------------------------------------------*/ 34 | 35 | .fc th, 36 | .fc td, 37 | .fc hr, 38 | .fc thead, 39 | .fc tbody, 40 | .fc-row { 41 | border-color: #ccc !important; 42 | background: #fff !important; 43 | } 44 | 45 | /* kill the overlaid, absolutely-positioned components */ 46 | /* common... */ 47 | .fc-bg, 48 | .fc-bgevent-skeleton, 49 | .fc-highlight-skeleton, 50 | .fc-helper-skeleton, 51 | /* for timegrid. within cells within table skeletons... */ 52 | .fc-bgevent-container, 53 | .fc-business-container, 54 | .fc-highlight-container, 55 | .fc-helper-container { 56 | display: none; 57 | } 58 | 59 | /* don't force a min-height on rows (for DayGrid) */ 60 | .fc tbody .fc-row { 61 | height: auto !important; /* undo height that JS set in distributeHeight */ 62 | min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */ 63 | } 64 | 65 | .fc tbody .fc-row .fc-content-skeleton { 66 | position: static; /* undo .fc-rigid */ 67 | padding-bottom: 0 !important; /* use a more border-friendly method for this... */ 68 | } 69 | 70 | .fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */ 71 | padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */ 72 | } 73 | 74 | .fc tbody .fc-row .fc-content-skeleton table { 75 | /* provides a min-height for the row, but only effective for IE, which exaggerates this value, 76 | making it look more like 3em. for other browers, it will already be this tall */ 77 | height: 1em; 78 | } 79 | 80 | 81 | /* Undo month-view event limiting. Display all events and hide the "more" links 82 | --------------------------------------------------------------------------------------------------*/ 83 | 84 | .fc-more-cell, 85 | .fc-more { 86 | display: none !important; 87 | } 88 | 89 | .fc tr.fc-limited { 90 | display: table-row !important; 91 | } 92 | 93 | .fc td.fc-limited { 94 | display: table-cell !important; 95 | } 96 | 97 | .fc-popover { 98 | display: none; /* never display the "more.." popover in print mode */ 99 | } 100 | 101 | 102 | /* TimeGrid Restyling 103 | --------------------------------------------------------------------------------------------------*/ 104 | 105 | /* undo the min-height 100% trick used to fill the container's height */ 106 | .fc-time-grid { 107 | min-height: 0 !important; 108 | } 109 | 110 | /* don't display the side axis at all ("all-day" and time cells) */ 111 | .fc-agenda-view .fc-axis { 112 | display: none; 113 | } 114 | 115 | /* don't display the horizontal lines */ 116 | .fc-slats, 117 | .fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */ 118 | display: none !important; /* important overrides inline declaration */ 119 | } 120 | 121 | /* let the container that holds the events be naturally positioned and create real height */ 122 | .fc-time-grid .fc-content-skeleton { 123 | position: static; 124 | } 125 | 126 | /* in case there are no events, we still want some height */ 127 | .fc-time-grid .fc-content-skeleton table { 128 | height: 4em; 129 | } 130 | 131 | /* kill the horizontal spacing made by the event container. event margins will be done below */ 132 | .fc-time-grid .fc-event-container { 133 | margin: 0 !important; 134 | } 135 | 136 | 137 | /* TimeGrid *Event* Restyling 138 | --------------------------------------------------------------------------------------------------*/ 139 | 140 | /* naturally position events, vertically stacking them */ 141 | .fc-time-grid .fc-event { 142 | position: static !important; 143 | margin: 3px 2px !important; 144 | } 145 | 146 | /* for events that continue to a future day, give the bottom border back */ 147 | .fc-time-grid .fc-event.fc-not-end { 148 | border-bottom-width: 1px !important; 149 | } 150 | 151 | /* indicate the event continues via "..." text */ 152 | .fc-time-grid .fc-event.fc-not-end:after { 153 | content: "..."; 154 | } 155 | 156 | /* for events that are continuations from previous days, give the top border back */ 157 | .fc-time-grid .fc-event.fc-not-start { 158 | border-top-width: 1px !important; 159 | } 160 | 161 | /* indicate the event is a continuation via "..." text */ 162 | .fc-time-grid .fc-event.fc-not-start:before { 163 | content: "..."; 164 | } 165 | 166 | /* time */ 167 | 168 | /* undo a previous declaration and let the time text span to a second line */ 169 | .fc-time-grid .fc-event .fc-time { 170 | white-space: normal !important; 171 | } 172 | 173 | /* hide the the time that is normally displayed... */ 174 | .fc-time-grid .fc-event .fc-time span { 175 | display: none; 176 | } 177 | 178 | /* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */ 179 | .fc-time-grid .fc-event .fc-time:after { 180 | content: attr(data-full); 181 | } 182 | 183 | 184 | /* Vertical Scroller & Containers 185 | --------------------------------------------------------------------------------------------------*/ 186 | 187 | /* kill the scrollbars and allow natural height */ 188 | .fc-scroller, 189 | .fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */ 190 | .fc-time-grid-container { /* */ 191 | overflow: visible !important; 192 | height: auto !important; 193 | } 194 | 195 | /* kill the horizontal border/padding used to compensate for scrollbars */ 196 | .fc-row { 197 | border: 0 !important; 198 | margin: 0 !important; 199 | } 200 | 201 | 202 | /* Button Controls 203 | --------------------------------------------------------------------------------------------------*/ 204 | 205 | .fc-button-group, 206 | .fc button { 207 | display: none; /* don't display any button-related controls */ 208 | } 209 | -------------------------------------------------------------------------------- /codescan/static/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /codescan/static/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /codescan/static/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /codescan/static/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /codescan/static/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /codescan/static/assets/i/app-icon72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/app-icon72x72@2x.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/admin-chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/admin-chrome.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/admin-firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/admin-firefox.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/admin-ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/admin-ie.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/admin-opera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/admin-opera.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/admin-safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/admin-safari.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/adminPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/adminPage.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/blogPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/blogPage.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/landing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/landing.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/landingPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/landingPage.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/loginPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/loginPage.png -------------------------------------------------------------------------------- /codescan/static/assets/i/examples/sidebarPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/examples/sidebarPage.png -------------------------------------------------------------------------------- /codescan/static/assets/i/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/favicon.png -------------------------------------------------------------------------------- /codescan/static/assets/i/startup-640x1096.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/i/startup-640x1096.png -------------------------------------------------------------------------------- /codescan/static/assets/img/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/a5.png -------------------------------------------------------------------------------- /codescan/static/assets/img/k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/k.jpg -------------------------------------------------------------------------------- /codescan/static/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/logo.png -------------------------------------------------------------------------------- /codescan/static/assets/img/logoa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/logoa.png -------------------------------------------------------------------------------- /codescan/static/assets/img/logob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/logob.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user01.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user02.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user03.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user04.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user05.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user06.png -------------------------------------------------------------------------------- /codescan/static/assets/img/user07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/assets/img/user07.png -------------------------------------------------------------------------------- /codescan/static/assets/js/app.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | // 读取body data-type 判断是哪个页面然后执行相应页面方法,方法在下面。 3 | var dataType = $('body').attr('data-type'); 4 | console.log(dataType); 5 | for (key in pageData) { 6 | if (key == dataType) { 7 | pageData[key](); 8 | } 9 | } 10 | // // 判断用户是否已有自己选择的模板风格 11 | // if(storageLoad('SelcetColor')){ 12 | // $('body').attr('class',storageLoad('SelcetColor').Color) 13 | // }else{ 14 | // storageSave(saveSelectColor); 15 | // $('body').attr('class','theme-black') 16 | // } 17 | 18 | autoLeftNav(); 19 | $(window).resize(function() { 20 | autoLeftNav(); 21 | console.log($(window).width()) 22 | }); 23 | 24 | // if(storageLoad('SelcetColor')){ 25 | 26 | // }else{ 27 | // storageSave(saveSelectColor); 28 | // } 29 | }) 30 | 31 | 32 | // 页面数据 33 | var pageData = { 34 | // =============================================== 35 | // 首页 36 | // =============================================== 37 | 'index': function indexData() { 38 | $('#example-r').DataTable({ 39 | 40 | bInfo: false, //页脚信息 41 | dom: 'ti' 42 | }); 43 | 44 | 45 | // ========================== 46 | // 百度图表A http://echarts.baidu.com/ 47 | // ========================== 48 | 49 | var echartsA = echarts.init(document.getElementById('tpl-echarts')); 50 | option = { 51 | tooltip: { 52 | trigger: 'axis' 53 | }, 54 | grid: { 55 | top: '3%', 56 | left: '3%', 57 | right: '4%', 58 | bottom: '3%', 59 | containLabel: true 60 | }, 61 | xAxis: [{ 62 | type: 'category', 63 | boundaryGap: false, 64 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] 65 | }], 66 | yAxis: [{ 67 | type: 'value' 68 | }], 69 | textStyle: { 70 | color: '#838FA1' 71 | }, 72 | series: [{ 73 | name: '邮件营销', 74 | type: 'line', 75 | stack: '总量', 76 | areaStyle: { normal: {} }, 77 | data: [120, 132, 101, 134, 90], 78 | itemStyle: { 79 | normal: { 80 | color: '#1cabdb', 81 | borderColor: '#1cabdb', 82 | borderWidth: '2', 83 | borderType: 'solid', 84 | opacity: '1' 85 | }, 86 | emphasis: { 87 | 88 | } 89 | } 90 | }] 91 | }; 92 | 93 | echartsA.setOption(option); 94 | }, 95 | // =============================================== 96 | // 图表页 97 | // =============================================== 98 | 'chart': function chartData() { 99 | // ========================== 100 | // 百度图表A http://echarts.baidu.com/ 101 | // ========================== 102 | 103 | var echartsC = echarts.init(document.getElementById('tpl-echarts-C')); 104 | 105 | 106 | optionC = { 107 | tooltip: { 108 | trigger: 'axis' 109 | }, 110 | 111 | legend: { 112 | data: ['蒸发量', '降水量', '平均温度'] 113 | }, 114 | xAxis: [{ 115 | type: 'category', 116 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] 117 | }], 118 | yAxis: [{ 119 | type: 'value', 120 | name: '水量', 121 | min: 0, 122 | max: 250, 123 | interval: 50, 124 | axisLabel: { 125 | formatter: '{value} ml' 126 | } 127 | }, 128 | { 129 | type: 'value', 130 | name: '温度', 131 | min: 0, 132 | max: 25, 133 | interval: 5, 134 | axisLabel: { 135 | formatter: '{value} °C' 136 | } 137 | } 138 | ], 139 | series: [{ 140 | name: '蒸发量', 141 | type: 'bar', 142 | data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3] 143 | }, 144 | { 145 | name: '降水量', 146 | type: 'bar', 147 | data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3] 148 | }, 149 | { 150 | name: '平均温度', 151 | type: 'line', 152 | yAxisIndex: 1, 153 | data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] 154 | } 155 | ] 156 | }; 157 | 158 | echartsC.setOption(optionC); 159 | 160 | var echartsB = echarts.init(document.getElementById('tpl-echarts-B')); 161 | optionB = { 162 | tooltip: { 163 | trigger: 'axis' 164 | }, 165 | legend: { 166 | x: 'center', 167 | data: ['某软件', '某主食手机', '某水果手机', '降水量', '蒸发量'] 168 | }, 169 | radar: [{ 170 | indicator: [ 171 | { text: '品牌', max: 100 }, 172 | { text: '内容', max: 100 }, 173 | { text: '可用性', max: 100 }, 174 | { text: '功能', max: 100 } 175 | ], 176 | center: ['25%', '40%'], 177 | radius: 80 178 | }, 179 | { 180 | indicator: [ 181 | { text: '外观', max: 100 }, 182 | { text: '拍照', max: 100 }, 183 | { text: '系统', max: 100 }, 184 | { text: '性能', max: 100 }, 185 | { text: '屏幕', max: 100 } 186 | ], 187 | radius: 80, 188 | center: ['50%', '60%'], 189 | }, 190 | { 191 | indicator: (function() { 192 | var res = []; 193 | for (var i = 1; i <= 12; i++) { 194 | res.push({ text: i + '月', max: 100 }); 195 | } 196 | return res; 197 | })(), 198 | center: ['75%', '40%'], 199 | radius: 80 200 | } 201 | ], 202 | series: [{ 203 | type: 'radar', 204 | tooltip: { 205 | trigger: 'item' 206 | }, 207 | itemStyle: { normal: { areaStyle: { type: 'default' } } }, 208 | data: [{ 209 | value: [60, 73, 85, 40], 210 | name: '某软件' 211 | }] 212 | }, 213 | { 214 | type: 'radar', 215 | radarIndex: 1, 216 | data: [{ 217 | value: [85, 90, 90, 95, 95], 218 | name: '某主食手机' 219 | }, 220 | { 221 | value: [95, 80, 95, 90, 93], 222 | name: '某水果手机' 223 | } 224 | ] 225 | }, 226 | { 227 | type: 'radar', 228 | radarIndex: 2, 229 | itemStyle: { normal: { areaStyle: { type: 'default' } } }, 230 | data: [{ 231 | name: '降水量', 232 | value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3], 233 | }, 234 | { 235 | name: '蒸发量', 236 | value: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20.0, 6.4, 3.3] 237 | } 238 | ] 239 | } 240 | ] 241 | }; 242 | echartsB.setOption(optionB); 243 | var echartsA = echarts.init(document.getElementById('tpl-echarts-A')); 244 | option = { 245 | 246 | tooltip: { 247 | trigger: 'axis', 248 | }, 249 | legend: { 250 | data: ['邮件', '媒体', '资源'] 251 | }, 252 | grid: { 253 | left: '3%', 254 | right: '4%', 255 | bottom: '3%', 256 | containLabel: true 257 | }, 258 | xAxis: [{ 259 | type: 'category', 260 | boundaryGap: true, 261 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] 262 | }], 263 | 264 | yAxis: [{ 265 | type: 'value' 266 | }], 267 | series: [{ 268 | name: '邮件', 269 | type: 'line', 270 | stack: '总量', 271 | areaStyle: { normal: {} }, 272 | data: [120, 132, 101, 134, 90, 230, 210], 273 | itemStyle: { 274 | normal: { 275 | color: '#59aea2' 276 | }, 277 | emphasis: { 278 | 279 | } 280 | } 281 | }, 282 | { 283 | name: '媒体', 284 | type: 'line', 285 | stack: '总量', 286 | areaStyle: { normal: {} }, 287 | data: [220, 182, 191, 234, 290, 330, 310], 288 | itemStyle: { 289 | normal: { 290 | color: '#e7505a' 291 | } 292 | } 293 | }, 294 | { 295 | name: '资源', 296 | type: 'line', 297 | stack: '总量', 298 | areaStyle: { normal: {} }, 299 | data: [150, 232, 201, 154, 190, 330, 410], 300 | itemStyle: { 301 | normal: { 302 | color: '#32c5d2' 303 | } 304 | } 305 | } 306 | ] 307 | }; 308 | echartsA.setOption(option); 309 | } 310 | } 311 | 312 | 313 | // 风格切换 314 | 315 | $('.tpl-skiner-toggle').on('click', function() { 316 | $('.tpl-skiner').toggleClass('active'); 317 | }) 318 | 319 | $('.tpl-skiner-content-bar').find('span').on('click', function() { 320 | $('body').attr('class', $(this).attr('data-color')) 321 | saveSelectColor.Color = $(this).attr('data-color'); 322 | // 保存选择项 323 | storageSave(saveSelectColor); 324 | 325 | }) 326 | 327 | 328 | 329 | 330 | // 侧边菜单开关 331 | 332 | 333 | function autoLeftNav() { 334 | 335 | 336 | 337 | $('.tpl-header-switch-button').on('click', function() { 338 | if ($('.left-sidebar').is('.active')) { 339 | if ($(window).width() > 1024) { 340 | $('.tpl-content-wrapper').removeClass('active'); 341 | } 342 | $('.left-sidebar').removeClass('active'); 343 | } else { 344 | 345 | $('.left-sidebar').addClass('active'); 346 | if ($(window).width() > 1024) { 347 | $('.tpl-content-wrapper').addClass('active'); 348 | } 349 | } 350 | }) 351 | 352 | if ($(window).width() < 1024) { 353 | $('.left-sidebar').addClass('active'); 354 | } else { 355 | $('.left-sidebar').removeClass('active'); 356 | } 357 | } 358 | 359 | 360 | // 侧边菜单 361 | $('.sidebar-nav-sub-title').on('click', function() { 362 | $(this).siblings('.sidebar-nav-sub').slideToggle(80) 363 | .end() 364 | .find('.sidebar-nav-sub-ico').toggleClass('sidebar-nav-sub-ico-rotate'); 365 | }) -------------------------------------------------------------------------------- /codescan/static/assets/js/dataTables.responsive.min.js: -------------------------------------------------------------------------------- 1 | !function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e||(e=window),n&&n.fn.dataTable||(n=require("datatables.net")(e,n).$),t(n,e,e.document)}:t(jQuery,window,document)}(function(t,e,n,i){"use strict";var r=t.fn.dataTable,s=function(e,n){if(!r.versionCheck||!r.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new r.Api(e),columns:[],current:[]},this.s.dt.settings()[0].responsive||(n&&"string"==typeof n.details?n.details={type:n.details}:n&&n.details===!1?n.details={type:!1}:n&&n.details===!0&&(n.details={type:"inline"}),this.c=t.extend(!0,{},s.defaults,r.defaults.responsive,n),e.responsive=this,this._constructor())};t.extend(s.prototype,{_constructor:function(){var n=this,i=this.s.dt,s=i.settings()[0],o=t(e).width();i.settings()[0]._responsive=this,t(e).on("resize.dtr orientationchange.dtr",r.util.throttle(function(){var i=t(e).width();i!==o&&(n._resize(),o=i)})),s.oApi._fnCallbackReg(s,"aoRowCreatedCallback",function(e,r,s){t.inArray(!1,n.s.current)!==-1&&t("td, th",e).each(function(e){var r=i.column.index("toData",e);n.s.current[r]===!1&&t(this).css("display","none")})}),i.on("destroy.dtr",function(){i.off(".dtr"),t(i.table().body()).off(".dtr"),t(e).off("resize.dtr orientationchange.dtr"),t.each(n.s.current,function(t,e){e===!1&&n._setColumnVis(t,!0)})}),this.c.breakpoints.sort(function(t,e){return t.widthe.width?-1:0}),this._classLogic(),this._resizeAuto();var a=this.c.details;a.type!==!1&&(n._detailsInit(),i.on("column-visibility.dtr",function(t,e,i,r){n._classLogic(),n._resizeAuto(),n._resize()}),i.on("draw.dtr",function(){n._redrawChildren()}),t(i.table().node()).addClass("dtr-"+a.type)),i.on("column-reorder.dtr",function(t,e,i){n._classLogic(),n._resizeAuto(),n._resize()}),i.on("column-sizing.dtr",function(){n._resizeAuto(),n._resize()}),i.on("init.dtr",function(e,r,s){n._resizeAuto(),n._resize(),t.inArray(!1,n.s.current)&&i.columns.adjust()}),this._resize()},_columnsVisiblity:function(e){var n,i,r=this.s.dt,s=this.s.columns,o=s.map(function(t,e){return{columnIdx:e,priority:t.priority}}).sort(function(t,e){return t.priority!==e.priority?t.priority-e.priority:t.columnIdx-e.columnIdx}),a=t.map(s,function(n){return(!n.auto||null!==n.minWidth)&&(n.auto===!0?"-":t.inArray(e,n.includeIn)!==-1)}),d=0;for(n=0,i=a.length;n=d&&o(t,n[l].name);else if("not-"===r)for(l=0,c=n.length;l=0;n--)if(o<=a[n].width){d=a[n].name;break}var u=this._columnsVisiblity(d);this.s.current=u;var h=!1;for(n=0,i=l.length;n").append(l).appendTo(d)}t("").append(o).appendTo(r),"inline"===this.c.details.type&&t(i).addClass("dtr-inline collapsed"),t(i).find("[name]").removeAttr("name");var c=t("
").css({width:1,height:1,overflow:"hidden"}).append(i);c.insertBefore(e.table().node()),o.each(function(t){var i=e.column.index("fromVisible",t);n[i].minWidth=this.offsetWidth||0}),c.remove()}},_setColumnVis:function(e,n){var i=this.s.dt,r=n?"":"none";t(i.column(e).header()).css("display",r),t(i.column(e).footer()).css("display",r),i.column(e).nodes().to$().css("display",r)},_tabIndexes:function(){var e=this.s.dt,n=e.cells({page:"current"}).nodes().to$(),i=e.settings()[0],r=this.c.details.target;n.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");var s="number"==typeof r?":eq("+r+")":r;t(s,e.rows({page:"current"}).nodes()).attr("tabIndex",i.iTabIndex).data("dtr-keyboard",1)}}),s.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],s.display={childRow:function(e,n,i){return n?t(e.node()).hasClass("parent")?(e.child(i(),"child").show(),!0):void 0:e.child.isShown()?(e.child(!1),t(e.node()).removeClass("parent"),!1):(e.child(i(),"child").show(),t(e.node()).addClass("parent"),!0)},childRowImmediate:function(e,n,i){return!n&&e.child.isShown()||!e.responsive.hasHidden()?(e.child(!1),t(e.node()).removeClass("parent"),!1):(e.child(i(),"child").show(),t(e.node()).addClass("parent"),!0)},modal:function(e){return function(i,r,s){if(r)t("div.dtr-modal-content").empty().append(s());else{var o=function(){a.remove(),t(n).off("keypress.dtr")},a=t('
').append(t('
').append(t('
').append(s())).append(t('
×
').click(function(){o()}))).append(t('
').click(function(){o()})).appendTo("body");t(n).on("keyup.dtr",function(t){27===t.keyCode&&(t.stopPropagation(),o())})}e&&e.header&&t("div.dtr-modal-content").prepend("

"+e.header(i)+"

")}}},s.renderer={listHidden:function(){return function(e,n,i){var r=t.map(i,function(t){return t.hidden?'
  • '+t.title+' '+t.data+"
  • ":""}).join("");return!!r&&t('
      ').append(r)}},tableAll:function(e){return e=t.extend({tableClass:""},e),function(n,i,r){var s=t.map(r,function(t){return''+t.title+": "+t.data+""}).join("");return t('').append(s)}}},s.defaults={breakpoints:s.breakpoints,auto:!0,details:{display:s.display.childRow,renderer:s.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var o=t.fn.dataTable.Api;return o.register("responsive()",function(){return this}),o.register("responsive.index()",function(e){return e=t(e),{column:e.data("dtr-index"),row:e.parent().data("dtr-index")}}),o.register("responsive.rebuild()",function(){return this.iterator("table",function(t){t._responsive&&t._responsive._classLogic()})}),o.register("responsive.recalc()",function(){return this.iterator("table",function(t){t._responsive&&(t._responsive._resizeAuto(),t._responsive._resize())})}),o.register("responsive.hasHidden()",function(){var e=this.context[0];return!!e._responsive&&t.inArray(!1,e._responsive.s.current)!==-1}),s.version="2.1.0",t.fn.dataTable.Responsive=s,t.fn.DataTable.Responsive=s,t(n).on("preInit.dt.dtr",function(e,n,i){if("dt"===e.namespace&&(t(n.nTable).hasClass("responsive")||t(n.nTable).hasClass("dt-responsive")||n.oInit.responsive||r.defaults.responsive)){var o=n.oInit.responsive;o!==!1&&new s(n,t.isPlainObject(o)?o:{})}}),s}); -------------------------------------------------------------------------------- /codescan/static/assets/js/theme.js: -------------------------------------------------------------------------------- 1 | var saveSelectColor = { 2 | 'Name': 'SelcetColor', 3 | 'Color': 'theme-black' 4 | } 5 | 6 | 7 | 8 | // 判断用户是否已有自己选择的模板风格 9 | if (storageLoad('SelcetColor')) { 10 | $('body').attr('class', storageLoad('SelcetColor').Color) 11 | } else { 12 | storageSave(saveSelectColor); 13 | $('body').attr('class', 'theme-black') 14 | } 15 | 16 | 17 | // 本地缓存 18 | function storageSave(objectData) { 19 | localStorage.setItem(objectData.Name, JSON.stringify(objectData)); 20 | } 21 | 22 | function storageLoad(objectName) { 23 | if (localStorage.getItem(objectName)) { 24 | return JSON.parse(localStorage.getItem(objectName)) 25 | } else { 26 | return false 27 | } 28 | } -------------------------------------------------------------------------------- /codescan/static/白色.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/白色.psd -------------------------------------------------------------------------------- /codescan/static/黑色.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/codescan/static/黑色.psd -------------------------------------------------------------------------------- /codescan/tasks.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from celery import task 4 | from celery import shared_task 5 | from .models import Task,Result 6 | import subprocess 7 | import rarfile 8 | import zipfile 9 | from xml.dom.minidom import parse 10 | 11 | #gitlab token 12 | 13 | #调用fortify扫描任务 14 | @shared_task 15 | def add(filepath,taskid): 16 | 17 | #按照后缀解压缩代码文件 18 | 19 | #rar 20 | if filepath.split('.')[-1] == 'rar': 21 | rf = rarfile.RarFile(filepath) 22 | newpath = filepath[0:-4] 23 | rf.extractall(newpath) 24 | 25 | #zip 26 | if filepath.split('.')[-1] == 'zip': 27 | af = zipfile.ZipFile(filepath) 28 | newpath = filepath[0:-4] 29 | af.extractall(newpath) 30 | 31 | #tar.gz 32 | if filepath.split('.')[-1] == 'gz' and filepath.split('.')[-2] == 'tar': 33 | downcmd = "wget -O upload\\ " + taskid + ".zip" + " " + filepath 34 | down = subprocess.check_call(downcmd,shell=True) 35 | af = zipfile.ZipFile(taskid + ".zip") 36 | newpath = taskid 37 | af.extractall(newpath) 38 | 39 | 40 | #fortify 命令行接口拼接 41 | cmd = "D:\\HPE_Sec\\Fortify_SCA_and_Apps_16.20\\bin\\sourceanalyzer.exe " + newpath + " -scan -f " + taskid + ".fpr" 42 | cmd2 = "D:\\HPE_Sec\\Fortify_SCA_and_Apps_16.20\\bin\\ReportGenerator.bat -format xml -f " + taskid + ".xml -source " + taskid + ".fpr" 43 | 44 | 45 | #子进程调用 46 | print("[*]start scan") 47 | res1 = subprocess.check_call(cmd, shell=True) 48 | print("[*]start report") 49 | res2 = subprocess.check_call(cmd2, shell=True) 50 | print("[*]report success") 51 | #anaylsis xml 52 | xmlfile = taskid + ".xml" 53 | parsefile = parse(xmlfile) 54 | root = parsefile.documentElement 55 | body = root.getElementsByTagName("ReportSection")[2] 56 | sections = body.getElementsByTagName("GroupingSection") 57 | 58 | #解析fortify xml结果,入库 59 | 60 | for section in sections: 61 | result = Result() 62 | result.taskid = taskid 63 | result.issue = section.getElementsByTagName("Issue") 64 | result.title = section.getElementsByTagName("groupTitle")[0].childNodes[0].nodeValue 65 | result.level = section.getElementsByTagName("Folder")[0].childNodes[0].nodeValue 66 | result.desc = section.getElementsByTagName("Abstract")[0].childNodes[0].nodeValue 67 | result.filepath = section.getElementsByTagName("FilePath")[0].childNodes[0].nodeValue 68 | result.line = section.getElementsByTagName("LineStart")[0].childNodes[0].nodeValue 69 | result.content = section.getElementsByTagName("Snippet")[0].childNodes[0].nodeValue 70 | result.save() 71 | del result 72 | 73 | 74 | return "ok" 75 | 76 | 77 | -------------------------------------------------------------------------------- /codescan/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 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 | 34 | 35 |
      36 | 37 |
      38 | 39 | 40 | 41 |
      42 | 43 | 49 | 50 |
      51 | 67 |
      68 |
      69 | 70 |
      71 | 72 |
      73 |
      74 |
      75 |
      76 |
      77 | 选择主题 78 |
      79 |
      80 | 81 | 82 |
      83 |
      84 |
      85 | 86 | 126 | 127 | 128 | 129 | {% block body %}{% endblock %} 130 | 131 | 132 |
      133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /codescan/templates/chart.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %}{% load static %} 2 | {% block body %} 3 | 4 | 5 |
      6 | 7 |
      8 |
      9 |
      10 |
      部件首页 Amaze UI
      11 |

      Amaze UI 含近 20 个 CSS 组件、20 余 JS 组件,更有多个包含不同主题的 Web 组件。

      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 | {% endblock %} -------------------------------------------------------------------------------- /codescan/templates/detail.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %}{% load static %} 2 | {% block body %} 3 | 4 |
      5 | 6 |
      7 |
      8 |
      9 |
      风险综述 Summary
      10 |

      11 | {{ detail.0.desc }} 12 |
      13 | 14 |
      15 | 16 |
      17 |
      18 |
      19 |
      20 |
      21 |
      风险类型 Classification
      22 |

      23 | {{ detail.0.title }} 24 |
      25 | 26 |
      27 | 28 |
      29 |
      30 |
      31 |
      32 |
      33 |
      代码定位 {{detail.0.filepath}} in line {{detail.0.line}}
      34 |

      {{ detail.0.content }}
      35 |
      36 | 37 |
      38 | 39 |
      40 | 41 |
      42 | 43 | 44 | 45 | 134 | 135 | 136 | {% endblock %} -------------------------------------------------------------------------------- /codescan/templates/form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %}{% load static %} 2 | {% block body %} 3 | 4 |
      5 | 6 |
      7 |
      8 |
      9 |
      Code Scanner
      10 |

      自动拉取gitlab或解析代码包的 安全审计工具

      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 | {% csrf_token %} 37 |
      38 | 39 |
      40 | 41 | 请填写任务名称以方便查看。 42 |
      43 |
      44 | 45 | 46 | 47 |
      48 | 49 |
      50 | 请确保代码完整以供扫描。 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 | 82 |
      83 |
      84 | 85 |
      86 |
      87 |
      88 |
      89 |
      90 | 91 |
      92 |
      93 | 94 |
      95 | 97 |
      98 | 99 |
      100 |
      101 | 102 |
      103 |
      104 | 105 |
      106 |
      107 | 108 |
      109 |
      110 |
      111 |
      112 | 113 | 114 | {% endblock %} -------------------------------------------------------------------------------- /codescan/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %}{% load static %} 2 | {% block body %} 3 | 4 | 5 |
      6 | 7 |
      8 |
      9 |
      10 |
      Code Scanner
      11 |

      自动拉取gitlab或解析代码包的 安全审计工具

      12 |
      13 |
      14 | 15 |
      16 |
      17 | 18 |
      19 | 20 |
      21 |
      22 |
      23 |
      24 |
      25 |
      历史扫描任务总览
      26 |
      27 | 28 |
      29 |
      30 |
      31 |
      32 |
      33 | 历史任务数:{{vuln_count.0}} 34 | 35 |
      36 |
      37 |
      38 |
      39 | 历史漏洞数:{{vuln_count.1}} 40 | 41 |
      42 | 43 |
      44 |
      45 |
      46 | 47 |
      48 |
      49 |
      50 |
      51 | 本月任务 52 |
      53 |
      54 |
      55 | {{vuln_count.6}} 56 |
      57 | 58 | 59 |
      60 |
      61 |
      62 |
      63 |
      64 |
      65 | 本月漏洞 66 |
      67 |
      68 |
      69 | {{vuln_count.7}} 70 |
      71 | 72 | 73 |
      74 |
      75 |
      76 |
      77 | 78 |
      79 |
      80 |
      81 |
      82 |
      近月漏洞情况
      83 | 84 |
      85 |
      86 |
      87 | 110 |
      111 |
      112 |
      113 | 114 |
      115 |
      116 |
      117 |
      专用服务器负载
      118 |
      119 | 120 |
      121 |
      122 |
      123 | 124 |
      操作系统信息 {{system_info.0}}
      125 |
      126 |
      内存 使用率 {{system_info.1}} / 100%
      127 |
      128 |
      129 |
      130 |
      CPU 使用率 {{system_info.2}} / 100%
      131 |
      132 |
      133 |
      134 |
      135 |
      136 |
      137 |
      138 | 139 | 140 |
      141 | 142 |
      143 | 144 |
      145 | 146 | 147 |
      148 | {% endblock %} 149 | -------------------------------------------------------------------------------- /codescan/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Amaze UI Admin index Examples 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 | 80 |
      81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /codescan/templates/result.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %}{% load static %} 3 | {% block body %} 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 | 43 |
      44 |
      45 |
      46 |
      47 | 48 | 49 | 50 | 51 |
      52 |
      53 | 54 |
      55 |
      56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | {% for i in resultlist %} 66 | 67 | 68 | 69 | 70 | 80 | 81 | {% endfor %} 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
      漏洞类型漏洞文件漏洞等级其他操作
      {{i.title}}{{i.filepath}}{{i.level}} 71 | 79 |
      90 | 106 |
    107 | 108 |
    109 |
    110 |
    111 |
    112 | 113 | 114 | 115 | 116 | 117 | 118 | {% endblock %} -------------------------------------------------------------------------------- /codescan/templates/sign-up.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Amaze UI Admin index Examples 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 | 88 |
    89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /codescan/templates/table-list.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %}{% load static %} 3 | {% block body %} 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 | 43 |
    44 |
    45 |
    46 |
    47 | 48 | 49 | 50 | 51 |
    52 |
    53 | 54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | {% for i in tasklist %} 66 | 67 | 68 | 69 | 70 | 80 | 81 | {% endfor %} 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
    任务名称代码路径提交时间其他操作
    {{i.name}}{{i.filepath}}{{i.datetime}} 71 | 79 |
    90 | 106 |
    107 | 108 |
    109 |
    110 |
    111 |
    112 |
    113 |
    114 | 115 | 116 | 117 | 118 | {% endblock %} -------------------------------------------------------------------------------- /codescan/templates/tables.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %}{% load static %} 2 | {% block body %} 3 | 4 | 5 | 6 |
    7 | 8 |
    9 |
    10 |
    11 |
    表格 Amaze UI
    12 |

    Amaze UI 有许多不同的表格可用。

    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 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 75 | 76 | 77 | 78 | 79 | 89 | 90 | 91 | 92 | 93 | 94 | 104 | 105 | 106 | 107 | 108 | 109 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 135 | 136 | 137 | 138 |
    文章标题作者时间操作
    新加坡大数据初创公司 Latize 获 150 万美元风险融资张鹏飞2016-09-26 50 | 58 |
    自拍的“政治角色”:观众背对希拉里自拍合影表示“支持”天纵之人2016-09-26 65 | 73 |
    关于创新管理,我想和你当面聊聊。王宽师2016-09-26 80 | 88 |
    究竟是趋势带动投资,还是投资引领趋势?着迷2016-09-26 95 | 103 |
    Docker领域再添一员,网易云发布“蜂巢”,加入云计算之争醉里挑灯看键2016-09-26 110 | 118 |
    挑战星巴克,Blue Bottle Coffee 又要开始 D 轮融资了罢了2016-09-26 126 | 134 |
    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 | 182 | 183 | 184 | 185 | 186 | 187 | 197 | 198 | 199 | 200 | 201 | 202 | 212 | 213 | 214 | 215 | 216 | 217 | 227 | 228 | 229 | 230 | 231 | 232 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 258 | 259 | 260 | 261 |
    文章标题作者时间操作
    Amaze UI 模式窗口张鹏飞2016-09-26 173 | 181 |
    有适配微信小程序的计划吗天纵之人2016-09-26 188 | 196 |
    请问有没有amazeui 分享插件王宽师2016-09-26 203 | 211 |
    关于input输入框的问题着迷2016-09-26 218 | 226 |
    有没有发现官网上的下载包不好用醉里挑灯看键2016-09-26 233 | 241 |
    我建议WEB版本文件引入问题罢了2016-09-26 249 | 257 |
    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 | 304 | 305 | 306 | 307 | 308 | 309 | 319 | 320 | 321 | 322 | 323 | 324 | 334 | 335 | 336 | 337 | 338 | 339 | 349 | 350 | 351 | 352 | 353 | 354 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 380 | 381 | 382 | 383 |
    文章标题作者时间操作
    Amaze UI 模式窗口张鹏飞2016-09-26 295 | 303 |
    有适配微信小程序的计划吗天纵之人2016-09-26 310 | 318 |
    请问有没有amazeui 分享插件王宽师2016-09-26 325 | 333 |
    关于input输入框的问题着迷2016-09-26 340 | 348 |
    有没有发现官网上的下载包不好用醉里挑灯看键2016-09-26 355 | 363 |
    我建议WEB版本文件引入问题罢了2016-09-26 371 | 379 |
    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 | 412 | 413 | 414 | 415 | 425 | 426 | 427 | 428 | 429 | 430 | 440 | 441 | 442 | 443 | 444 | 445 | 455 | 456 | 457 | 458 | 459 | 460 | 470 | 471 | 472 | 473 | 474 | 475 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 501 | 502 | 503 | 504 |
    文章标题作者时间操作
    Amaze UI 模式窗口张鹏飞2016-09-26 416 | 424 |
    有适配微信小程序的计划吗天纵之人2016-09-26 431 | 439 |
    请问有没有amazeui 分享插件王宽师2016-09-26 446 | 454 |
    关于input输入框的问题着迷2016-09-26 461 | 469 |
    有没有发现官网上的下载包不好用醉里挑灯看键2016-09-26 476 | 484 |
    我建议WEB版本文件引入问题罢了2016-09-26 492 | 500 |
    505 | 506 |
    507 |
    508 |
    509 |
    510 | 511 | 512 | 513 |
    514 | 515 |
    516 |
    517 |
    518 |
    斑马线
    519 |
    520 | 521 |
    522 |
    523 |
    524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 549 | 550 | 551 | 552 | 553 | 554 | 564 | 565 | 566 | 567 | 568 | 569 | 579 | 580 | 581 | 582 | 583 | 584 | 594 | 595 | 596 | 597 | 598 | 599 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 625 | 626 | 627 | 628 |
    文章标题作者时间操作
    Amaze UI 模式窗口张鹏飞2016-09-26 540 | 548 |
    有适配微信小程序的计划吗天纵之人2016-09-26 555 | 563 |
    请问有没有amazeui 分享插件王宽师2016-09-26 570 | 578 |
    关于input输入框的问题着迷2016-09-26 585 | 593 |
    有没有发现官网上的下载包不好用醉里挑灯看键2016-09-26 600 | 608 |
    我建议WEB版本文件引入问题罢了2016-09-26 616 | 624 |
    629 | 630 |
    631 |
    632 |
    633 | 634 | 635 | 636 | 637 |
    638 | 639 |
    640 |
    641 | 642 | {% endblock %} -------------------------------------------------------------------------------- /codescan/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /codescan/urls.py: -------------------------------------------------------------------------------- 1 | 2 | from django.urls import path,include 3 | from . import views 4 | urlpatterns = [ 5 | path('add/', views.addtask), 6 | path('index/',views.index), 7 | path('task/',views.task), 8 | path('result/',views.result), 9 | path('detail/',views.detail), 10 | ] 11 | -------------------------------------------------------------------------------- /codescan/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | from django.shortcuts import render,HttpResponse 3 | from django.core.paginator import Paginator,EmptyPage,PageNotAnInteger 4 | from .forms import AddTask 5 | from .models import Task,Result 6 | from .tasks import add 7 | import datetime 8 | import os 9 | import hashlib 10 | import psutil 11 | import platform 12 | import time 13 | # Create your views here. 14 | 15 | 16 | #文件代码上传函数 17 | def upload_file(myFile): 18 | #myFile =request.FILES.get("file", None) 19 | print(myFile) 20 | if myFile == None: 21 | #print("nooooooooo") 22 | return False 23 | destination = open(os.path.join("upload\\",myFile.name),'wb+') 24 | 25 | #分块上传代码包 26 | for chunk in myFile.chunks(): 27 | destination.write(chunk) 28 | destination.close() 29 | return os.path.join("upload\\",myFile.name) 30 | 31 | def addtask(request): 32 | 33 | if request.method == 'POST': 34 | 35 | task = Task() 36 | task.name = request.POST.get('taskname') 37 | task.method = request.POST.get('method') 38 | task.java = '1' if request.POST.get('java') else '0' 39 | task.other = request.POST.get('other') 40 | 41 | #按照gitlAB拉取或前端上传定义不同的文件路径 42 | 43 | task.filepath = upload_file(request.FILES.get("file", None)) if (request.POST.get('method') == 'a') else request.POST.get('address') 44 | task.datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') 45 | 46 | task.taskid = hashlib.md5(task.datetime.encode('utf-8')).hexdigest() 47 | #保存模型 48 | task.save() 49 | #前端上传延时 50 | time.sleep(5) 51 | #添加后端celery扫描任务 52 | res = add.delay(task.filepath,task.taskid) 53 | return HttpResponse(request.FILES.get("file", None)) 54 | 55 | else: 56 | 57 | return render(request, 'form.html') 58 | 59 | #任务列表页 60 | def task(request): 61 | 62 | tasklist = Task.objects.all() 63 | paginator = Paginator(tasklist,10) 64 | page = request.GET.get('page') 65 | try : 66 | tasklist = paginator.page(page) 67 | except PageNotAnInteger: 68 | tasklist = paginator.page(1) 69 | except EmptyPage: 70 | tasklist = paginator.page(paginator.num_pages) 71 | 72 | return render(request,'table-list.html',{'tasklist':tasklist}) 73 | 74 | #按任务显示漏洞列表页 75 | def result(request): 76 | 77 | taskid = request.GET.get('taskid') 78 | resultlist = Result.objects.filter(taskid=taskid) 79 | paginator = Paginator(resultlist,10) 80 | page = request.GET.get('page') 81 | try : 82 | resultlist = paginator.page(page) 83 | except PageNotAnInteger: 84 | resultlist = paginator.page(1) 85 | except EmptyPage: 86 | resultlist = paginator.page(paginator.num_pages) 87 | return render(request,'result.html',{'resultlist':resultlist}) 88 | 89 | 90 | #漏洞详情页 91 | def detail(request): 92 | 93 | vulnid = request.GET.get("id") 94 | detail = Result.objects.filter(id=vulnid) 95 | #print(detail) 96 | detail[0].content.replace('{','{111') 97 | print(detail[0].content) 98 | return render(request,'detail.html',{'detail':detail}) 99 | 100 | 101 | #主页 102 | def index(request): 103 | 104 | 105 | 106 | #获取系统版本,系统资源占用 107 | os_banner = platform.platform() 108 | mem = psutil.virtual_memory() 109 | 110 | mem_per = str(mem.percent) + "%" 111 | cpu_per = str(psutil.cpu_percent(1)) + "%" 112 | system_info = [os_banner,mem_per,cpu_per] 113 | 114 | #统计任务,漏洞数量 115 | taskcount = Task.objects.all().count() 116 | resultcount = Result.objects.all().count() 117 | infocount = Result.objects.filter(level = 'Info').count() 118 | lowcount = Result.objects.filter(level = 'Low').count() 119 | midcount = Result.objects.filter(level = 'High').count() 120 | highcount = Result.objects.filter(level = 'Critical').count() 121 | 122 | taskmonthcount = 0 123 | resultmonthcount = 0 124 | taskall = Task.objects.all() 125 | now = str(datetime.datetime.now().month) if len(str(datetime.datetime.now().month)) == 2 else ("0" + str(datetime.datetime.now().month)) 126 | for i in range(0,taskcount): 127 | if taskall[i].datetime.split('-')[1] == now: 128 | taskmonthcount = taskmonthcount + 1 129 | resultmonthcount = resultmonthcount + Result.objects.filter(taskid = taskall[i].taskid).count() 130 | else: 131 | pass 132 | 133 | 134 | vuln_count = [taskcount,resultcount,infocount,lowcount,midcount,highcount,taskmonthcount,resultmonthcount] 135 | #月份统计 136 | month_1 = 0 137 | month_2 = 0 138 | month_3 = 0 139 | month_4 = 0 140 | for i in range(0,taskcount): 141 | if int(taskall[i].datetime.split('-')[1]) + 1 == int(now): 142 | month_1 = month_1 + 1 143 | if int(taskall[i].datetime.split('-')[1]) + 2 == int(now): 144 | month_2 = month_2 + 1 145 | if int(taskall[i].datetime.split('-')[1]) + 3 == int(now): 146 | month_3 = month_3 + 1 147 | if int(taskall[i].datetime.split('-')[1]) + 4 == int(now): 148 | month_4 = month_4 + 1 149 | month_count = [month_4,month_3,month_2,month_1,taskcount,(int(now)-4)%12,(int(now)-3)%12,(int(now)-2)%12,(int(now)-1)%12,(int(now))%12] 150 | for i in range(5,10): 151 | if month_count[i] == 0: 152 | month_count[i] = 12 153 | 154 | return render(request, 'index.html',{'system_info' : system_info,'vuln_count':vuln_count,'month_count':month_count}) -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/db.sqlite3 -------------------------------------------------------------------------------- /demo/cs.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/demo/cs.JPG -------------------------------------------------------------------------------- /demo/cs2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/demo/cs2.JPG -------------------------------------------------------------------------------- /demo/cs3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/demo/cs3.JPG -------------------------------------------------------------------------------- /demo/cs4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/demo/cs4.JPG -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == '__main__': 6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /mysite/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # This will make sure the app is always imported when 4 | # Django starts so that shared_task will use this app. 5 | from .celery import app as celery_app -------------------------------------------------------------------------------- /mysite/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/mysite/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /mysite/__pycache__/celery.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/mysite/__pycache__/celery.cpython-36.pyc -------------------------------------------------------------------------------- /mysite/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/mysite/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /mysite/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/mysite/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /mysite/__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0FuzzingQ/CodeScanner/88bc0728e97fb1c359017e2e4b1d1ea0b170ad0a/mysite/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /mysite/celery.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | from __future__ import absolute_import 4 | 5 | import os 6 | 7 | from celery import Celery 8 | 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 10 | 11 | from django.conf import settings 12 | 13 | app = Celery('test') 14 | app.config_from_object('django.conf:settings') 15 | 16 | app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) -------------------------------------------------------------------------------- /mysite/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for mysite project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.1.1. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.1/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.1/ref/settings/ 11 | """ 12 | 13 | import os 14 | import djcelery 15 | 16 | djcelery.setup_loader() 17 | CELERY_TIMEZONE='Asia/Shanghai' 18 | #CELERY_RESULT_BACKEND = 'django-db' 19 | BROKER_URL='redis://127.0.0.1:6379/0' 20 | CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler' 21 | 22 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 23 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 24 | 25 | 26 | # Quick-start development settings - unsuitable for production 27 | # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ 28 | 29 | # SECURITY WARNING: keep the secret key used in production secret! 30 | SECRET_KEY = 'mpu_@!o3l*v!he)-z@0db5@9opgck=82mk$)tc^w^j+i$q!8qq' 31 | 32 | # SECURITY WARNING: don't run with debug turned on in production! 33 | DEBUG = True 34 | 35 | ALLOWED_HOSTS = [] 36 | 37 | 38 | # Application definition 39 | 40 | INSTALLED_APPS = [ 41 | 'django.contrib.admin', 42 | 'django.contrib.auth', 43 | 'django.contrib.contenttypes', 44 | 'django.contrib.sessions', 45 | 'django.contrib.messages', 46 | 'django.contrib.staticfiles', 47 | 'codescan.apps.CodescanConfig', 48 | 'django.contrib.sites', 49 | 'djcelery', 50 | ] 51 | 52 | MIDDLEWARE = [ 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.middleware.common.CommonMiddleware', 56 | 'django.middleware.csrf.CsrfViewMiddleware', 57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 58 | 'django.contrib.messages.middleware.MessageMiddleware', 59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 60 | ] 61 | 62 | ROOT_URLCONF = 'mysite.urls' 63 | 64 | TEMPLATES = [ 65 | { 66 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 67 | 'DIRS': [], 68 | 'APP_DIRS': True, 69 | 'OPTIONS': { 70 | 'context_processors': [ 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | ] 79 | 80 | WSGI_APPLICATION = 'mysite.wsgi.application' 81 | 82 | 83 | # Database 84 | # https://docs.djangoproject.com/en/2.1/ref/settings/#databases 85 | 86 | DATABASES = { 87 | 'default': { 88 | 'ENGINE': 'django.db.backends.sqlite3', 89 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 90 | } 91 | } 92 | 93 | 94 | # Password validation 95 | # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators 96 | 97 | AUTH_PASSWORD_VALIDATORS = [ 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 103 | }, 104 | { 105 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 106 | }, 107 | { 108 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 109 | }, 110 | ] 111 | 112 | 113 | # Internationalization 114 | # https://docs.djangoproject.com/en/2.1/topics/i18n/ 115 | 116 | LANGUAGE_CODE = 'en-us' 117 | 118 | TIME_ZONE = 'UTC' 119 | 120 | USE_I18N = True 121 | 122 | USE_L10N = True 123 | 124 | USE_TZ = True 125 | 126 | 127 | # Static files (CSS, JavaScript, Images) 128 | # https://docs.djangoproject.com/en/2.1/howto/static-files/ 129 | 130 | STATIC_URL = '/static/' 131 | -------------------------------------------------------------------------------- /mysite/urls.py: -------------------------------------------------------------------------------- 1 | """mysite URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.1/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('',include('codescan.urls')), 22 | ] 23 | -------------------------------------------------------------------------------- /mysite/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for mysite project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') 15 | 16 | application = get_wsgi_application() 17 | --------------------------------------------------------------------------------