Book Image

Python for Secret Agents

By : Steven F. Lott, Steven F. Lott
Book Image

Python for Secret Agents

By: Steven F. Lott, Steven F. Lott

Overview of this book

Table of Contents (12 chapters)
Python for Secret Agents
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 1. Our Espionage Toolkit

The job of espionage is to gather and analyze data. This requires us to use computers and software tools.

The ordinary desktop tools (word processor, spreadsheet, and so on) will not measure up for the kinds of jobs we need to tackle. For serious data gathering, analysis, and dissemination, we need more powerful tools. As we look at automating our data gathering, we can't easily use a desktop tool that requires manual pointing and clicking. We want a tool that can be left to run autonomously working for us without anyone sitting at a desk.

One of the most powerful data analysis tools we can use is Python. We're going to step through a series of examples of real data collection and analysis using Python. This chapter will cover the following topics:

  • Firstly, we're going to download and install the latest and greatest Python release.

  • We're going to supplement Python with the easy_install (or pip) tools to help us gather additional software tools in the later chapters.

  • We'll look at Python's internal help system briefly.

  • We'll look at how Python works with numbers. After all, a secret agent's job of collecting data is going to involve numbers.

  • We'll spend some time on the first steps of writing Python applications. We'll call our applications scripts as well as modules.

  • We'll break file input and output into several sections. We will have a quick overview as well as an in-depth look at ZIP archive files. In the later chapters, we'll look at more kinds of files.

  • Our big mission will be to apply our skills for recovering a lost password for a ZIP file. This won't be easy, but we should have covered enough of the basics to be successful.

This will give us enough Python skills so that we can advance to more complex missions in the next chapters.