1- {% load i18n %}
1+ {% load i18n colander_tags %}
22
33
44< div class ="card m-1 shadow-sm bg-secondary-light border-secondary ">
77 < div class ="col-md-10 text-truncate border-end border-secondary ">
88 < div class ="border-bottom border-secondary ">
99 < h4 >
10- {% if feed.feed_type == "detection_rules" %}
11- < i class ="nf {{ feed.content_type.nf_icon }} h4 text-primary "> </ i >
12- {% else %}
13- < i class ="nf nf-md-code_json h4 text-primary "> </ i >
14- {% endif %}
10+ < i class ="nf nf-fae-file_export h4 text-primary "> </ i >
1511 {{ feed.name }}
1612 </ h4 >
1713 < span class ="font-monospace ">
1814 {% if feed.feed_type == "detection_rules" %}
1915 {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}
20- {% else %}
21- {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?format=[json|misp|stix2|csv|mermaid|dot]
16+ {% elif feed.feed_type == "entities" %}
17+ {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}
18+ ?format=[json|misp|stix2|csv|mermaid|dot]
19+ {% elif feed.feed_type == "custom" %}
20+ {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}
2221 {% endif %}
2322 </ span >
2423 </ div >
4140 </ div >
4241 </ div >
4342 < div class ="col-md-9 ">
44- Get feed information:
45- < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
46- curl {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?secret={{ feed.secret }}&info
47- </ p >
43+ {% if feed.feed_type == "custom" %}
44+ Get feed content:
45+ < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
46+ curl {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?secret={{ feed.secret }}
47+ </ p >
48+ {% else %}
49+ Get feed information:
50+ < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
51+ curl {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?secret={{ feed.secret }}&info
52+ </ p >
53+ {% endif %}
4854 {% if feed.content_type.short_name == "YARA" %}
49- Download < a href ="https://yara.readthedocs.io/en/stable/index.html " title ="Yara documentation " target ="_blank "> Yara</ a > rules:
55+ Download< a href ="https://yara.readthedocs.io/en/stable/index.html " title ="Yara documentation "
56+ target ="_blank "> Yara</ a > rules:
5057 < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
5158 curl -H "X-Colander-Feed: Secret {{ feed.secret }}" \ < br >
5259 -o Colander_{{ feed.name|slugify }}_{{ feed.id }}.yar \ < br >
5360 {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}
5461 </ p >
5562 {% endif %}
5663 {% if feed.content_type.short_name == "SURICATA" %}
57- {% url "collaborate_detection_rule_out_feed_view -rules" pk=feed.id as feed_url %}
64+ {% url "detection_rule_out_feed_view -rules" pk=feed.id as feed_url %}
5865
59- Download rules and use with < a href ="https://suricata.io/ " title ="Suricata documentation " target ="_blank "> Suricata</ a > :
66+ Download rules and use with
67+ < a href ="https://suricata.io/ " title ="Suricata documentation " target ="_blank "> Suricata</ a > :
6068 < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
61- suricata-update add-source --no-checksum colander/{{ feed.name|slugify }} {{ request.scheme }}://{{ request.META.HTTP_HOST }}{{ feed_url }}?secret={{ feed.secret }}< br >
69+ suricata-update add-source --no-checksum
70+ colander/{{ feed.name|slugify }} {{ request.scheme }}://{{ request.META.HTTP_HOST }}{{ feed_url }}?secret={{ feed.secret }}< br >
6271 suricata-update< br >
6372 suricatasc -c reload-rules
6473 </ p >
7079 -o entities-{{ feed.id }}.json \ < br >
7180 {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}
7281 </ p >
73- Download as a STIX2 file and use with < a href ="https://docs.mvt.re " title ="MVT documentation " target ="_blank "> mvt</ a > :
82+ Download as a STIX2 file and use with
83+ < a href ="https://docs.mvt.re " title ="MVT documentation " target ="_blank "> mvt</ a > :
7484 < p class ="font-monospace small bg-dark text-white p-2 mt-1 mb-1 rounded-2 shadow text-wrap ">
7585 curl -H "X-Colander-Feed: Secret {{ feed.secret }}" \ < br >
7686 -o ~/entities-{{ feed.id }}.stix2 \ < br >
77- {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?format=stix2 < br >
87+ {{ request.scheme }}://{{ request.META.HTTP_HOST }}/feed/{{ feed.feed_type }}/{{ feed.id }}?format=stix2
88+ < br >
7889 mvt-[ios|android] check-backup --iocs ~/entities-{{ feed.id }}.stix2 [...]
7990 </ p >
8091 {% endif %}
8495 < div class ="col-md-2 text-truncate ">
8596 < div class ="row ">
8697 < div class ="col ">
87- {% include "tlp/badge_tlp.html" with tlp=feed.max_tlp c="small" %}
88- {% include "tlp/badge_pap.html" with pap=feed.max_pap c="small" %}
89- {% if feed.feed_type == "detection_rules" %}
90- < div class ="small ">
91- < i class ="nf nf-fa-filter "> </ i > {{ feed.content_type.name }}
92- </ div >
93- {% else %}
94- {% for t in feed.content_type.all %}
95- < div class ="small ">
96- < i class ="nf nf-fa-filter "> </ i > {{ t.name }}
97- </ div >
98- {% endfor %}
98+ < div class ="text-muted "> {{ feed.feed_type|to_title }} export</ div >
99+ {% if feed.feed_type != "custom" %}
100+ {% include "tlp/badge_tlp.html" with tlp=feed.max_tlp c="small" %}
101+ {% include "tlp/badge_pap.html" with pap=feed.max_pap c="small" %}
102+ {% if feed.feed_type == "detection_rules" %}
103+ < div class ="small ">
104+ < i class ="nf nf-fa-filter "> </ i > {{ feed.content_type.name }}
105+ </ div >
106+ {% else %}
107+ {% for t in feed.content_type.all %}
108+ < div class ="small ">
109+ < i class ="nf nf-fa-filter "> </ i > {{ t.name }}
110+ </ div >
111+ {% endfor %}
112+ {% endif %}
99113 {% endif %}
100114 < div class ="small ">
101115 < i class ="nf nf-fa-lock "> </ i > < code > {{ feed.secret }}</ code >
@@ -108,8 +122,10 @@ <h4>
108122 < div class ="card-footer bg-transparent border-secondary m-0 p-1 text-end ">
109123 {% if feed.feed_type == "detection_rules" %}
110124 {% include "feed/detection_rule_out_feed_controls.html" with exclude="" btn_class="btn-sm" %}
111- {% else %}
125+ {% elif feed.feed_type == "entities" %}
112126 {% include "feed/entity_out_feed_controls.html" with exclude="" btn_class="btn-sm" %}
127+ {% elif feed.feed_type == "custom" %}
128+ {% include "feed/custom_out_feed_controls.html" with exclude="" btn_class="btn-sm" %}
113129 {% endif %}
114130 </ div >
115131</ div >
0 commit comments