Sunday, October 23, 2011

PocketStation Google Authenticator

Do you have a Google account and want to be more secure? Own a Sony PocketStation? Now you can use this device as a security token to login with 2-factor authentication on the Google site and even use it for logging into your linux machine using a PAM module.
It supports one key using the 30-second Time-based One-time Password algorithm. It's hashing up a secret key together with the current time to come to a 6 digit number. The small program takes up one memory block.

I used to collect handheld game devices and other gadgets. The PocketStation once caught my eye but could not easily find it here. It's a PlayStation-memory-card device with a small display that can run mini-games. It was supposed to be better than the Dreamcast VMU, which I owned already. The PocketStation has infrared, better CPU, better battery life, better software support, bettter looks.
When I went to Japan for holiday some year or two ago, I finally bought a 2nd hand PocketStation. I'm not playing so many games anymore, so it was just waiting for me to get a good idea and get the tools set up.
The idea was to use this device instead of my iPhone doing the authenticator part. Of course, malware on a phone would not be good anyway, but getting the key out of the authenticator app is a lot easier than hijacking a browser session. Also, switching between the authenticator and browser can take some while and has a risk of apps being closed when running out of memory. That sums up the risks of jailbroken iPhone I guess.
Anyways, with one small PocketStation app made, I could try to find other applications. One idea I just came up with is using the infrared as a replacement for an Apple remote and lock my MacBook using the iAlertU application.

Anyways, what I currently have for you:
Emulator screenshot.

YouTube video of real device.

Pre-compiled zip. (only need to add your key.)
Source-only zip.
More info in the readme contained in the zip files.

For programming the PocketStation,
1) I used an official Sony PS3 memory adapter. It's normally used to transfer old savegames into the PS3. For this, I used a program called MCRWwin.
There are other ways to do it but I have not investigated them yet:
2) Using and old hacked PlayStation and some save game editor homebrew application.
3) Use a different interface device, such as a parallel port. Check out the PSXGameEdit or PSX Memory Card Manager pages for more information.

edit, created sf project:

Saturday, January 22, 2011

Tomato firmware configuration

I have the Tomato firmware loaded into my Linksys router (WRT54GL 1.1). I acquired a second router of the same type and thought it'd be nice to duplicate the configuration. (if it breaks down or for whatever reason)
When I tried restoring the configuration, I got the error: "You cannot restore settings to a different router".
So I first needed to check what I had to change in the cfg file...

Source device:
gunzip -c tomato_v128_mDA3159.cfg | tr "\0" "\n" | grep "addr=00:1"

Target device (to be overwritten):
gunzip -c tomato_v128_m4AF795.cfg | tr "\0" "\n" | grep "addr=00:1"

Ah! It might check the MAC address! Let's try changing that...
gunzip -c tomato_v128_mDA3159.cfg | perl -pi -e \
| gzip -9 > tomato_v128_copy.cfg
(NB: OS X didn't have a sed command that worked nicely with binary files.)

It restored the modified configuration file!
After resetting the modem and other connections that have the old MAC address in memory, I could connect to the internet again.


When upgrading to a different model router, the configuration files will not match. (it checks
boardtype, boardnum, boardflags and other settings).
In that case, you could also SSH to old router and export the configuration in an easier format:
nvram export --dump > 1.txt
scp 1.txt darkfader@

On the new router, you can them import the edited file.

Sunday, January 02, 2011

Snow Leopard theme for Windows 7 (by sagorpirbd)

Download and installation instructions here: Snow Leopard for Windows 7 theme by sagorpirbd
If you run into problems with the free-activator (just click the advertisement) or just want to see what's in there beforehand, you can extract the files yourself.
Extract "Snow Leopard for Win7 Setup.exe" using a RAR-extractor. The password is snhgqzsdhbktin7
Here's a batch file (put in "System Files") to help replacing the system files:

@echo off
if exist backup goto :SKIPBACKUP

mkdir backup
copy "%windir%\Explorer.exe" backup
copy "%windir%\System32\Shell32.dll" backup
copy "%windir%\System32\ExplorerFrame.dll" backup
copy "%windir%\System32\OobeFldr.dll" backup

call :REPLACE "explorer\64 BIT\explorer.exe" "%windir%\Explorer.exe"
call :REPLACE "shell32.dll\64 BIT\shell32.dll" "%windir%\System32\Shell32.dll"
call :REPLACE "ExplorerFrame.dll\64 BIT\ExplorerFrame.dll" "%windir%\System32\ExplorerFrame.dll"
call :REPLACE "Welcome Center\64 BIT\OobeFldr.dll" "%windir%\System32\OobeFldr.dll"
goto :EOF

echo --- From %~1 to %~2 ---
if not exist "%~1" goto :ERROR
takeown /F "%~2"
Icacls "%~2" /grant Administrators:F
rename "%~2" "%~nx2.old"
copy "%~1" "%~2"
sleep 5
fc /B "%~1" "%~2" || echo ------------- %~2 mismatch ---------------
exit /B

echo Could not find source file!

There is also a program called "leftsider" which puts the control icons of a window on the left side, just like on a real Mac.