Deviant Logo


Attention Parents

post details top
Aug 30th, 2010
post details top

Sick of the poor quality education your child is getting in school? Teach them at home the importance of learning. Teach them respect. Stop medicating them for “illnesses” they do not have. Take an interest. When was the last time you went to a parent/teacher conference? Did you vote during the last election of the board of education? When is the last time you went to a board of education meeting? Take responsibility, instead of simply shoving your kids on the bus each morning like they are off to day care.

Take action instead of taking offense.

Backup your iPhone

post details top
Feb 22nd, 2010
post details top

(securely and automatically)

In this article I’m going to cover a secure yet automatic method for backing up (almost) everything on your jailbroken iPhone [or iPod Touch, possibly].

First off, I’m assuming you’ve already jailbroken your iDevice and can ssh into it. If you haven’t gotten that far yet, there are many tutorials available on the tubes. It is smart to run Insomnia on your phone so you don’t have to keep poking it to keep it awake while you are connected to it.
I’m also assuming you’re running OS X. This should work on Linux as well, excepting the bit about setting up a sparse bundle disk image (more on that in a minute). You can probably get a similar thing working on Windows using cygwin and the DOS “at” command instead of cron.

Our first step is to setup the security aspect of this process. I find it’s generally best to start with security, rather than trying to bolt it on later.
So, what we need to do is setup an RSA key. Fire up terminal and follow along:
ssh-keygen -t rsa
After typing this command you should get output like this:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:

Use the default location to save the file. While you can use an empty passphrase I highly recommend against it (we want this to be secure, right?). Just don’t forget what you entered here, or you’re going to be crying later.

So now you should have a public and a private key. Why this is important is outside the scope of this article. If you’re curious, you can find out more on the tubes (you probably should be, if you have no idea how the concept of public key encryption works).

For the purposes of this article I’m going to be using all command-line tools, simply because they are built-in to the OS. You are welcome to use GUI tools (such as Fetch for SFTP, etc).

The next step is to find out the IP address of your iPhone. Note that it is important that both your phone and your computer are on the same network. It’s doubtful that this will work over a cell network connection. If you have SBSettings installed, this info will show up there (labeled “Wi-Fi IP Address”). If you haven’t installed SBSettings you can find the info in Settings -> Wi-Fi -> then click the arrow next to your wireless network.

Armed with your iPhone IP address, we need to SFTP into it. If SSH is enabled, you should be able to connect.
sftp root@iphone-ip (where iphone-ip is your iPhone’s IP… that you just looked up)
By default the password is “alpine” (change it).
put ~/.ssh/id_rsa.pub /private/var/root/.ssh/
exit

What this does is copies your RSA public key to the iPhone. Now we need to add your public key to the authorized keys.
ssh root@iphone-ip
cd .ssh
cat id_rsa.pub >> authorized_keys
chmod 755 /var/root
chmod 700 /var/root/.ssh
chmod 644 /var/root/.ssh/authorized_keys
rm id_rsa.pub
(again replacing iphone-ip with the IP address of the iPhone in question)

Install the nano and rsync packages from Cydia. nano is a text editor and rsync is what we are going to use to actually do the backup. I don’t advise actually trying to run nano on the iPhone – the screen is too small. So we are going to do this in SSH:
nano /etc/ssh/sshd_config
Find the line that says “#PasswordAuthentication yes” – remove the # and change the yes to a no, then add these lines to the end of the file:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

Save the file (Control+O) and quit nano (Control+X). You may have to restart the iPhone or at least SSH in order for the changes to take effect (you can test by SSHing into the phone… does it ask you for your SSH password? It may still ask for your RSA passphrase).

Now the security portion is complete. Close SSH.

OPTIONAL [RECOMMENDED]: Setup an encrypted sparse bundle disk image to store the iPhone backup in. Don’t forget the password to that either. If you want the backup to be fully automatic, check the option to save the password for the sparse bundle in your keychain, otherwise when the backup runs it will prompt you for this password. Personally I did this step and I store the sparse bundle on my Time Capsule.

Here is the command for the actual backup process:
rsync -avz --stats --progress --exclude "private/var/mobile/Media/iTunes_Control/Music" root@iphone-ip:/ /Volumes/iPhoneBackup --delete (replace iphone-ip with the phone’s IP, and /Volumes/iPhoneBackup with the path you want to backup the phone to).

The initial backup could take a (very) long time, depending on how full your phone is. For me it took a little over half an hour. Note that this intentionally does not backup music, as that should all be stored in iTunes anyway.

The last step is to setup the automation. Some of us don’t like to admit it, but if backups aren’t automagical, we don’t do them. Or, at least, we don’t do them frequently enough.

Run this command in Terminal:
crontab -e
This opens up your cron file in vi. Press “i,” (as in “insert”) then paste in this line:
0 0 * * * hdiutil mount /Volumes/Backup/iPhone.sparsebundle; rsync -avz --stats --progress --exclude "private/var/mobile/Media/iTunes_Control/Music" root@iphone-ip:/ /Volumes/iPhoneBackup --delete > ~/.iphone_backup_log
(making the usual replacements)
Press escape then type “:qw” to quit vi. This command assumes you followed my above recommendation of creating a sparse bundle (replace /Volumes/Backup/iPhone.sparsebundle with the path to your sparse bundle). If you didn’t, remove this section of the command: hdiutil mount /Volumes/Backup/iPhone.sparsebundle;

This tells your machine to backup the phone every day at 1AM.

Sources:
http://justinhileman.info/articles/how-to-back-up-your-iphone-with-rsync
http://blog.release78.org/?p=55
http://www.macosxhints.com/article.php?story=2001020700163714

What so many people don’t understand…

post details top
Feb 15th, 2010
post details top

… is that if the good guys don’t do it, the bad guys will. Yeah, it sucks to have to reinvent your security. But you are going to have to anyway. It’s much better to have a good guy discover the problems, than to have a bad guy discover them. It doesn’t make the good guys bad guys.

Op-diverting using Google Voice

post details top
Dec 27th, 2009
post details top

I’ll start out by telling you how to do what I’m going to describe, then go into details what it all means.
Replace all instances of xxx-xxx-xxxx with your Google Voice number.

  • Dial *67xxx-xxx-xxxx from a phone attached to your Google Voice account
  • Enter your PIN, if required
  • Dial 2, to place a call
  • Dial 800-444-4444
  • Ta-da, you’ve sent MCI a spoofed AIN (for me, it reads 404-260-5532)

(more…)

The Mac vs PC Argument: My Take

post details top
Nov 25th, 2009
post details top

This post is pieced together from my replies to a thread over at ProBoards Support – General Talk.

Neither is better.

They are tools. Lets say PCs are shovels and Macs are hoes.
Depending on which task you are trying to accomplish one will be more suitable, and depending on your job (are you a gardener or a general contractor?) one may be the right choice more often than the other. At the end of the day you can basically accomplish the same things with either, it might just be more awkward, slower, messier, etc if you don’t have the “right” one for the task at hand. (more…)

Time Warner to Cap Bandwidth Usage in Rochester to 40GB

post details top
Apr 2nd, 2009
post details top

Via Gizmodo:
“Austin, San Antonio, Rochester, NY, and Greensboro, North Carolina are the next cities to suffer Time Warner’s comparatively draconian 40GB caps at the high-end—Comcast’s is 250GB, AT&T’s is 150GB, and all of them suck.”

This totally blows. Let TWC know how dissatisfied you are with this decision. Vote with your wallet if need be. If Netsville serviced my house, I would already be canceling my account.

Digg This

(more…)

« Previous Entries