Book Image

Raspberry Pi for Secret Agents

By : Stefan Sjogelid
Book Image

Raspberry Pi for Secret Agents

By: Stefan Sjogelid

Overview of this book

Ever wished you could play around with all the neat gadgets your favorite spies use (like James Bond or Michael Westen)? With the introduction of the remarkable Raspberry Pi and a few USB accessories, anybody can now join in on the action.Discover how to turn your Raspberry Pi into a multipurpose secret agent tool! Through a series of fun, easy-to-follow projects you'll learn how to set up audio/video surveillance, explore your Wi-Fi network, play pranks on your friends, and even learn how to free your Raspberry Pi from the constraints of the wall socket.Raspberry Pi for Secret Agents starts out with the initial setup of your Raspberry Pi, guides you through a number of pranks and secret agent techniques, and then shows you how to apply what you've learned out in the real world. Learn how to configure your operating system for maximum mischief and start exploring the audio, video, and Wi-Fi projects. Learn how to record, listen, or talk to people from a distance and how to distort your voice. You can even plug in your webcam and set up a motion detector with an alarm, or find out what the other computers on your Wi-Fi network are up to. Once you've mastered the techniques, combine them with a battery pack and GPS for the ultimate off-road spy kit.
Table of Contents (12 chapters)
Raspberry Pi for Secret Agents
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The Raspberry Pi was developed with the intention of promoting basic computer science in schools, but the Pi also represents a welcome return to simple, fun, and open computing.

Using gadgets for purposes other than those intended, especially for mischief and pranks, has always been an important part of adopting a new technology and making it your own.

With a $25 Raspberry Pi computer and a few common USB gadgets, anyone can afford to become a secret agent.

What this book covers

Chapter 1, Getting Up to No Good, takes you through the initial setup of the Raspberry Pi and preparing it for sneaky headless operations over the network.

Chapter 2, Audio Antics, teaches you how to eavesdrop on conversations or play pranks on friends by broadcasting your own distorted voice from a distance.

Chapter 3, Webcam and Video Wizardry, shows you how to setup a webcam video feed that can be used to detect intruders, or to stage a playback scare.

Chapter 4, Wi-Fi Pranks – Exploring your Network, teaches you how to capture, manipulate, and spy on network traffic that flows through your network.

Chapter 5, Taking your Pi Off-road, shows you how to encrypt your Pi and send it away on missions while keeping in touch via GPS and Twitter updates.

What you need for this book

The following hardware is recommended for maximum enjoyment:

  • The Raspberry Pi computer (Model A or B)

  • SD card (4 GB minimum)

  • Powered USB hub (projects verified with Belkin F5U234V1)

  • PC/laptop running Windows, Linux, or Mac OS X with an internal or external SD card reader

  • USB microphone

  • USB webcam (projects verified with Logitech C110)

  • USB Wi-Fi adapter (projects verified with TP-Link TL-WN822N)

  • USB GPS receiver (projects verified with Columbus V-800)

  • Lithium polymer battery pack (projects verified with DigiPower JS-Flip)

  • Android smartphone (projects verified with HTC Desire)

All software mentioned in this book is free of charge and can be downloaded from the Internet.

Who this book is for

This book is for all the mischievous Raspberry Pi owners who would like to see their computer transformed into a neat spy gadget, to be used in a series of practical pranks and projects. No previous skills are required to follow the book, and if you're completely new to Linux, you'll pick up most of the basics for free.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Now we need to start the imagewriter.py script and tell it where to find the Raspbian IMG file."

A block of code is set as follows:

prepare_tv() {
  tv_off # We switch the TV off and on again to force the active channel to the Pi
  sleep 10 # Give it a few seconds to shut down
  echo "on 0" | cec-client -d 1 -s # Now send the on command
  sleep 10 # And give the TV another few seconds to wake up
  echo "as" | cec-client -d 1 -s # Now set the Pi to be the active source
}

Any command-line input or output is written as follows:

pi@raspberrypi ~ $ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "When your image has finished downloading, you'll need to unzip it, usually by right-clicking on the ZIP file and selecting Extract all or by using an application such as WinZip."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.