Learning Python for Forensics
上QQ阅读APP看书,第一时间看更新

Python Fundamentals

We have explored the basic concepts behind Python and fundamental elements used to construct scripts. We will now build a series of scripts throughout this book using the data types and built-in functions that we have discussed in the first chapter. Before we begin developing scripts, let's walk through some additional important features of the Python language, building upon our existing knowledge.

In this chapter, we will explore more advanced features that we will utilize when building our forensic Python scripts. This includes complex data types and functions, creating our first script, handling errors, using libraries, interacting with the user, and some best practices for development. After completing this chapter, we will be ready to dive into real-world examples featuring the utility of Python in forensic casework.

This chapter will cover the following topics:

  • Advanced features, including iterators and datetime objects
  • Installing and using modules
  • Error handling with try, except, and raise statements
  • Sanity checking and accessing user-supplied data
  • Creating forensic scripts to find USB vendor and product information