Post image of [Tutorial] Make your own Siri proxy server for use with Spire

Many thanks to @besweeet (Brian Sweet) ant The Tech Erra Tech Blog, ever since the release of Spire for iOS 5.0.1, many people were hustling to find a working proxy server so that they can use Siri on their non-4S device. Hosting your own server on your own network (which can, optionally, be accessed externally through, for example, a 3G connection) can be a little tricky, but is fairly easy. This post will explain this entire process from start to finish.

Notes/Features

Here are some important things to note:

  • This tutorial will be using Linux. If you’re on Windows, then get a copy of VirtualBox and run Ubuntu 11.10 in it. Set your networking preferences to “Bridged”.
  • This guide shouldbe able to work for Mac OS X, but I’ll need some testers for it.
  • Users who want to use your server will be able to connect on any Internet connection, whether it be Wi-Fi, 3G or possibly EDGE.

How This Works

The way that this all works is quite simple. You’ll be using something called “SiriAuth”, which is basically your server. For this to work, you’ll need to grab the Siri authorization keys from a 4S which, as mentioned below, will need to be done every 24 hours. Beyond that, people can connect to the server through your IP address or, what’s more recommended, a DynDNS sort of solution (for example, FreeDNS). The DNS route takes your home IP address and masks it to a domain name for ease of use so that, should your home IP address change, the people with your URL will still be able to connect to it without worrying about IP address changes.

Before You Quit!

Many people think that this is difficult, primarily because of how lengthy it is. Read the requirements below. This honestly isn’t that difficult to pull off.

Alternative – Purchase a Server Slot

I’ll soon (shortly after this post goes live) be offering a service where people who aren’t willing to setup their own server can use mine. Unfortunately, this will come at a fee (monthly), as my own computing resources and server bandwidth are all being used.

If you’re interested in this server, please go to this blog post –> Here @ The Tech Erra

Requirements

Here are some of the requirements:

  1. Experience with command-line options/Terminal - You’ll be running various commands. You must know what cd, sudo, ruby, etc. do.
  2. Linux – As mentioned above, you’ll need Linux, although you might be able to be used with Mac OS X, so please test this for us.
  3. Port 443 & 53 forwarded – This is to be done with your router. Click here for port forwarding information. Other ports can be used by modifying siriAuth.rb.
  4. An iPhone 4S – This is used to grab the Siri authorization keys. The person with the 4S doesn’t actually have to be near you. You can use any 4S over the Internet. These keys will need to be re-grabbed every 24 hours.
  5. A jailbroken iOS 5.0.1 device – This is used for Spire :) .
  6. Spire – Install this on the iOS 5.0.1 device that you want Siri to be used on.
  7. Up to an hour worth of time – Depending on your skill level and problems that you may run into, you’ll need maybe an hour of time.
  8. Patience – And the willingness to at least attempt to diagnose your own errors.

Credits

Some people to thank:

Downloads

Here are the required downloads:

  1. SiriAuth, 8KB~ (mirrors below) – The Siri server, by StanTheRipper.
    1. MultiUpload
    2. MegaUpload
    3. UploadKing
    4. UploadHere
    5. DepositFiles
    6. Hotfile
    7. zShare
    8. FileSonic
    9. Wupload
  2. AuthGrabber, 13KB~ (mirrors below) – The script that’s used to grab the Siri auth keys from a 4S, whether it be locally on your network or remotely, also by StanTheRipper.
    1. MultiUpload
    2. MegaUpload
    3. UploadKing
    4. UploadHere
    5. DepositFiles
    6. Hotfile
    7. zShare
    8. FileSonic
    9. Wupload

Step 0 – Quick .sh Note!

If you’re attempting to execute a .sh file, and Terminal is saying that the command is not found, then you’ll need to run the following:

sudo chmod +x [name_of_.sh_file]

After that, you should be able to run the .sh.

Step 1 – Getting the 4S Keys

Assuming you have an iPhone 4S, ports 53 & 443 forwarded, and Linux, all you have to do is run the follow command (after using cd to change the directory to where the AuthGrabber files are located)

./dependencies.sh

This will make sure that all of the other required bits of software are installed.

Next, you’ll need to generated the certificate file that has to be installed onto the iPhone 4S. To do this, run the following:

sudo ./certs.sh

Follow the on-screen prompts to generate your certificate. The information doesn’t have to be accurate, and can basically be whatever you want.

Note: This certificate is only required to be installed onto the device whenever the 4S auth keys are required. After they’re grabbed, you can remove the certificate, or just leave it installed as it causes no harm.

Next up, you’ll need to setup a small DNS server that’s used in Python. Refer to this link: http://pastebin.com/raw.php?i=7EXgFXek. Copy and paste everything there into a blank plain-text file. Search for “555.555.555.555?. Replace this with the IP address of the machine (if you’re doing it locally), or your actually Internet IP address (if the 4S is remote). Save this file as “dns.py” to the same directory as the other AuthGrabber files.

To run the DNS server, run this command:

sudo python dns.py

After that, you should see something like this:

Fake DNS Server:: dom.query. 60 IN A 555.555.555.555

If you get an error that says an address is already in use, then run the following, and then try the Python command again. But, if this doesn’t work, then something else is using port 53, and you’ll need to figure out what process is using it:

sudo killall dnsmasq

