jmhobbs@pyhacker /posts/pysiri-python-interface-siri

date
2011-11-23T11:34:00.000Z

whoami
jmhobbs

ls
comments content tags

wc content
318

cat content

pysiri - A Python interface to Siri

Last week, the guys at Applidium posted an article on their blog with the technical details to the Siri HTTPS server (the blog post has since been taken down). Along with the article, they published some proof of concept code written in Ruby. That code can be found here. Anyway, I thought it'd be fun to port that code to Python and thus pysiri was born.

pysiri requires a Mac in client mode and record mode but works platform independent in server mode.

pysiri is a simple library to interact with Siri. It's based off the work done by Applidium and the code they released.

Requires plutil in client mode which means you need to be running on a Mac.

Requires PyAudio (http://people.csail.mit.edu/hubert/pyaudio/), audiospeex from py-audio (http://code.google.com/p/py-audio/), and the speexEnc binary (compiled from the sources found https://github.com/applidium/Cracking-Siri) for record mode.

Requires biplist (https://github.com/wooster/biplist) for server mode.

The compiled code included in this project will work on an x86_64 Mac. You'll need to compile the code yourself if you're on something else.

To get Siri authentication keys for your iPhone 4S, you'll need to install the ca.crt CA certificate to your iPhone. The easiest way to install it is to email the ca.crt file to yourself. Open the email on your iPhone 4S and install it.

After installing the certificate, run this script as root with the --server option:

sudo ./siri.py --server --save-keys

Change the DNS server on the iPhone to the IP of the computer running this script (Settings -> Wi-Fi -> <blue arrow on connected network> -> DNS)

Open Siri and say something. You should see your speech packets scroll by. Exit the script with Ctrl+C (you'll probably have to press it twice) and your keys will be displayed at the bottom of the console. They'll also be saved in a pickle file in the current directory (where they're used in the client application of this script).

wc tags
apple   mac   siri  

cat comments