assemblyline-service-client 4.6.1.dev136__py3-none-any.whl → 4.6.1.dev138__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of assemblyline-service-client might be problematic. Click here for more details.
- assemblyline_service_client/VERSION +1 -1
- assemblyline_service_client/task_handler.py +9 -1
- {assemblyline_service_client-4.6.1.dev136.dist-info → assemblyline_service_client-4.6.1.dev138.dist-info}/METADATA +1 -1
- assemblyline_service_client-4.6.1.dev138.dist-info/RECORD +8 -0
- assemblyline_service_client-4.6.1.dev136.dist-info/RECORD +0 -8
- {assemblyline_service_client-4.6.1.dev136.dist-info → assemblyline_service_client-4.6.1.dev138.dist-info}/WHEEL +0 -0
- {assemblyline_service_client-4.6.1.dev136.dist-info → assemblyline_service_client-4.6.1.dev138.dist-info}/licenses/LICENCE.md +0 -0
- {assemblyline_service_client-4.6.1.dev136.dist-info → assemblyline_service_client-4.6.1.dev138.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
4.6.1.
|
|
1
|
+
4.6.1.dev138
|
|
@@ -12,11 +12,13 @@ from typing import Any, Optional
|
|
|
12
12
|
|
|
13
13
|
import requests
|
|
14
14
|
import yaml
|
|
15
|
+
from assemblyline_core.server_base import ServerBase
|
|
16
|
+
|
|
15
17
|
from assemblyline.common.digests import get_sha256_for_file
|
|
16
18
|
from assemblyline.common.str_utils import StringTable
|
|
19
|
+
from assemblyline.odm import SHA256_REGEX
|
|
17
20
|
from assemblyline.odm.messages.task import Task as ServiceTask
|
|
18
21
|
from assemblyline.odm.models.service import Service
|
|
19
|
-
from assemblyline_core.server_base import ServerBase
|
|
20
22
|
|
|
21
23
|
STATUSES = StringTable('STATUSES', [
|
|
22
24
|
('INITIALIZING', 0),
|
|
@@ -365,6 +367,12 @@ class TaskHandler(ServerBase):
|
|
|
365
367
|
return task
|
|
366
368
|
|
|
367
369
|
def download_file(self, sha256, sid) -> Optional[str]:
|
|
370
|
+
if not SHA256_REGEX.match(sha256):
|
|
371
|
+
# If the SHA256 is not valid, we cannot download the file
|
|
372
|
+
self.log.error(f"[{sid}] Invalid SHA256 provided: {sha256}")
|
|
373
|
+
self.status = STATUSES.ERROR_FOUND
|
|
374
|
+
return None
|
|
375
|
+
|
|
368
376
|
self.status = STATUSES.DOWNLOADING_FILE
|
|
369
377
|
received_file_sha256 = ''
|
|
370
378
|
file_path = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: assemblyline-service-client
|
|
3
|
-
Version: 4.6.1.
|
|
3
|
+
Version: 4.6.1.dev138
|
|
4
4
|
Summary: Assemblyline 4 - Service client
|
|
5
5
|
Home-page: https://github.com/CybercentreCanada/assemblyline-service-client/
|
|
6
6
|
Author: CCCS Assemblyline development team
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
assemblyline_service_client/VERSION,sha256=u_nQXjGiaWrxuDT-5BHni2PZfcXepixHJLMu7qoQ7Js,13
|
|
2
|
+
assemblyline_service_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
assemblyline_service_client/task_handler.py,sha256=k6RFFNIO9W6lukWF076Jps31UzXTJHE2VQZWMN0947Q,23848
|
|
4
|
+
assemblyline_service_client-4.6.1.dev138.dist-info/licenses/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
5
|
+
assemblyline_service_client-4.6.1.dev138.dist-info/METADATA,sha256=NTHQFZYrILv8uZo6CnEc2BWLPA4fQXapS1e1qZ1jmvA,1677
|
|
6
|
+
assemblyline_service_client-4.6.1.dev138.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
assemblyline_service_client-4.6.1.dev138.dist-info/top_level.txt,sha256=clNWHvn8nw0kR15l5TASxWxIQvKGKe5Pso3kVPMiJv0,28
|
|
8
|
+
assemblyline_service_client-4.6.1.dev138.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
assemblyline_service_client/VERSION,sha256=JKSD1AXttAaPMmok1BPbJjwg_UrmIcDeQa2FSw4q3Ak,13
|
|
2
|
-
assemblyline_service_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
assemblyline_service_client/task_handler.py,sha256=XB2vSF-Zmff0veX6JOFqVPex7pNkxsZCNuhtY3LvRcM,23547
|
|
4
|
-
assemblyline_service_client-4.6.1.dev136.dist-info/licenses/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
5
|
-
assemblyline_service_client-4.6.1.dev136.dist-info/METADATA,sha256=ZcZJzbU0o-YNUqmE1gShsiTqnHooOkLl9ctZWmEx1HU,1677
|
|
6
|
-
assemblyline_service_client-4.6.1.dev136.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
assemblyline_service_client-4.6.1.dev136.dist-info/top_level.txt,sha256=clNWHvn8nw0kR15l5TASxWxIQvKGKe5Pso3kVPMiJv0,28
|
|
8
|
-
assemblyline_service_client-4.6.1.dev136.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|