Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Python for Forensics

You're reading from   Learning Python for Forensics Learn the art of designing, developing, and deploying innovative forensic solutions through Python

Arrow left icon
Product type Paperback
Published in May 2016
Last Updated in Feb 2025
Publisher Packt
ISBN-13 9781783285235
Length 488 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
 Miller Miller
Author Profile Icon Miller
Miller
Chapin Bryce Chapin Bryce
Author Profile Icon Chapin Bryce
Chapin Bryce
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Now For Something Completely Different FREE CHAPTER 2. Python Fundamentals 3. Parsing Text Files 4. Working with Serialized Data Structures 5. Databases in Python 6. Extracting Artifacts from Binary Files 7. Fuzzy Hashing 8. The Media Age 9. Uncovering Time 10. Did Someone Say Keylogger? 11. Parsing Outlook PST Containers 12. Recovering Transient Database Records 13. Coming Full Circle A. Installing Python B. Python Technical Details
C. Troubleshooting Exceptions Index

Further automating databases – file_lister_peewee.py


In this iteration, we will use third-party Python modules to further automate our SQL and HTML setup. This will introduce extra overhead; however, our script will be simpler to implement and more streamlined, which would allow us to more easily develop further functionality in the future. Developing with an eye towards the future helps prevent us from rewriting the entire script for every minor feature request.

We have imported the majority of the standard libraries required before and added the third-party unicodecsv module (version 0.14.1). This module wraps around the built-in csv module and automatically provides the Unicode support for the CSV output. To keep things familiar, we can even name it csv by using the import...as... statement on line 4. As this is a third-party library, it will need to be installed on the user's machine for our code to run properly and can be done so with pip.

001 import os
002 import sys
003 import logging...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Python for Forensics
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon