Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hunter-ht.cn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘莹莹
hunter-ht.cn
Commits
a05970ac
Commit
a05970ac
authored
May 07, 2020
by
liuyingying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cve list
parent
297a360c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
index.html
Hunter_ht/hunter/templates/hunter/index.html
+1
-6
views.py
Hunter_ht/hunter/views.py
+9
-8
No files found.
Hunter_ht/hunter/templates/hunter/index.html
View file @
a05970ac
...
...
@@ -223,16 +223,11 @@
</span>
</div>
<div
class=
"wrap"
>
{% for year, cves in cve_year_list.items %}
<blockquote
style=
"display: none"
><p>
{{ year }}
</p></blockquote>
<ul>
{% if cves %}
{% for cve in cves %}
{% for cve in bug_list %}
<li
class=
"cve_big_text float-tips"
title=
"软件:{{ cve.software }}<br>漏洞类型:{{ cve.bugType }}"
><a
href=
"{{ cve.url }}"
target=
"_blank"
>
{{ cve.identifier }}
</a></li>
{% endfor %}
{% endif %}
</ul>
{% endfor %}
</div>
</section>
...
...
Hunter_ht/hunter/views.py
View file @
a05970ac
...
...
@@ -64,14 +64,14 @@ def index(request):
bug_list
=
Bugs
.
objects
.
order_by
(
'-identifier'
)
cve_year_list
=
{}
for
cve
in
bug_list
:
year
=
str
(
cve
.
datetime
)[
0
:
4
]
cve
.
datetime
=
str
(
cve
.
datetime
)[
5
:
10
]
print
(
cve
.
datetime
)
if
year
in
cve_year_list
.
keys
():
cve_year_list
[
year
]
.
append
(
cve
)
else
:
cve_year_list
[
year
]
=
[
cve
]
#
for cve in bug_list:
#
year = str(cve.datetime)[0:4]
#
cve.datetime = str(cve.datetime)[5:10]
#
print(cve.datetime)
#
if year in cve_year_list.keys():
#
cve_year_list[year].append(cve)
#
else:
#
cve_year_list[year] = [cve]
article_list
=
Articles
.
objects
.
order_by
(
'-editDateTime'
)
article_year_list
=
{}
...
...
@@ -113,6 +113,7 @@ def index(request):
'user_type_list_former'
:
user_type_list_former
,
'publication_year_list'
:
publication_year_list
,
'cve_year_list'
:
cve_year_list
,
'cve_list'
:
bug_list
,
'article_year_list'
:
article_year_list
,
'newest_post_list'
:
newest_post_list
,
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment