Helpers
psengine.analyst_notes.helpers
¶
save_attachment
¶
save_attachment(
note_id: str,
data: Union[bytes, str],
ext: str,
output_directory: Union[str, Path],
) -> None
Save a YARA, Sigma, Snort, or PDF attachment to a file.
The file will use the provided extension and the note_id
to create the filename.
PARAMETER | DESCRIPTION |
---|---|
note_id
|
The ID of the AnalystNote.
TYPE:
|
data
|
The data returned from
TYPE:
|
ext
|
The extension of the attachment, returned by
TYPE:
|
output_directory
|
The directory to save the file into.
TYPE:
|
Source code in psengine/analyst_notes/helpers.py
save_note
¶
save_note(
note: AnalystNote, output_directory: Union[str, Path]
) -> None
Save an AnalystNote
object to a file named with the note ID.
PARAMETER | DESCRIPTION |
---|---|
note
|
The note to save.
TYPE:
|
output_directory
|
The directory to save the file into.
TYPE:
|