Debian Codegraph @

docs/index.html

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="generator" content="Asciidoctor 2.0.23">
8 <meta name="keywords" content="antivirus, clamav, fangfrisch, freshclam, refresh, update">
9 <meta name="author" content="Ralph Seichter">
10 <meta name="copyright" content="© 2020-2025 Ralph Seichter">
11 <title>Fangfrisch</title>
12 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
13 <style>
14 /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
15 /* Uncomment the following line when using as a custom stylesheet */
16 /* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
17 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
18 a{background:none}
19 a:focus{outline:thin dotted}
20 a:active,a:hover{outline:0}
21 h1{font-size:2em;margin:.67em 0}
22 b,strong{font-weight:bold}
23 abbr{font-size:.9em}
24 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
25 dfn{font-style:italic}
26 hr{height:0}
27 mark{background:#ff0;color:#000}
28 code,kbd,pre,samp{font-family:monospace;font-size:1em}
29 pre{white-space:pre-wrap}
30 q{quotes:"\201C" "\201D" "\2018" "\2019"}
31 small{font-size:80%}
32 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
33 sup{top:-.5em}
34 sub{bottom:-.25em}
35 img{border:0}
36 svg:not(:root){overflow:hidden}
37 figure{margin:0}
38 audio,video{display:inline-block}
39 audio:not([controls]){display:none;height:0}
40 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
41 legend{border:0;padding:0}
42 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
43 button,input{line-height:normal}
44 button,select{text-transform:none}
45 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
46 button[disabled],html input[disabled]{cursor:default}
47 input[type=checkbox],input[type=radio]{padding:0}
48 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
49 textarea{overflow:auto;vertical-align:top}
50 table{border-collapse:collapse;border-spacing:0}
51 *,::before,::after{box-sizing:border-box}
52 html,body{font-size:100%}
53 body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
54 a:hover{cursor:pointer}
55 img,object,embed{max-width:100%;height:auto}
56 object,embed{height:100%}
57 img{-ms-interpolation-mode:bicubic}
58 .left{float:left!important}
59 .right{float:right!important}
60 .text-left{text-align:left!important}
61 .text-right{text-align:right!important}
62 .text-center{text-align:center!important}
63 .text-justify{text-align:justify!important}
64 .hide{display:none}
65 img,object,svg{display:inline-block;vertical-align:middle}
66 textarea{height:auto;min-height:50px}
67 select{width:100%}
68 .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
69 div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
70 a{color:#2156a5;text-decoration:underline;line-height:inherit}
71 a:hover,a:focus{color:#1d4b8f}
72 a img{border:0}
73 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
74 p aside{font-size:.875em;line-height:1.35;font-style:italic}
75 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
76 h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
77 h1{font-size:2.125em}
78 h2{font-size:1.6875em}
79 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
80 h4,h5{font-size:1.125em}
81 h6{font-size:1em}
82 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
83 em,i{font-style:italic;line-height:inherit}
84 strong,b{font-weight:bold;line-height:inherit}
85 small{font-size:60%;line-height:inherit}
86 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
87 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
88 ul,ol{margin-left:1.5em}
89 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
90 ul.circle{list-style-type:circle}
91 ul.disc{list-style-type:disc}
92 ul.square{list-style-type:square}
93 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
94 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
95 dl dt{margin-bottom:.3125em;font-weight:bold}
96 dl dd{margin-bottom:1.25em}
97 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
98 blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
99 @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
100 h1{font-size:2.75em}
101 h2{font-size:2.3125em}
102 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
103 h4{font-size:1.4375em}}
104 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
105 table thead,table tfoot{background:#f7f8f7}
106 table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
107 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
108 table tr.even,table tr.alt{background:#f8f8f7}
109 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
110 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
111 h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
112 .center{margin-left:auto;margin-right:auto}
113 .stretch{width:100%}
114 .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
115 .clearfix::after,.float-group::after{clear:both}
116 :not(pre).nobreak{word-wrap:normal}
117 :not(pre).nowrap{white-space:nowrap}
118 :not(pre).pre-wrap{white-space:pre-wrap}
119 :not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
120 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
121 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
122 pre>code{display:block}
123 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
124 em em{font-style:normal}
125 strong strong{font-weight:400}
126 .keyseq{color:rgba(51,51,51,.8)}
127 kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
128 .keyseq kbd:first-child{margin-left:0}
129 .keyseq kbd:last-child{margin-right:0}
130 .menuseq,.menuref{color:#000}
131 .menuseq b:not(.caret),.menuref{font-weight:inherit}
132 .menuseq{word-spacing:-.02em}
133 .menuseq b.caret{font-size:1.25em;line-height:.8}
134 .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
135 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
136 b.button::before{content:"[";padding:0 3px 0 2px}
137 b.button::after{content:"]";padding:0 2px 0 3px}
138 p a>code:hover{color:rgba(0,0,0,.9)}
139 #header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
140 #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
141 #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
142 #content{margin-top:1.25em}
143 #content::before{content:none}
144 #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
145 #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
146 #header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
147 #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
148 #header .details span:first-child{margin-left:-.125em}
149 #header .details span.email a{color:rgba(0,0,0,.85)}
150 #header .details br{display:none}
151 #header .details br+span::before{content:"\00a0\2013\00a0"}
152 #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
153 #header .details br+span#revremark::before{content:"\00a0|\00a0"}
154 #header #revnumber{text-transform:capitalize}
155 #header #revnumber::after{content:"\00a0"}
156 #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
157 #toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
158 #toc>ul{margin-left:.125em}
159 #toc ul.sectlevel0>li>a{font-style:italic}
160 #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
161 #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
162 #toc li{line-height:1.3334;margin-top:.3334em}
163 #toc a{text-decoration:none}
164 #toc a:active{text-decoration:underline}
165 #toctitle{color:#7a2518;font-size:1.2em}
166 @media screen and (min-width:768px){#toctitle{font-size:1.375em}
167 body.toc2{padding-left:15em;padding-right:0}
168 body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
169 #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
170 #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
171 #toc.toc2>ul{font-size:.9em;margin-bottom:0}
172 #toc.toc2 ul ul{margin-left:0;padding-left:1em}
173 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
174 body.toc2.toc-right{padding-left:0;padding-right:15em}
175 body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
176 @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
177 #toc.toc2{width:20em}
178 #toc.toc2 #toctitle{font-size:1.375em}
179 #toc.toc2>ul{font-size:.95em}
180 #toc.toc2 ul ul{padding-left:1.25em}
181 body.toc2.toc-right{padding-left:0;padding-right:20em}}
182 #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
183 #content #toc>:first-child{margin-top:0}
184 #content #toc>:last-child{margin-bottom:0}
185 #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
186 #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
187 #content{margin-bottom:.625em}
188 .sect1{padding-bottom:.625em}
189 @media screen and (min-width:768px){#content{margin-bottom:1.25em}
190 .sect1{padding-bottom:1.25em}}
191 .sect1:last-child{padding-bottom:0}
192 .sect1+.sect1{border-top:1px solid #e7e7e9}
193 #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
194 #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
195 #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
196 #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
197 #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
198 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
199 details{margin-left:1.25rem}
200 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
201 details>summary::-webkit-details-marker{display:none}
202 details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
203 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
204 details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
205 .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
206 table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
207 .paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
208 .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
209 .admonitionblock>table td.icon{text-align:center;width:80px}
210 .admonitionblock>table td.icon img{max-width:none}
211 .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
212 .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
213 .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
214 .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
215 .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
216 .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
217 .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
218 .exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
219 .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
220 @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
221 @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
222 .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
223 .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
224 .listingblock>.content{position:relative}
225 .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
226 .listingblock:hover code[data-lang]::before{display:block}
227 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
228 .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
229 .listingblock pre.highlightjs{padding:0}
230 .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
231 .listingblock pre.prettyprint{border-width:0}
232 .prettyprint{background:#f7f7f8}
233 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
234 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
235 pre.prettyprint li code[data-lang]::before{opacity:1}
236 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
237 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
238 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
239 table.linenotable td.code{padding-left:.75em}
240 table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
241 pre.pygments span.linenos{display:inline-block;margin-right:.75em}
242 .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
243 .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
244 .quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
245 .quoteblock blockquote{margin:0;padding:0;border:0}
246 .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
247 .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
248 .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
249 .verseblock{margin:0 1em 1.25em}
250 .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
251 .verseblock pre strong{font-weight:400}
252 .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
253 .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
254 .quoteblock .attribution br,.verseblock .attribution br{display:none}
255 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
256 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
257 .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
258 .quoteblock.abstract{margin:0 1em 1.25em;display:block}
259 .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
260 .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
261 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
262 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
263 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
264 p.tableblock:last-child{margin-bottom:0}
265 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
266 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
267 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
268 table.grid-all>*>tr>*{border-width:1px}
269 table.grid-cols>*>tr>*{border-width:0 1px}
270 table.grid-rows>*>tr>*{border-width:1px 0}
271 table.frame-all{border-width:1px}
272 table.frame-ends{border-width:1px 0}
273 table.frame-sides{border-width:0 1px}
274 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
275 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
276 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
277 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
278 table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
279 th.halign-left,td.halign-left{text-align:left}
280 th.halign-right,td.halign-right{text-align:right}
281 th.halign-center,td.halign-center{text-align:center}
282 th.valign-top,td.valign-top{vertical-align:top}
283 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
284 th.valign-middle,td.valign-middle{vertical-align:middle}
285 table thead th,table tfoot th{font-weight:bold}
286 tbody tr th{background:#f7f8f7}
287 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
288 p.tableblock>code:only-child{background:none;padding:0}
289 p.tableblock{font-size:1em}
290 ol{margin-left:1.75em}
291 ul li ol{margin-left:1.5em}
292 dl dd{margin-left:1.125em}
293 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
294 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
295 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
296 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
297 ul.unstyled,ol.unstyled{margin-left:0}
298 li>p:empty:only-child::before{content:"";display:inline-block}
299 ul.checklist>li>p:first-child{margin-left:-1em}
300 ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
301 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
302 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
303 ul.inline>li{margin-left:1.25em}
304 .unstyled dl dt{font-weight:400;font-style:normal}
305 ol.arabic{list-style-type:decimal}
306 ol.decimal{list-style-type:decimal-leading-zero}
307 ol.loweralpha{list-style-type:lower-alpha}
308 ol.upperalpha{list-style-type:upper-alpha}
309 ol.lowerroman{list-style-type:lower-roman}
310 ol.upperroman{list-style-type:upper-roman}
311 ol.lowergreek{list-style-type:lower-greek}
312 .hdlist>table,.colist>table{border:0;background:none}
313 .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
314 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
315 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
316 td.hdlist2{word-wrap:anywhere}
317 .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
318 .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
319 .colist td:not([class]):first-child img{max-width:none}
320 .colist td:not([class]):last-child{padding:.25em 0}
321 .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
322 .imageblock.left{margin:.25em .625em 1.25em 0}
323 .imageblock.right{margin:.25em 0 1.25em .625em}
324 .imageblock>.title{margin-bottom:0}
325 .imageblock.thumb,.imageblock.th{border-width:6px}
326 .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
327 .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
328 .image.left{margin-right:.625em}
329 .image.right{margin-left:.625em}
330 a.image{text-decoration:none;display:inline-block}
331 a.image object{pointer-events:none}
332 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
333 sup.footnote a,sup.footnoteref a{text-decoration:none}
334 sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
335 #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
336 #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
337 #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
338 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
339 #footnotes .footnote:last-of-type{margin-bottom:0}
340 #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
341 div.unbreakable{page-break-inside:avoid}
342 .big{font-size:larger}
343 .small{font-size:smaller}
344 .underline{text-decoration:underline}
345 .overline{text-decoration:overline}
346 .line-through{text-decoration:line-through}
347 .aqua{color:#00bfbf}
348 .aqua-background{background:#00fafa}
349 .black{color:#000}
350 .black-background{background:#000}
351 .blue{color:#0000bf}
352 .blue-background{background:#0000fa}
353 .fuchsia{color:#bf00bf}
354 .fuchsia-background{background:#fa00fa}
355 .gray{color:#606060}
356 .gray-background{background:#7d7d7d}
357 .green{color:#006000}
358 .green-background{background:#007d00}
359 .lime{color:#00bf00}
360 .lime-background{background:#00fa00}
361 .maroon{color:#600000}
362 .maroon-background{background:#7d0000}
363 .navy{color:#000060}
364 .navy-background{background:#00007d}
365 .olive{color:#606000}
366 .olive-background{background:#7d7d00}
367 .purple{color:#600060}
368 .purple-background{background:#7d007d}
369 .red{color:#bf0000}
370 .red-background{background:#fa0000}
371 .silver{color:#909090}
372 .silver-background{background:#bcbcbc}
373 .teal{color:#006060}
374 .teal-background{background:#007d7d}
375 .white{color:#bfbfbf}
376 .white-background{background:#fafafa}
377 .yellow{color:#bfbf00}
378 .yellow-background{background:#fafa00}
379 span.icon>.fa{cursor:default}
380 a span.icon>.fa{cursor:inherit}
381 .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
382 .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
383 .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
384 .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
385 .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
386 .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
387 .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
388 .conum[data-value] *{color:#fff!important}
389 .conum[data-value]+b{display:none}
390 .conum[data-value]::after{content:attr(data-value)}
391 pre .conum[data-value]{position:relative;top:-.125em}
392 b.conum *{color:inherit!important}
393 .conum:not([data-value]):empty{display:none}
394 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
395 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
396 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
397 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
398 p{margin-bottom:1.25rem}
399 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
400 .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
401 .print-only{display:none!important}
402 @page{margin:1.25cm .75cm}
403 @media print{*{box-shadow:none!important;text-shadow:none!important}
404 html{font-size:80%}
405 a{color:inherit!important;text-decoration:underline!important}
406 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
407 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
408 abbr[title]{border-bottom:1px dotted}
409 abbr[title]::after{content:" (" attr(title) ")"}
410 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
411 thead{display:table-header-group}
412 svg{max-width:100%}
413 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
414 h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
415 #header,#content,#footnotes,#footer{max-width:none}
416 #toc,.sidebarblock,.exampleblock>.content{background:none!important}
417 #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
418 body.book #header{text-align:center}
419 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
420 body.book #header .details{border:0!important;display:block;padding:0!important}
421 body.book #header .details span:first-child{margin-left:0!important}
422 body.book #header .details br{display:block}
423 body.book #header .details br+span::before{content:none!important}
424 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
425 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
426 .listingblock code[data-lang]::before{display:block}
427 #footer{padding:0 .9375em}
428 .hide-on-print{display:none!important}
429 .print-only{display:block!important}
430 .hide-for-print{display:none!important}
431 .show-for-print{display:inherit!important}}
432 @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
433 .sect1{padding:0!important}
434 .sect1+.sect1{border:0}
435 #footer{background:none}
436 #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
437 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
438 </style>
439 </head>
440 <body class="article toc2 toc-right">
441 <div id="header">
442 <h1>Fangfrisch</h1>
443 <div class="details">
444 <span id="author" class="author">Ralph Seichter</span><br>
445 <span id="email" class="email"><a href="mailto:[email protected]">[email protected]</a></span><br>
446 <span id="revnumber"> 1.9.2,</span>
447 <span id="revdate">2025-04-04</span>
448 </div>
449 <div id="toc" class="toc2">
450 <div id="toctitle">Table of Contents</div>
451 <ul class="sectlevel1">
452 <li><a href="#_license">1. License</a></li>
453 <li><a href="#_update_strategy">2. Update strategy</a></li>
454 <li><a href="#_installation">3. Installation</a>
455 <ul class="sectlevel2">
456 <li><a href="#_create_home_directory">3.1. Create home directory</a></li>
457 <li><a href="#_prepare_and_activate_venv">3.2. Prepare and activate venv</a></li>
458 <li><a href="#_install_via_pypi">3.3. Install via PyPI</a></li>
459 </ul>
460 </li>
461 <li><a href="#_installation_packages">4. Installation packages</a></li>
462 <li><a href="#_configuration">5. Configuration</a>
463 <ul class="sectlevel2">
464 <li><a href="#_default_providers">5.1. Default providers</a></li>
465 <li><a href="#_user_defined_providers">5.2. User-defined providers</a></li>
466 <li><a href="#_semantics">5.3. Semantics</a></li>
467 <li><a href="#_proxy_support">5.4. Proxy support</a></li>
468 </ul>
469 </li>
470 <li><a href="#dbsetup">6. Preparing the database</a></li>
471 <li><a href="#usage">7. Usage</a></li>
472 <li><a href="#_support">8. Support</a>
473 <ul class="sectlevel2">
474 <li><a href="#_reporting_possible_problems">8.1. Reporting possible problems</a></li>
475 <li><a href="#_offering_suggestions">8.2. Offering suggestions</a></li>
476 <li><a href="#_discussion_precedes_contribution">8.3. Discussion precedes contribution</a></li>
477 </ul>
478 </li>
479 <li><a href="#internalconf">Appendix A: Default configuration</a></li>
480 <li><a href="#sampleeff">Appendix B: Effective configuration</a></li>
481 <li><a href="#ffnews">Appendix C: Fangfrisch News</a></li>
482 <li><a href="#dbstructure">Appendix D: Database structure</a>
483 <ul class="sectlevel2">
484 <li><a href="#_accessing_mappings">D.1. Accessing mappings</a></li>
485 </ul>
486 </li>
487 </ul>
488 </div>
489 </div>
490 <div id="content">
491 <div id="preamble">
492 <div class="sectionbody">
493 <div class="paragraph">
494 <p>Fangfrisch (German for "freshly caught") is a sibling of the <a href="https://www.clamav.net">Clam Anti-Virus</a> freshclam utility.
495 It allows downloading virus definition files that are not official ClamAV canon, e.g. from <a href="https://sanesecurity.com">Sanesecurity</a> and <a href="https://urlhaus.abuse.ch">URLhaus</a>.
496 Fangfrisch was designed with security in mind, to be run by an unprivileged user only.
497 For those curious about the development history, a <a href="https://github.com/rseichter/fangfrisch/blob/master/CHANGELOG.rst">changelog</a> is available online.</p>
498 </div>
499 </div>
500 </div>
501 <div class="sect1">
502 <h2 id="_license"><a class="anchor" href="#_license"></a>1. License</h2>
503 <div class="sectionbody">
504 <div class="paragraph">
505 <p>Copyright © 2020-2025 Ralph Seichter</p>
506 </div>
507 <div class="paragraph">
508 <p>This file is part of "Fangfrisch".</p>
509 </div>
510 <div class="paragraph">
511 <p>Fangfrisch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
512 </div>
513 <div class="paragraph">
514 <p>Fangfrisch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
515 See the GNU General Public License for more details.</p>
516 </div>
517 <div class="paragraph">
518 <p>You should have received a copy of the GNU General Public License along with Fangfrisch.
519 If not, see <a href="https://www.gnu.org/licenses/" class="bare">https://www.gnu.org/licenses/</a>.</p>
520 </div>
521 </div>
522 </div>
523 <div class="sect1">
524 <h2 id="_update_strategy"><a class="anchor" href="#_update_strategy"></a>2. Update strategy</h2>
525 <div class="sectionbody">
526 <div class="paragraph">
527 <p>Fangfrisch is expected to run periodically, e.g. using <a href="https://en.wikipedia.org/wiki/Cron">cron</a>.
528 Fangfrisch will attempt to download digests first (if available upstream), and only retrieve corresponding signature files when their recorded digest changes, minimising transfer volumes.</p>
529 </div>
530 <div class="paragraph">
531 <p>I recommend running Fangfrisch at 10 minute intervals.
532 There is no need to worry about overburdening your machine, the network or remote signature providers.
533 Each individual download is recorded in the database, and whenever Fangfrisch is run, it checks those recorded timestamps against the preconfigured provider intervals.
534 No network connections are made for downloaded signature files which are considered "too young to update".</p>
535 </div>
536 <div class="paragraph">
537 <p>Imagine a provider interval setting of 45 minutes.
538 Even if launched every 10 minutes, Fangfrisch will not attempt to download related signature files before 45 minutes have passed since the last recorded successful download.
539 Provider intervals are set to reasonable defaults internally, but you can override them if necessary.</p>
540 </div>
541 </div>
542 </div>
543 <div class="sect1">
544 <h2 id="_installation"><a class="anchor" href="#_installation"></a>3. Installation</h2>
545 <div class="sectionbody">
546 <div class="paragraph">
547 <p>Fangfrisch requires Python version 3.9 or newer.
548 While Fangfrisch was initially written for Python 3.7, security support (the final lifecycle stage) for that version was terminated by the Python Software Foundation in 2023. Python 3.8 reached its EOL in 2024.</p>
549 </div>
550 <div class="paragraph">
551 <p>The recommended installation method is using the <a href="https://packaging.python.org/tutorials/installing-packages/">pip command</a> in a virtual Python environment.
552 Here is an example listing of commands for BASH, to be executed as root, assuming that you will be running Fangfrisch as an unprivileged user who is member of the <strong>clamav</strong> group:</p>
553 </div>
554 <div class="sect2">
555 <h3 id="_create_home_directory"><a class="anchor" href="#_create_home_directory"></a>3.1. Create home directory</h3>
556 <div class="listingblock">
557 <div class="content">
558 <pre>mkdir -m 0770 -p /var/lib/fangfrisch
559 chgrp clamav /var/lib/fangfrisch</pre>
560 </div>
561 </div>
562 <div class="paragraph">
563 <p>This will grant group members the necessary write access to create the database (see <a href="#dbsetup">Section 6</a>).</p>
564 </div>
565 </div>
566 <div class="sect2">
567 <h3 id="_prepare_and_activate_venv"><a class="anchor" href="#_prepare_and_activate_venv"></a>3.2. Prepare and activate venv</h3>
568 <div class="listingblock">
569 <div class="content">
570 <pre>cd /var/lib/fangfrisch
571 python3 -m venv venv
572 source venv/bin/activate</pre>
573 </div>
574 </div>
575 </div>
576 <div class="sect2">
577 <h3 id="_install_via_pypi"><a class="anchor" href="#_install_via_pypi"></a>3.3. Install via <a href="https://pypi.org/project/fangfrisch/">PyPI</a></h3>
578 <div class="listingblock">
579 <div class="content">
580 <pre>pip install fangfrisch</pre>
581 </div>
582 </div>
583 <div class="paragraph">
584 <p>This step will also create an executable launcher script <code>venv/bin/fangfrisch</code>.</p>
585 </div>
586 </div>
587 </div>
588 </div>
589 <div class="sect1">
590 <h2 id="_installation_packages"><a class="anchor" href="#_installation_packages"></a>4. Installation packages</h2>
591 <div class="sectionbody">
592 <div class="paragraph">
593 <p>As an alternative to pip-based installation, there are packages available for the following Linux distributions:</p>
594 </div>
595 <div class="ulist">
596 <ul>
597 <li>
598 <p>Arch Linux: <a href="https://aur.archlinux.org/packages/python-fangfrisch/">packages/python-fangfrisch</a>.
599 Support contact: Arch package maintainer.</p>
600 </li>
601 <li>
602 <p>Clear Linux: <a href="https://github.com/clearlinux-pkgs/fangfrisch">clearlinux-pkgs/fangfrisch</a>.
603 Support contact: Clear Linux package maintainers.</p>
604 </li>
605 <li>
606 <p>Debian Linux: <a href="https://packages.debian.org/sid/fangfrisch">fangfrisch (utils)</a>.
607 Support contact: Debian package maintainers.</p>
608 </li>
609 <li>
610 <p>Gentoo Linux: <a href="https://packages.gentoo.org/packages/app-antivirus/fangfrisch">app-antivirus/fangfrisch</a>.
611 Support contact: Gentoo package maintainers.</p>
612 </li>
613 <li>
614 <p>NixOS: <a href="https://search.nixos.org/packages?type=packages&amp;query=fangfrisch">fangfrisch</a>
615 Support contact: NixOS package maintainers.</p>
616 </li>
617 </ul>
618 </div>
619 </div>
620 </div>
621 <div class="sect1">
622 <h2 id="_configuration"><a class="anchor" href="#_configuration"></a>5. Configuration</h2>
623 <div class="sectionbody">
624 <div class="paragraph">
625 <p>A configuration file is mandatory, uses an INI-File-like structure and must contain a <code>db_url</code> entry.
626 All other settings are optional.
627 However, unless you enable one signature file provider section, Fangfrisch naturally won&#8217;t do much.</p>
628 </div>
629 <div class="paragraph">
630 <p>Use the <code>--conf</code> command line argument (see <a href="#usage">Section 7</a>) to specify the path to your configuration file.
631 Note that there is no default location.</p>
632 </div>
633 <div class="listingblock">
634 <div class="content">
635 <pre># Minimal example configuration, meant for testing.
636
637 [DEFAULT]
638 db_url = sqlite:////var/lib/fangfrisch/db.sqlite
639 local_directory = /var/lib/clamav
640
641 [urlhaus]
642 enabled = yes</pre>
643 </div>
644 </div>
645 <div class="ulist">
646 <ul>
647 <li>
648 <p><strong>cleanup</strong>: Cleanup method used for provider sections.
649 Default: <code>automatic</code>, alternative: <code>disabled</code>.
650 In automatic mode, Fangfrisch will attempt to delete obsolete virus definition files whenever you disable a provider section.
651 Should you disable this option, orphaned files will be left behind, and you need to ensure cleanup by different means.</p>
652 </li>
653 <li>
654 <p><strong>connection_timeout</strong>: Timeout in seconds, used when establishing network connections to download signature files.
655 Default: <code>30</code>.
656 Be aware that longer timeouts increase the risk of multiple Fangfrisch instances running concurrently.
657 This could, in turn, cause database access problems, and network socket congestion.
658 If your Internet connection is fast, I even suggest testing timeout values lower than the default 30 seconds.</p>
659 </li>
660 <li>
661 <p><strong>db_url</strong>: Database URL in <a href="https://docs.sqlalchemy.org/en/13/core/engines.html#supported-databases">SQLAlchemy syntax</a>.
662 Mandatory, no default.
663 Typically, a local <a href="https://www.sqlite.org">SQLite</a> database will suffice.</p>
664 </li>
665 <li>
666 <p><strong>enabled</strong>: Scan this section for URLs?
667 Default: <code>false</code>.</p>
668 </li>
669 <li>
670 <p><strong>integrity_check</strong>: Mechanism for integrity checks.
671 Default: <code>sha256</code>.
672 You can use <code>disabled</code> if the signature file provider offers no checksums.</p>
673 </li>
674 <li>
675 <p><strong>interval</strong>: Interval between downloads.
676 Defaults are provider-dependent.
677 Values can be expressed in human-readable form (e.g. <code>12h</code> or <code>45m</code>).
678 Please respect the limits set by each provider.</p>
679 </li>
680 <li>
681 <p><strong>local_directory</strong>: Downloaded files are stored here.
682 No default, so the current working directory of the Python process is used.
683 As this can vary depending on how you launch Fangfrisch, it is highly recommended to define an absolute path like <code>/var/lib/clamav</code> instead.
684 You can override this option in provider sections to separate downloads based on origin.</p>
685 </li>
686 <li>
687 <p><strong>log_format</strong>: See <a href="https://docs.python.org/3/library/logging.html#logging.Formatter">Formatter class</a> documentation for details.
688 Fangfrisch uses sensible defaults depending on the selected log method.</p>
689 </li>
690 <li>
691 <p><strong>log_level</strong>: Choose one of <code>DEBUG</code>, <code>INFO</code>, <code>WARNING</code> (default), <code>ERROR</code> or <code>FATAL</code>.</p>
692 </li>
693 <li>
694 <p><strong>log_method</strong>: Either <code>console</code> (default, meaning stdout/stderr) or <code>syslog</code>.
695 For the latter, you can also specify a <strong>log_target</strong>.</p>
696 </li>
697 <li>
698 <p><strong>log_target</strong>: The <a href="https://tools.ietf.org/html/rfc5424">syslog</a> target address.
699 Typical values are <code>/dev/log</code> (local Linux domain socket), <code>localhost</code> or <code>host.domain.tld:udpport</code>.
700 If no target is specified, <code>localhost</code> is assumed.
701 The UDP port number defaults to 514.</p>
702 </li>
703 <li>
704 <p><strong>max_size</strong>: Maximum expected file size.
705 The default is <code>10MB</code>, but all predefined providers have individual size limits (see <a href="#internalconf">Appendix A</a>).
706 Values are can be expressed in human-readable form (e.g. <code>250KB</code> or <code>3MB</code>).
707 Fangfrisch attempts to inspect the content length before downloading virus signature files so as not to download files larger than the defined limit.
708 If providers don&#8217;t respond with content length information, Fangfrisch will log a warning but download the data anyway.</p>
709 </li>
710 <li>
711 <p><strong>on_update_exec</strong>: If any files were downloaded during a pass, a command can be executed in after the pass finishes.
712 No default.
713 A typical value is <code>clamdscan --reload</code>.
714 Starting with Fangfrisch 1.9.0, this option may be overridden in individual sections, permitting per-provider actions.</p>
715 </li>
716 <li>
717 <p><strong>on_update_timeout</strong>: Timeout for the <code>on_update_exec</code> command, in seconds.
718 Default: 30.
719 This option may also be overridden in individual sections.</p>
720 </li>
721 </ul>
722 </div>
723 <div class="paragraph">
724 <p><a href="https://docs.python.org/3/library/configparser.html">See here</a> for details about the configuration parser and extended interpolation.
725 <a href="#_semantics">Section 5.3</a> provides additional information on how configuration options are interpreted.</p>
726 </div>
727 <div class="sect2">
728 <h3 id="_default_providers"><a class="anchor" href="#_default_providers"></a>5.1. Default providers</h3>
729 <div class="paragraph">
730 <p>Fangfrisch contains internal defaults for the following providers, listed in alphabetical order:</p>
731 </div>
732 <div class="ulist">
733 <ul>
734 <li>
735 <p><a href="http://sigs.interserver.net/">InterServer</a></p>
736 </li>
737 <li>
738 <p><a href="https://www.malwarepatrol.net">Malwarepatrol</a></p>
739 </li>
740 <li>
741 <p><a href="https://sanesecurity.com">Sanesecurity</a></p>
742 </li>
743 <li>
744 <p><a href="https://www.securiteinfo.com/services/anti-spam-anti-virus/improve-detection-rate-of-zero-day-malwares-for-clamav.shtml">SecuriteInfo</a></p>
745 </li>
746 <li>
747 <p><a href="https://urlhaus.abuse.ch">URLhaus</a></p>
748 </li>
749 </ul>
750 </div>
751 <div class="paragraph">
752 <p>I have also included "Fangfrisch News" (see <a href="#ffnews">Appendix C</a>).
753 Providers can be enabled by specifiying <code>enabled = yes</code> in the desired configuration file sections.</p>
754 </div>
755 <div class="admonitionblock important">
756 <table>
757 <tr>
758 <td class="icon">
759 <div class="title">Important</div>
760 </td>
761 <td class="content">
762 Please make sure to examine the respective settings for yourself before enabling providers.
763 </td>
764 </tr>
765 </table>
766 </div>
767 <div class="paragraph">
768 <p>The defaults may not suit your personal preferences, and some providers require additional configuration, e.g. an access token.</p>
769 </div>
770 <div class="listingblock">
771 <div class="content">
772 <pre># Example configuration
773
774 [DEFAULT]
775 db_url = sqlite:////var/lib/fangfrisch/db.sqlite
776
777 # The following settings are optional. Other sections inherit
778 # values from DEFAULT and may also overwrite values.
779
780 local_directory = /var/lib/clamav
781 max_size = 5MB
782 on_update_exec = clamdscan --reload
783 on_update_timeout = 42
784
785 [interserver]
786 enabled = yes
787
788 [malwarepatrol]
789 enabled = yes
790 # Replace with your personal Malwarepatrol receipt
791 receipt = abcd1234
792
793 [sanesecurity]
794 enabled = yes
795 # Use a non-default mirror
796 prefix = http://mirror.example.com/sanesecurity/
797
798 [securiteinfo]
799 enabled = yes
800 # Replace with your personal SecuriteInfo customer ID
801 customer_id = abcdef123456
802
803 [urlhaus]
804 enabled = yes
805 max_size = 2MB</pre>
806 </div>
807 </div>
808 </div>
809 <div class="sect2">
810 <h3 id="_user_defined_providers"><a class="anchor" href="#_user_defined_providers"></a>5.2. User-defined providers</h3>
811 <div class="paragraph">
812 <p>Fangfrisch is of course not limited to the internal defaults.
813 You can define as many additional virus definition providers as you like.
814 The following defines a fictional provider:</p>
815 </div>
816 <div class="listingblock">
817 <div class="content">
818 <pre>[fictionalprovider]
819 enabled = yes
820 integrity_check = md5
821 interval = 90m
822 prefix = http://fictional-provider.tld/clamav-unofficial/
823
824 # Reference the defined prefix in URL definitions. Values in
825 # other sections can be referenced using ${section:option}.
826 url_eggs = ${prefix}eggs.ndb
827 url_spam = ${prefix}spam.hdb
828
829 # Override local file name for url_spam
830 filename_spam = spam_spam_spam_lovely_spam.db
831
832 # Execute command after each fresh download from url_eggs
833 on_update_eggs = echo Fresh eggs in {path}</pre>
834 </div>
835 </div>
836 </div>
837 <div class="sect2">
838 <h3 id="_semantics"><a class="anchor" href="#_semantics"></a>5.3. Semantics</h3>
839 <div class="paragraph">
840 <p>Fangfrisch will scan enabled sections for lines prefixed with <code>url_</code> to determine download sources for virus definition files.</p>
841 </div>
842 <div class="ulist">
843 <ul>
844 <li>
845 <p>The value of <code>integrity_check</code> determines both the expected filename suffix for digests and the hashing mechanism used for verification.</p>
846 </li>
847 <li>
848 <p>Local file names will be determined by parsing URLs, but can be manually overridden.
849 To change the file name for <code>url_xyz</code>, set <code>filename_xyz</code> to the desired value.</p>
850 </li>
851 <li>
852 <p>To launch a command after data was downloaded for <code>url_xyz</code>, define <code>on_update_xyz</code>.
853 The command string may contain a <code>{path}</code> placeholder, which will be substituted with the full path of the downloaded file.</p>
854 </li>
855 </ul>
856 </div>
857 <div class="paragraph">
858 <p>You can disable refresh operations for selected URLs by assigning either an empty value or setting it to <code>url_xyz = disabled</code>.
859 Note that disabling URLs in this manner does <em>not</em> delete any previously downloaded files.</p>
860 </div>
861 </div>
862 <div class="sect2">
863 <h3 id="_proxy_support"><a class="anchor" href="#_proxy_support"></a>5.4. Proxy support</h3>
864 <div class="paragraph">
865 <p>Fangfrisch relies on the <em>requests</em> library to download files, which supports environment variables like <code>HTTPS_PROXY</code>.
866 Please refer to <a href="https://requests.readthedocs.io/en/latest/user/advanced/#proxies">section Advanced Usage, subsection Proxies</a> in the <em>requests</em> online documentation for details.</p>
867 </div>
868 </div>
869 </div>
870 </div>
871 <div class="sect1">
872 <h2 id="dbsetup"><a class="anchor" href="#dbsetup"></a>6. Preparing the database</h2>
873 <div class="sectionbody">
874 <div class="paragraph">
875 <p>After completing the configuration, make sure to create the database structure by running the <code>initdb</code> command in a root shell as shown below.
876 Running <code>--force initdb</code> will drop existing database tables.
877 For SQLite, deleting the database file is a viable alternative.</p>
878 </div>
879 <div class="listingblock">
880 <div class="content">
881 <pre>sudo -u clamav -- fangfrisch --conf /etc/fangfrisch.conf initdb</pre>
882 </div>
883 </div>
884 <div class="admonitionblock important">
885 <table>
886 <tr>
887 <td class="icon">
888 <div class="title">Important</div>
889 </td>
890 <td class="content">
891 Fangfrisch need never be run as root.
892 Choose an unprivileged user instead (typically <strong>clamav</strong>).
893 </td>
894 </tr>
895 </table>
896 </div>
897 </div>
898 </div>
899 <div class="sect1">
900 <h2 id="usage"><a class="anchor" href="#usage"></a>7. Usage</h2>
901 <div class="sectionbody">
902 <div class="paragraph">
903 <p>Command line arguments are as follows:</p>
904 </div>
905 <div class="listingblock">
906 <div class="content">
907 <pre>usage: fangfrisch [-h] [-c CONF] [-f] [-p PROVIDER]
908 {dumpconf,dumpmappings,initdb,refresh}
909
910 Update and verify unofficial ClamAV signatures.
911
912 positional arguments:
913 {dumpconf,dumpmappings,initdb,refresh}
914
915 options:
916 -h, --help show this help message and exit
917 -c, --conf CONF configuration file
918 -f, --force force action (default: False)
919 -p, --provider PROVIDER
920 provider name filter (regular expression)
921
922 Fangfrisch version 1.9.2. Copyright © 2020-2025 Ralph Seichter.</pre>
923 </div>
924 </div>
925 <div class="paragraph">
926 <p>You can choose among following actions:</p>
927 </div>
928 <div class="ulist">
929 <ul>
930 <li>
931 <p><strong>dumpconf</strong>: Dump the effective configuration to stdout, combining both internal defaults and your own settings.
932 The effective configuration for the example shown in <a href="#_configuration">Section 5</a> is available in <a href="#sampleeff">Appendix B</a>.</p>
933 </li>
934 <li>
935 <p><strong>dumpmappings</strong>: Dump URL-to-filepath mappings, as recorded in the database refresh log, to stdout.
936 See <a href="#dbstructure">Appendix D</a> for details.</p>
937 </li>
938 <li>
939 <p><strong>initdb</strong>: Create the database structure.
940 This needs to be run only once, before the first refresh.
941 Using the <code>--force</code> option will drop existing tables from the database.</p>
942 </li>
943 <li>
944 <p><strong>refresh</strong>: Refresh the configured URLs.
945 The <code>--force</code> option can be used to override download interval settings.</p>
946 </li>
947 </ul>
948 </div>
949 <div class="paragraph">
950 <p>As stated before, Fangfrisch is typically run using cron.
951 Depending on your host OS, you may use a systemd timer as an alternative.
952 An example crontab looks like this:</p>
953 </div>
954 <div class="listingblock">
955 <div class="content">
956 <pre>HOME=/var/lib/fangfrisch
957 LOG_LEVEL=INFO
958 # minute hour day-of-month month day-of-week user command
959 */10 * * * * clamav sleep $((RANDOM \% 42)); venv/bin/fangfrisch --conf /etc/fangfrisch.conf refresh</pre>
960 </div>
961 </div>
962 </div>
963 </div>
964 <div class="sect1">
965 <h2 id="_support"><a class="anchor" href="#_support"></a>8. Support</h2>
966 <div class="sectionbody">
967 <div class="paragraph">
968 <p>The project is hosted on <a href="https://github.com/rseichter/fangfrisch">GitHub</a>.
969 Before opening tickets or contacting the author, <em>always</em> check <a href="https://github.com/rseichter/fangfrisch/issues">existing issues</a> first, including closed ones.
970 This is not meant to discourage you; it just saves time and effort for all involved.
971 Please contact the author <a href="mailto:[email protected]">Ralph Seichter</a> only after having done your own research.
972 Thank you.</p>
973 </div>
974 <div class="sect2">
975 <h3 id="_reporting_possible_problems"><a class="anchor" href="#_reporting_possible_problems"></a>8.1. Reporting possible problems</h3>
976 <div class="paragraph">
977 <p>If you experience problems, please start by trying to figure out underlying issues on your own.
978 Running with DEBUG level logging helps with that.
979 Should your efforts fail, consider filing a GitHub issue.
980 Each issue needs to answer the questions listed below.</p>
981 </div>
982 <div class="paragraph">
983 <p>If you answer question number 1, 2 or 3 with "no", do not file an issue.
984 Please answer all other questions as detailed as you can, within reason.</p>
985 </div>
986 <div class="olist arabic">
987 <ol class="arabic">
988 <li>
989 <p>Have you checked the documentation?</p>
990 </li>
991 <li>
992 <p>Have you checked all existing issues, including closed ones?</p>
993 </li>
994 <li>
995 <p>Have you done your personal best to resolve the issue on your own?</p>
996 </li>
997 <li>
998 <p>What exactly did you do?</p>
999 </li>
1000 <li>
1001 <p>What did you expect to happen?</p>
1002 </li>
1003 <li>
1004 <p>What happened instead?</p>
1005 </li>
1006 <li>
1007 <p>What was your exact setup (operating system, Python core version, Python module versions)?</p>
1008 </li>
1009 </ol>
1010 </div>
1011 </div>
1012 <div class="sect2">
1013 <h3 id="_offering_suggestions"><a class="anchor" href="#_offering_suggestions"></a>8.2. Offering suggestions</h3>
1014 <div class="paragraph">
1015 <p>The list of questions is shorter, but important nonetheless:</p>
1016 </div>
1017 <div class="olist arabic">
1018 <ol class="arabic">
1019 <li>
1020 <p>Have you checked the documentation?</p>
1021 </li>
1022 <li>
1023 <p>Have you checked all existing issues, including closed ones?</p>
1024 </li>
1025 <li>
1026 <p>Do you consider the suggested feature helpful for more people than just yourself?</p>
1027 </li>
1028 </ol>
1029 </div>
1030 <div class="paragraph">
1031 <p>If you answered "yes" for all questions, please explain your idea in a sufficiently thorough manner.
1032 Use examples, graphics, and whatever else you think would help others to understand your suggestion.</p>
1033 </div>
1034 </div>
1035 <div class="sect2">
1036 <h3 id="_discussion_precedes_contribution"><a class="anchor" href="#_discussion_precedes_contribution"></a>8.3. Discussion precedes contribution</h3>
1037 <div class="paragraph">
1038 <p>I do not accept any code or documentation contributions which have not been previously agreed upon.
1039 This means the order of steps is as follows:</p>
1040 </div>
1041 <div class="olist arabic">
1042 <ol class="arabic">
1043 <li>
1044 <p>Open an issue or discussion topic first.</p>
1045 </li>
1046 <li>
1047 <p>Have a conversation about the matter at hand.</p>
1048 </li>
1049 <li>
1050 <p>Reach a consensus about both form and content of the contribution.</p>
1051 </li>
1052 <li>
1053 <p>Wait for a yay/nay signal from me.</p>
1054 </li>
1055 </ol>
1056 </div>
1057 <div class="paragraph">
1058 <p>Please do <em>not</em> submit any pull requests before I ask for them, as they will be closed.
1059 This outlined, proven practice will save time for all involved.
1060 See Heather McNamee&#8217;s blog <a href="https://about.gitlab.com/blog/2016/03/03/start-with-an-issue/">Always start with an issue</a> for more information.</p>
1061 </div>
1062 </div>
1063 </div>
1064 </div>
1065 <div class="sect1">
1066 <h2 id="internalconf"><a class="anchor" href="#internalconf"></a>Appendix A: Default configuration</h2>
1067 <div class="sectionbody">
1068 <div class="paragraph">
1069 <p>Fangfrisch contains the following internal configuration settings as defaults.
1070 As a safety measure, all sections are disabled by default.
1071 Entries with the <code>!url_</code> prefix are included for reference only.
1072 These represent data sources which are not recommended for general use.
1073 Possible reasons: Some sources have an elevated risk of false positives, are not free to use, or contain legacy data.
1074 Enabling a section will not enable these specially prefixed entries.</p>
1075 </div>
1076 <div class="listingblock">
1077 <div class="content">
1078 <pre>[DEFAULT]
1079 cleanup = automatic
1080 enabled = no
1081 integrity_check = sha256
1082 log_level = WARNING
1083 log_method = console
1084 max_size = 10MB
1085
1086 [fangfrischnews]
1087 interval = 12h
1088 local_directory = /tmp
1089 max_size = 100KB
1090 script = /path/to/fangfrisch-has-news.sh
1091 on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
1092 prefix = https://www.seichter.de/fangfrisch/
1093 url_alerts = ${prefix}fangfrisch_alerts.txt
1094 url_news = ${prefix}fangfrisch_news.txt
1095
1096 [interserver]
1097 interval = 1h
1098 integrity_check = disabled
1099 max_size = 5MB
1100 prefix = http://sigs.interserver.net/
1101 !url_shell_hdb = ${prefix}shell.hdb
1102 !url_shellb_db = ${prefix}shellb.db
1103 url_interserver256 = ${prefix}interserver256.hdb
1104 url_shell_ldb = ${prefix}shell.ldb
1105 filename_shell_ldb = interservershell.ldb
1106 url_topline = ${prefix}interservertopline.db
1107 url_whitelist_fp = ${prefix}whitelist.fp
1108 filename_whitelist_fp = interserverwhitelist.fp
1109
1110 [malwarepatrol]
1111 interval = 1d
1112 integrity_check = disabled
1113 product = 8
1114 receipt = you_forgot_to_configure_receipt
1115 prefix = https://lists.malwarepatrol.net/cgi/getfile?product=${product}&amp;receipt=${receipt}&amp;list=
1116 url_clamav_basic = ${prefix}clamav_basic
1117 filename_clamav_basic = malwarepatrol.db
1118
1119 [sanesecurity]
1120 interval = 1h
1121 prefix = http://mirror.seichter.de/sanesecurity/
1122 !url_foxhole_all_cdb = ${prefix}foxhole_all.cdb
1123 !url_foxhole_all_ndb = ${prefix}foxhole_all.ndb
1124 !url_foxhole_links = ${prefix}foxhole_links.ldb
1125 !url_foxhole_mail = ${prefix}foxhole_mail.cdb
1126 !url_winnow_phish_complete = ${prefix}winnow_phish_complete.ndb
1127 url_badmacro = ${prefix}badmacro.ndb
1128 url_blurl = ${prefix}blurl.ndb
1129 url_bofhland_cracked_url = ${prefix}bofhland_cracked_URL.ndb
1130 url_bofhland_malware_attach = ${prefix}bofhland_malware_attach.hdb
1131 url_bofhland_malware_url = ${prefix}bofhland_malware_URL.ndb
1132 url_bofhland_phishing_url = ${prefix}bofhland_phishing_URL.ndb
1133 url_foxhole_filename = ${prefix}foxhole_filename.cdb
1134 url_foxhole_generic = ${prefix}foxhole_generic.cdb
1135 url_foxhole_js_cdb = ${prefix}foxhole_js.cdb
1136 url_foxhole_js_ndb = ${prefix}foxhole_js.ndb
1137 url_hackingteam = ${prefix}hackingteam.hsb
1138 url_junk = ${prefix}junk.ndb
1139 url_jurlbl = ${prefix}jurlbl.ndb
1140 url_jurlbla = ${prefix}jurlbla.ndb
1141 url_lott = ${prefix}lott.ndb
1142 url_malwareexpert_fp = ${prefix}malware.expert.fp
1143 url_malwareexpert_hdb = ${prefix}malware.expert.hdb
1144 url_malwareexpert_ldb = ${prefix}malware.expert.ldb
1145 url_malwareexpert_ndb = ${prefix}malware.expert.ndb
1146 url_malwarehash = ${prefix}malwarehash.hsb
1147 url_phish = ${prefix}phish.ndb
1148 url_phishtank = ${prefix}phishtank.ndb
1149 url_porcupine = ${prefix}porcupine.ndb
1150 url_rogue = ${prefix}rogue.hdb
1151 url_scam = ${prefix}scam.ndb
1152 url_shelter = ${prefix}shelter.ldb
1153 url_sigwhitelist = ${prefix}sigwhitelist.ign2
1154 url_spamattach = ${prefix}spamattach.hdb
1155 url_spamimg = ${prefix}spamimg.hdb
1156 url_spear = ${prefix}spear.ndb
1157 url_spearl = ${prefix}spearl.ndb
1158 url_ssftm = ${prefix}sanesecurity.ftm
1159 url_winnow_attachments = ${prefix}winnow.attachments.hdb
1160 url_winnow_bad_cw = ${prefix}winnow_bad_cw.hdb
1161 url_winnow_extended_malware = ${prefix}winnow_extended_malware.hdb
1162 url_winnow_extended_malware_links = ${prefix}winnow_extended_malware_links.ndb
1163 url_winnow_malware = ${prefix}winnow_malware.hdb
1164 url_winnow_malware_links = ${prefix}winnow_malware_links.ndb
1165 url_winnow_phish_complete_url = ${prefix}winnow_phish_complete_url.ndb
1166 url_winnow_spam_complete = ${prefix}winnow_spam_complete.ndb
1167
1168 [securiteinfo]
1169 customer_id = you_forgot_to_configure_customer_id
1170 interval = 1h
1171 max_size = 20MB
1172 prefix = https://www.securiteinfo.com/get/signatures/${customer_id}/
1173 !url_0hour = ${prefix}securiteinfo0hour.hdb
1174 !url_old = ${prefix}securiteinfoold.hdb
1175 !url_securiteinfo_mdb = ${prefix}securiteinfo.mdb
1176 !url_securiteinfo_pdb = ${prefix}securiteinfo.pdb
1177 !url_securiteinfo_yara = ${prefix}securiteinfo.yara
1178 url_android = ${prefix}securiteinfoandroid.hdb
1179 url_ascii = ${prefix}securiteinfoascii.hdb
1180 url_html = ${prefix}securiteinfohtml.hdb
1181 url_javascript = ${prefix}javascript.ndb
1182 url_pdf = ${prefix}securiteinfopdf.hdb
1183 url_securiteinfo = ${prefix}securiteinfo.hdb
1184 url_securiteinfo_ign2 = ${prefix}securiteinfo.ign2
1185 url_spam_marketing = ${prefix}spam_marketing.ndb
1186
1187 [urlhaus]
1188 interval = 10m
1189 url_urlhaus = https://urlhaus.abuse.ch/downloads/urlhaus.ndb</pre>
1190 </div>
1191 </div>
1192 </div>
1193 </div>
1194 <div class="sect1">
1195 <h2 id="sampleeff"><a class="anchor" href="#sampleeff"></a>Appendix B: Effective configuration</h2>
1196 <div class="sectionbody">
1197 <div class="paragraph">
1198 <p>The following effective configuration is the result of combining internal defaults (see <a href="#internalconf">Appendix A</a>) with the example settings shown in <a href="#_configuration">Section 5</a>.</p>
1199 </div>
1200 <div class="listingblock">
1201 <div class="content">
1202 <pre>[DEFAULT]
1203 cleanup = automatic
1204 enabled = no
1205 integrity_check = sha256
1206 log_level = WARNING
1207 log_method = console
1208 max_size = 5MB
1209 db_url = sqlite:////var/lib/fangfrisch/db.sqlite
1210 local_directory = /var/lib/clamav
1211 on_update_exec = clamdscan --reload
1212 on_update_timeout = 42
1213
1214 [fangfrischnews]
1215 interval = 12h
1216 local_directory = /tmp
1217 max_size = 100KB
1218 script = /path/to/fangfrisch-has-news.sh
1219 on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
1220 prefix = https://www.seichter.de/fangfrisch/
1221 url_alerts = ${prefix}fangfrisch_alerts.txt
1222 url_news = ${prefix}fangfrisch_news.txt
1223
1224 [interserver]
1225 interval = 1h
1226 integrity_check = disabled
1227 max_size = 5MB
1228 prefix = http://sigs.interserver.net/
1229 !url_shell_hdb = ${prefix}shell.hdb
1230 !url_shellb_db = ${prefix}shellb.db
1231 url_interserver256 = ${prefix}interserver256.hdb
1232 url_shell_ldb = ${prefix}shell.ldb
1233 filename_shell_ldb = interservershell.ldb
1234 url_topline = ${prefix}interservertopline.db
1235 url_whitelist_fp = ${prefix}whitelist.fp
1236 filename_whitelist_fp = interserverwhitelist.fp
1237 enabled = yes
1238
1239 [malwarepatrol]
1240 interval = 1d
1241 integrity_check = disabled
1242 product = 8
1243 receipt = abcd1234
1244 prefix = https://lists.malwarepatrol.net/cgi/getfile?product=${product}&amp;receipt=${receipt}&amp;list=
1245 url_clamav_basic = ${prefix}clamav_basic
1246 filename_clamav_basic = malwarepatrol.db
1247 enabled = yes
1248
1249 [sanesecurity]
1250 interval = 1h
1251 prefix = http://mirror.example.com/sanesecurity/
1252 !url_foxhole_all_cdb = ${prefix}foxhole_all.cdb
1253 !url_foxhole_all_ndb = ${prefix}foxhole_all.ndb
1254 !url_foxhole_links = ${prefix}foxhole_links.ldb
1255 !url_foxhole_mail = ${prefix}foxhole_mail.cdb
1256 !url_winnow_phish_complete = ${prefix}winnow_phish_complete.ndb
1257 url_badmacro = ${prefix}badmacro.ndb
1258 url_blurl = ${prefix}blurl.ndb
1259 url_bofhland_cracked_url = ${prefix}bofhland_cracked_URL.ndb
1260 url_bofhland_malware_attach = ${prefix}bofhland_malware_attach.hdb
1261 url_bofhland_malware_url = ${prefix}bofhland_malware_URL.ndb
1262 url_bofhland_phishing_url = ${prefix}bofhland_phishing_URL.ndb
1263 url_foxhole_filename = ${prefix}foxhole_filename.cdb
1264 url_foxhole_generic = ${prefix}foxhole_generic.cdb
1265 url_foxhole_js_cdb = ${prefix}foxhole_js.cdb
1266 url_foxhole_js_ndb = ${prefix}foxhole_js.ndb
1267 url_hackingteam = ${prefix}hackingteam.hsb
1268 url_junk = ${prefix}junk.ndb
1269 url_jurlbl = ${prefix}jurlbl.ndb
1270 url_jurlbla = ${prefix}jurlbla.ndb
1271 url_lott = ${prefix}lott.ndb
1272 url_malwareexpert_fp = ${prefix}malware.expert.fp
1273 url_malwareexpert_hdb = ${prefix}malware.expert.hdb
1274 url_malwareexpert_ldb = ${prefix}malware.expert.ldb
1275 url_malwareexpert_ndb = ${prefix}malware.expert.ndb
1276 url_malwarehash = ${prefix}malwarehash.hsb
1277 url_phish = ${prefix}phish.ndb
1278 url_phishtank = ${prefix}phishtank.ndb
1279 url_porcupine = ${prefix}porcupine.ndb
1280 url_rogue = ${prefix}rogue.hdb
1281 url_scam = ${prefix}scam.ndb
1282 url_shelter = ${prefix}shelter.ldb
1283 url_sigwhitelist = ${prefix}sigwhitelist.ign2
1284 url_spamattach = ${prefix}spamattach.hdb
1285 url_spamimg = ${prefix}spamimg.hdb
1286 url_spear = ${prefix}spear.ndb
1287 url_spearl = ${prefix}spearl.ndb
1288 url_ssftm = ${prefix}sanesecurity.ftm
1289 url_winnow_attachments = ${prefix}winnow.attachments.hdb
1290 url_winnow_bad_cw = ${prefix}winnow_bad_cw.hdb
1291 url_winnow_extended_malware = ${prefix}winnow_extended_malware.hdb
1292 url_winnow_extended_malware_links = ${prefix}winnow_extended_malware_links.ndb
1293 url_winnow_malware = ${prefix}winnow_malware.hdb
1294 url_winnow_malware_links = ${prefix}winnow_malware_links.ndb
1295 url_winnow_phish_complete_url = ${prefix}winnow_phish_complete_url.ndb
1296 url_winnow_spam_complete = ${prefix}winnow_spam_complete.ndb
1297 enabled = yes
1298
1299 [securiteinfo]
1300 customer_id = abcdef123456
1301 interval = 1h
1302 max_size = 20MB
1303 prefix = https://www.securiteinfo.com/get/signatures/${customer_id}/
1304 !url_0hour = ${prefix}securiteinfo0hour.hdb
1305 !url_old = ${prefix}securiteinfoold.hdb
1306 !url_securiteinfo_mdb = ${prefix}securiteinfo.mdb
1307 !url_securiteinfo_pdb = ${prefix}securiteinfo.pdb
1308 !url_securiteinfo_yara = ${prefix}securiteinfo.yara
1309 url_android = ${prefix}securiteinfoandroid.hdb
1310 url_ascii = ${prefix}securiteinfoascii.hdb
1311 url_html = ${prefix}securiteinfohtml.hdb
1312 url_javascript = ${prefix}javascript.ndb
1313 url_pdf = ${prefix}securiteinfopdf.hdb
1314 url_securiteinfo = ${prefix}securiteinfo.hdb
1315 url_securiteinfo_ign2 = ${prefix}securiteinfo.ign2
1316 url_spam_marketing = ${prefix}spam_marketing.ndb
1317 enabled = yes
1318
1319 [urlhaus]
1320 interval = 10m
1321 url_urlhaus = https://urlhaus.abuse.ch/downloads/urlhaus.ndb
1322 enabled = yes
1323 max_size = 2MB</pre>
1324 </div>
1325 </div>
1326 </div>
1327 </div>
1328 <div class="sect1">
1329 <h2 id="ffnews"><a class="anchor" href="#ffnews"></a>Appendix C: Fangfrisch News</h2>
1330 <div class="sectionbody">
1331 <div class="paragraph">
1332 <p>This pseudo provider does not offer antivirus signature files.
1333 It is only meant for me to pass news about Fangfrisch to you, the user, in lieu of a mailing list.
1334 Don&#8217;t expect this to happen on a regular basis.
1335 I am only thinking about release notifications at this point in time.
1336 Still, I kindly ask you to please enable this service by adding the following to your configuration file:</p>
1337 </div>
1338 <div class="listingblock">
1339 <div class="content">
1340 <pre>[fangfrischnews]
1341 enabled = yes
1342 # Uncomment/adapt the following to trigger a script in case of news.
1343 # script = /path/to/script/fangfrisch-has-news.sh</pre>
1344 </div>
1345 </div>
1346 <div class="paragraph">
1347 <p>This will only enable Fangfrisch to occasionally download small text files, nothing more.
1348 You will not need to read the content, nor will anything else happen, unless you modify the <code>script</code> option.
1349 Here is an example script which you could use to have downloaded news items mailed to you.
1350 It needs to be readable for the user account running Fangfrisch, and the sender/recipient addresses obviously have to be adapted.
1351 For your convenience, the latest version of the script can be <a href="https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh">downloaded here</a>.</p>
1352 </div>
1353 <div class="listingblock">
1354 <div class="content">
1355 <pre>#!/usr/bin/env bash
1356 # vim: ts=4 sw=4 noet ft=sh
1357 #
1358 # Example script to process Fangfrisch News.
1359
1360 declare -r MAILFROM="noreply"
1361 declare -r MAILTO="[email protected]"
1362 declare -r SUBJECT="Fangfrisch News are available"
1363
1364 # Choose one of the options below and uncomment the 'declare'
1365 # statements. Until this is done, the script will fail with
1366 # an error message.
1367
1368 # Option 1: Mutt
1369 #declare -r MAILAPP="mutt"
1370 #declare -r MAILAPP_OPT=( "-s" "$SUBJECT" "$MAILTO" )
1371
1372 # Option 2: sendmail
1373 #declare -r MAILAPP="sendmail"
1374 #declare -r MAILAPP_OPT=( "-t" )
1375 #export PATH="$PATH:/usr/sbin"
1376
1377 # Option 3: swaks
1378 #declare -r MAILAPP="swaks"
1379 #declare -r MAILAPP_OPT=( "-d" "-" "-f" "$MAILFROM" "-t" "$MAILTO" )
1380
1381 ### No changes required below this line ###
1382
1383 set -euo pipefail
1384
1385 die() {
1386 echo &gt;&amp;2 "$@"
1387 exit 1
1388 }
1389
1390 usage() {
1391 die "Usage: $(basename "$0") {directory}"
1392 }
1393
1394 gen_header() {
1395 cat &lt;&lt;EOT
1396 Auto-Submitted: auto-generated
1397 From: Fangfrisch News &lt;$MAILFROM&gt;
1398 To: $MAILTO
1399 Subject: $SUBJECT
1400
1401 EOT
1402 # Mail header must end with an empty line!
1403 }
1404
1405 declare -a NEWSITEMS=()
1406
1407 report_news() {
1408 local dir=$1 ni
1409 [ -d "$dir" ] || die "$dir is not a directory"
1410 while IFS= read -r -d '' ni; do
1411 if [ ${#NEWSITEMS[*]} -eq 0 ] &amp;&amp; [ "$MAILAPP" != mutt ]; then
1412 # Mutt does not need the header, others do.
1413 gen_header
1414 fi
1415 NEWSITEMS+=("$ni")
1416 echo -e "\n### $(basename "$ni"):\n"
1417 cat "$ni"
1418 done &lt; &lt;(find "$dir" -maxdepth 1 -type f -name "fangfrisch*.txt" -print0)
1419 }
1420
1421 main() {
1422 local t
1423 [ -n "$MAILAPP" ] || die "MAILAPP is undefined, exiting."
1424 if tty -s; then
1425 # Running in a terminal session
1426 t=$(mktemp)
1427 # shellcheck disable=SC2064
1428 trap "rm $t" EXIT
1429 report_news "$@" | tee "$t" || exit 1
1430 [ ! -s "$t" ] || "$MAILAPP" "${MAILAPP_OPT[@]}" &gt;/dev/null &lt;"$t"
1431 else
1432 report_news "$@" 2&gt;&amp;1 | "$MAILAPP" "${MAILAPP_OPT[@]}" &gt;/dev/null
1433 [ ${#NEWSITEMS[*]} -eq 0 ] || rm -v "${NEWSITEMS[@]}"
1434 fi
1435 }
1436
1437 [ $# -ge 1 ] || usage
1438 main "$@"</pre>
1439 </div>
1440 </div>
1441 </div>
1442 </div>
1443 <div class="sect1">
1444 <h2 id="dbstructure"><a class="anchor" href="#dbstructure"></a>Appendix D: Database structure</h2>
1445 <div class="sectionbody">
1446 <div class="paragraph">
1447 <p>While users can technically access the Fangfrisch backend database directly, its structure and content are considered <strong>private</strong>.
1448 They may change at any time, without notice.</p>
1449 </div>
1450 <div class="sect2">
1451 <h3 id="_accessing_mappings"><a class="anchor" href="#_accessing_mappings"></a>D.1. Accessing mappings</h3>
1452 <div class="paragraph">
1453 <p>In contrast to direct database access, the <strong>dumpmappings</strong> action allows accessing selected parts of database entries in a stable manner.
1454 Specifically, it returns 3-tuples (provider name, URL, local file path).
1455 Elements are separated by horizontal tabulators to facilitate piping the output into <code>awk</code> or similar utilities.
1456 If specified, the <code>provider</code> option is interpreted as a regular expression, and only DB records with matching provider column are returned.
1457 That means if you have providers <em>foo</em> and <em>foobar</em>, you need to use anchoring (e.g. <code>^foo$</code>) if you only wish to match entries for the former provider.
1458 Make sure to use quoting as required by your shell.
1459 Example usage:</p>
1460 </div>
1461 <div class="listingblock">
1462 <div class="content">
1463 <pre># Print all recorded mappings for the [example] provider section.
1464 fangfrisch --conf /etc/fangfrisch.conf --provider '^example$' dumpmappings</pre>
1465 </div>
1466 </div>
1467 <div class="listingblock">
1468 <div class="content">
1469 <pre># Delete all files that were downloaded by Fangfrisch.
1470 # DON'T EXECUTE THIS UNLESS YOU REALLY MEAN IT!
1471 fangfrisch --conf /etc/fangfrisch.conf dumpmappings | awk '{print $3}' | xargs /bin/rm</pre>
1472 </div>
1473 </div>
1474 </div>
1475 </div>
1476 </div>
1477 </div>
1478 <div id="footer">
1479 <div id="footer-text">
1480 1.9.2<br>
1481 </div>
1482 </div>
1483 </body>
1484 </html>