@@ -23,27 +23,24 @@ class filedownload(BaseModule):
23
23
"bashrc" , # Bash Script or Configuration
24
24
"conf" , # Configuration File
25
25
"cfg" , # Configuration File
26
- "cr2" , # Canon RAW Image
27
26
"crt" , # Certificate File
28
- "crw" , # Canon RAW Image (Older Format)
29
27
"csv" , # Comma Separated Values File
30
28
"db" , # SQLite Database File
31
29
"sqlite" , # SQLite Database File
32
30
"doc" , # Microsoft Word Document (Old Format)
33
31
"docx" , # Microsoft Word Document
32
+ "exe" , # Windows PE executable
34
33
"ica" , # Citrix Independent Computing Architecture File
35
34
"indd" , # Adobe InDesign Document
36
35
"ini" , # Initialization File
37
36
"jar" , # Java Archive
38
- "jpg" , # JPEG Image
39
- "jpeg" , # JPEG Image
40
- "js" , # JavaScript File
41
37
"json" , # JavaScript Object Notation File
42
38
"key" , # Private Key File
43
39
"pub" , # Public Key File
44
40
"log" , # Log File
45
- "md" , # Markdown File
46
41
"markdown" , # Markdown File
42
+ "md" , # Markdown File
43
+ "msi" , # Windows setup file
47
44
"odg" , # OpenDocument Graphics (LibreOffice, OpenOffice)
48
45
"odp" , # OpenDocument Presentation (LibreOffice, OpenOffice)
49
46
"ods" , # OpenDocument Spreadsheet (LibreOffice, OpenOffice)
@@ -60,8 +57,6 @@ class filedownload(BaseModule):
60
57
"rdp" , # Remote Desktop Protocol File
61
58
"sh" , # Shell Script
62
59
"sql" , # SQL Database Dump
63
- "svg" , # Scalable Vector Graphics
64
- "svgz" , # Compressed SVG
65
60
"swp" , # Swap File (temporary file, often Vim)
66
61
"sxw" , # OpenOffice.org Writer document
67
62
"tar" , # Tar Archive
@@ -154,9 +149,10 @@ def make_filename(self, url, content_type=None):
154
149
if not extension :
155
150
if content_type and content_type in self .mime_db :
156
151
extension = self .mime_db [content_type ]
157
- else :
158
- self .debug (f'Extension "{ extension } " at url "{ url } " not in list of watched extensions.' )
159
- return None , None , None
152
+
153
+ if (not extension ) or (extension not in self .extensions ):
154
+ self .debug (f'Extension "{ extension } " at url "{ url } " not in list of watched extensions.' )
155
+ return None , None , None
160
156
161
157
orig_filename = Path (url_path ).stem
162
158
if extension :
0 commit comments