Free Sample
+ Collection

Python for Secret Agents

Steven Lott

Analyze, encrypt, and uncover intelligence data using Python, the essential tool for all aspiring secret agents
RRP $16.99
RRP $27.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783980420
Paperback216 pages

About This Book

  • Build a toolbox of Python gadgets for password recovery, currency conversion, and civic data hacking
  • Use stenography to hide secret messages in images
  • Get to grips with geocoding to find villains’ secret lairs

Who This Book Is For

If you are a Python beginner who is looking to learn the language through interesting projects, this book is for you. A basic knowledge of programming and statistics is beneficial to get the most out of the book.

Table of Contents

Chapter 1: Our Espionage Toolkit
Getting the tools of the trade – Python 3.3
Getting more tools – a text editor
Confirming our tools
Background briefing – math and numbers
Handling text and strings
Organizing our software
Working with files and folders
Solving problems – recovering a lost password
Chapter 2: Acquiring Intelligence Data
Accessing data from the Internet
Using a REST API in Python
Organizing collections of data
Solving problems – currency conversion rates
Chapter 3: Encoding Secret Messages with Steganography
Background briefing – handling file formats
Using the Pillow library
Some approaches to steganography
Detecting and preventing tampering
Solving problems – encrypting a message
Chapter 4: Drops, Hideouts, Meetups, and Lairs
Background briefing – latitude, longitude, and GPS
Finding out where we are with geocoding services
How close? What direction?
Compressing data to make grid codes
Decoding a GeoRef code
Creating natural area codes
Solving problems – closest good restaurant
Chapter 5: A Spymaster's More Sensitive Analyses
Creating statistical summaries
Creating Python modules and applications
Creating our own classes of objects
Comparisons and correlations
Writing high-quality software
Solving problems – analyzing some interesting datasets

What You Will Learn

  • Quickly get to grips with using Python to create tools and solve problems
  • Manipulate image files and learn how to encode messages into an image using steganography
  • Gather a file's hidden secrets, such as EXIF data and ZIP archive contents
  • Build applications that access, filter, and analyze live data from the Web
  • Design Python modules, libraries, and applications
  • Customize your Python environment with specialized packages
  • Extract data using HTTP and FTP internetworking protocols

In Detail

Python is an easy-to-learn and extensible programming language that allows secret agents to work with a wide variety of data in a number of ways. It gives beginners a simple way to start programming, but Python's standard library also provides numerous packages that allow Python-using secret agents to easily utilize very sophisticated information processing.

This book will guide new field agent trainees through putting together a Python-based toolset to gather, analyze, and communicate data. It starts by covering the basics and then moves on to sections such as file exchange, image processing, geocoding, simple trigonometry, and more sensitive statistical processing. You will then learn how to use polynomials to encode and decode data in different representations. Furthermore, this book shows you how to add tools to a Python environment, work with images, and parse HTML web pages to extract meaningful data. The idea of adding packages to Python is central to how an agent will leverage these tools for data processing.


Read More

Recommended for You

Learning Python Data Visualization
$ 28.99