Before you start the server, you’re going to need a few more files. Download the following ZIP, and extract the two files within to your AuthGrabber directory:

While the server is running, open up a new Terminal window, change the directory back to the AuthGrabber folder, and run the following:

sudo ruby authGrabber.rb > OUTPUT.txt

This will start authGrabber.rb, and will output the grabbed keys into OUTPUT.txt. Both the DNS server and authGrabber server are running. On the 4S, you’ll need to change its Wi-Fi DNS to your IP address, whether it be local or remote. This can be done in Settings>Wi-Fi>[blue arrow for your Wi-Fi network]>DNS. Make sure to go back a menu and exit out of Settings for it to work.

Lastly, on the 4S, try and bring up Siri. As soon as this is done, you’ll see text fly by in your Terminal window. Open up OUTPUT.txt to see if anything is inside. If you see various keys and whatnot, then you’re done. You can now kill the DNS server by CTRL+C’ing the appropriate Terminal window.

If you need to grab the keys, just start the DNS server, start the authGrabber server, give the 4S your certificate, and give it your IP address for them to change their Wi-Fi DNS to.

Step 2 – Starting Your Siri Proxy Server

Starting the Siri proxy server is similar to starting the authGrabber server above.

After changing Terminal’s directory to the SiriAuth folder, run the following command:

./dependencies.sh

This makes sure that all the required bits of software are all installed.

Next, you’ll need to generated the certificate file that has to be installed onto the jailbroken Spire device. To do this, run the following:

sudo ./certs.sh

Follow the on-screen prompts to generate your certificate. The information doesn’t have to be accurate, and can basically be whatever you want. The only part that needs real information is when it asks you for the IP address of your server, whether it be a local IP, your Internet IP, or a URL of a DynDNS sort of thing.

Note: This certificate is required to use Siri, and will not work if it’s removed.

Next, you’ll need to edit siriAuth.rb with the keys that were grabbed earlier. Open the file with a text editor (most likely gedit), as well as the OUTPUT.txt file that was made earlier. There are 4 things that need to be copied:

  1. XAceHostKey
  2. ValidationDataKey (the large batch of data)
  3. AssistantIDKey
  4. SpeechIDKey

From OUTPUT.txt, copy the appropriate key into siriAuth.key. The place to copy them to is near the beginning of the file. Make sure to copy the key between the quotes, and paste them between the quotes, respectively. Save the file when done.

To start the server (the fun part), simply run the following:

sudo ruby start.rb

It’ll say the following if the server has been successfully started:

Server started
Selected X-Ace Host: [redacted]
Selected assistantId: [redacted]
Selected speechId: [redacted]
Selected ValidationData: [redacted]

Move on to step 3 :) .

Step 3 – Setting Up Spire

This part is simple.

Go into Settings, and then Spire. In the box, enter in the URL or IP address of your server, after http://. You may need to add https:// for it to work.  After it’s set, go back to the main menu in Settings, and go to General > Siri. Make sure that you turn it on. After it’s been turned on, respring your device.

Test to see that this is working by bringing up Siri (or Siri’s dictation feature). If it is, you’ll see a lot of text scrolling through the Terminal window for siriAuth.

That’s it!

That’s all there is to this. It’s honestly quite straightforward, assuming you don’t get any errors when trying to start authGrabber or siriAuth.

Via : TheTechErra.com

 

Posted by TechXero   @    31 December 2011 9 comments
Tags : , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

Related Posts

 9 Comments
  • miamirican305

    When I run sudo ruby authGrabber.rb > OUTPUT.txt I get this Error: ruby: No such file or directory — authGrabber.rb (LoadError) PLease Someone HELP!!! Thanx in advance :)

    • Anonymous

      Try:

      sudo apt-get install ruby

      Or,

      sudo apt-get install rubygems

      After you try those, run the command again.

  • rasta

    miamirican305:
    i Think youre not in the right directory where your authGrabber.rb is.
    Change the directory to the AuthGrabber folder.

    But i am in the right directory and when i run that command i get following error:
    authGrabber.rb:2:in `require’: no such file to load — rubygems (LoadError)
        from authGrabber.rb:2

    many thanks for any help

    greetz rasta

  • http://pulse.yahoo.com/_DHDOHUQHEE3NLA55YMA2JXQ2NY HeshanK

    Hi, How much bandwidth will this server use once its up and running? lets say, the amount of bandwidth used for hundred commands..

    thanks

    • Anonymous

      Not much at all … Less than or equal to 512kb why ?

      • http://pulse.yahoo.com/_DHDOHUQHEE3NLA55YMA2JXQ2NY HeshanK

        Just wondering.. we have tight data caps here in NZ

  • Pingback: Get #Siri AkA #Spire Server Today ! | iG33kstas.com

  • SiriMan

    authGrabber.rb:40:in `unbind’: undefined method `close’ for nil:NilClass (NoMethodError)
            from /var/lib/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1417:in `event_callback’
            from /var/lib/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine’
            from /var/lib/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run’
            from authGrabber.rb:73
    WTF is the problem? :

  • SiriProxy Installer

    My installation is stuck at “Using /home/(USERNAME)/.rvm/gems/ruby-1.9.3-p0
    this happens after I do “/.dependencies.sh” and I have tried leaving it over night, and it still doesn’t work :/ Do you know what the problem is?

WP Like Button Plugin by Free WordPress Templates