assemblyline-v4-service 4.4.1.dev226__py3-none-any.whl → 4.4.1.dev230__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-v4-service might be problematic. Click here for more details.

@@ -1 +1 @@
1
- 4.4.1.dev226
1
+ 4.4.1.dev230
@@ -39,6 +39,11 @@ BODY_FORMAT = StringTable('BODY_FORMAT', [
39
39
  ('TIMELINE', 12)
40
40
  ])
41
41
 
42
+ PROMOTE_TO = StringTable('PROMOTE_TO', [
43
+ ('SCREENSHOT', 0),
44
+ ('ENTROPY', 1)
45
+ ])
46
+
42
47
 
43
48
  class InvalidHeuristicException(Exception):
44
49
  pass
@@ -407,7 +412,6 @@ class TableSectionBody(SectionBody):
407
412
  self._config = {'column_order': order}
408
413
 
409
414
 
410
-
411
415
  class ImageSectionBody(SectionBody):
412
416
  def __init__(self, request: ServiceRequest) -> None:
413
417
  self._request = request
@@ -484,6 +488,7 @@ class ResultSection:
484
488
  self.zeroize_on_tag_safe = zeroize_on_tag_safe
485
489
  self.auto_collapse = auto_collapse
486
490
  self.zeroize_on_sig_safe = zeroize_on_sig_safe
491
+ self._promote_to = None
487
492
 
488
493
  if isinstance(title_text, list):
489
494
  title_text = ''.join(title_text)
@@ -517,6 +522,10 @@ class ResultSection:
517
522
  def heuristic(self):
518
523
  return self._heuristic
519
524
 
525
+ @property
526
+ def promote_to(self):
527
+ return self._promote_to
528
+
520
529
  @property
521
530
  def subsections(self):
522
531
  return self._subsections
@@ -681,6 +690,9 @@ class ResultGraphSection(TypeSpecificResultSection):
681
690
  def set_colormap(self, cmap_min: int, cmap_max: int, values: List[int]) -> None:
682
691
  self.section_body.set_colormap(cmap_min, cmap_max, values)
683
692
 
693
+ def promote_as_entropy(self):
694
+ self._promote_to = PROMOTE_TO.ENTROPY
695
+
684
696
 
685
697
  class ResultURLSection(TypeSpecificResultSection):
686
698
  def __init__(self, title_text: Union[str, List], **kwargs):
@@ -764,6 +776,9 @@ class ResultImageSection(TypeSpecificResultSection):
764
776
 
765
777
  return ocr_section
766
778
 
779
+ def promote_as_screenshot(self):
780
+ self._promote_to = PROMOTE_TO.SCREENSHOT
781
+
767
782
 
768
783
  class ResultTimelineSection(TypeSpecificResultSection):
769
784
  def __init__(self, title_text: Union[str, List], **kwargs):
@@ -802,7 +817,8 @@ class Result:
802
817
  tags=unflatten(section.tags),
803
818
  title_text=section.title_text,
804
819
  zeroize_on_tag_safe=section.zeroize_on_tag_safe,
805
- auto_collapse=section.auto_collapse
820
+ auto_collapse=section.auto_collapse,
821
+ promote_to=section.promote_to
806
822
  ))
807
823
 
808
824
  def _flatten_sections(self, section: ResultSection, root: bool = True) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: assemblyline-v4-service
3
- Version: 4.4.1.dev226
3
+ Version: 4.4.1.dev230
4
4
  Summary: Assemblyline 4 - Service base
5
5
  Home-page: https://github.com/CybercentreCanada/assemblyline-v4-service/
6
6
  Author: CCCS Assemblyline development team
@@ -1,4 +1,4 @@
1
- assemblyline_v4_service/VERSION,sha256=EB5Y2GlVD6c-QH3uF7FS3hlZMmK1DIRn6KZT0BAELTQ,13
1
+ assemblyline_v4_service/VERSION,sha256=mSbg-uE2Y5EbQ2Tqr0iXBZJhzGuCJMaRX9ddLVtEx1c,13
2
2
  assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  assemblyline_v4_service/healthz.py,sha256=sS1cFkDLw8hUPMpj7tbHXFv8ZmHcazrwZ0l6oQDwwkQ,1575
4
4
  assemblyline_v4_service/run_privileged_service.py,sha256=9uTfHetXR5G-EDKMDrgfWUOw34yr64-cj6Cm9eZaCbQ,14547
@@ -10,7 +10,7 @@ assemblyline_v4_service/common/helper.py,sha256=xs9quuf-M1JOdKieBqOmWaOece0CtzXF
10
10
  assemblyline_v4_service/common/ocr.py,sha256=gFPVAGVsmVk4SKL7hCMCT7NEyG-lFLniEFQup6WtCsc,4384
11
11
  assemblyline_v4_service/common/ontology_helper.py,sha256=Wao4VZ_YrlmLd3-CXwqsK6c5VTiVZ89CKEhZOgZrm0Q,7792
12
12
  assemblyline_v4_service/common/request.py,sha256=zgmKvYnK1KcBWsQQUZmeBXGIi-P5m3ltxqGY2Xo696c,9764
13
- assemblyline_v4_service/common/result.py,sha256=qOwyFP4zJMpngZWDIuc0bFN-tNjLuPP2RDOgkPNwEXI,30349
13
+ assemblyline_v4_service/common/result.py,sha256=3d--Xa0dSqfXUVTeLG3WUU0geYG4xsmx7Ukz7XlnPEw,30751
14
14
  assemblyline_v4_service/common/task.py,sha256=22dl6FiQwqeL0CxkSzmHn9mKSL5xf9zE5QjxT-nDLs4,12504
15
15
  assemblyline_v4_service/common/utils.py,sha256=71ndFdbdfCeRCM-eYs1htKqJ-1miiWbsF_UgHnKKNZ4,3112
16
16
  assemblyline_v4_service/dev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,8 +22,8 @@ assemblyline_v4_service/updater/client.py,sha256=VKmkiDz3klvMzXiGSQTH7QN-MfHuJnw
22
22
  assemblyline_v4_service/updater/gunicorn_config.py,sha256=p3j2KPBeD5jvMw9O5i7vAtlRgPSVVxIG9AO0DfN82J8,1247
23
23
  assemblyline_v4_service/updater/helper.py,sha256=CO0zY6R0gx36iOCSfZyCYCvUAUP76qQMqZ1z_HkZMME,9123
24
24
  assemblyline_v4_service/updater/updater.py,sha256=VB8jt5qg604HZyG6epHqGqG-7yPUCE5-i6uHOO2n72s,32045
25
- assemblyline_v4_service-4.4.1.dev226.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
26
- assemblyline_v4_service-4.4.1.dev226.dist-info/METADATA,sha256=1-aBoyAIbRkyh-n2VCQpFucd3UsiFHKRnZFrpI4nOoQ,9369
27
- assemblyline_v4_service-4.4.1.dev226.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
28
- assemblyline_v4_service-4.4.1.dev226.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
29
- assemblyline_v4_service-4.4.1.dev226.dist-info/RECORD,,
25
+ assemblyline_v4_service-4.4.1.dev230.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
26
+ assemblyline_v4_service-4.4.1.dev230.dist-info/METADATA,sha256=lAvKY-Te01Ov-lDTLSoFH_IlBbCLm6Rny-uNk2GtEpc,9369
27
+ assemblyline_v4_service-4.4.1.dev230.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
28
+ assemblyline_v4_service-4.4.1.dev230.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
29
+ assemblyline_v4_service-4.4.1.dev230.dist-info/RECORD,,