From d4d372a02e91f3d58960e0d67d9f1f711d750035 Mon Sep 17 00:00:00 2001 From: Chapin Bryce <27cbryce@gmail.com> Date: Sun, 3 Nov 2019 08:02:37 -0500 Subject: [PATCH] Updated section documentation --- docs/section1.rst | 2 +- sections/__init__.py | 2 ++ sections/section_01/open_files.py | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/section1.rst b/docs/section1.rst index 100890e..20cc8ca 100644 --- a/docs/section1.rst +++ b/docs/section1.rst @@ -15,7 +15,7 @@ Section 1.2 - Logging Example :members: Section 1.3 - Open Files --------------------------------- +------------------------ .. automodule:: sections.section_01.open_files :members: diff --git a/sections/__init__.py b/sections/__init__.py index 727f29f..3e8372f 100644 --- a/sections/__init__.py +++ b/sections/__init__.py @@ -20,6 +20,8 @@ projects to allow for uniformity. * Logging - Writing status and error messages to the console and log file +* Open Files + - Read text files with varying UTF encodings. * CSV Generation - For better or worse, CSV reports are very common in DFIR and this code block covers several methods for diff --git a/sections/section_01/open_files.py b/sections/section_01/open_files.py index 0319fbf..bd47a7a 100644 --- a/sections/section_01/open_files.py +++ b/sections/section_01/open_files.py @@ -1,8 +1,8 @@ -"""Example for writing datasets into CSV files. +"""Example for reading data from encoded text files. -Demonstrates source datasets comprised of lists of dictionaries -and lists of lists as separate functions. Example data is -provided in line and will generate two identical CSVs as output. +Demonstrates how to handle setting the proper encoding for +UTF-8, UTF-16-LE, and UTF-16-BE with the ability to easily +expand to support checking other file magic values/signatures. Example Usage: