You are on page 1of 3

--------------------------------------------------------------------------

HONDA Motorcycle Electronic Parts Catalogue


--------------------------------------------------------------------------
12 Apr 2003

Hi!

This is my first hack - after several years - aimed to break into


information packed into a closed form. I think it deserved the
effort and I'm quite proud to offer it to the community.

It is the HONDA Electronic Parts Catalogue for motorcycles,


delivered by Honda Motor Europe Ltd. to their dealers, it is
dated November 2002.

I occasionally get a CD-ROM that my dealer was throwing away: it


contains only the database, I have not the MS-Windows program to
consult it. The most interesting things on this CD are certainly
the exploded views of 261 different models (stored as .tif b/w
images), but also model names, frame and engine serial numbers,
genuine parts code, prices and servicing times are of invaluable
interest for maintenance lovers.

My work was to unpack the database in a readable form and then to


write a program to consult the huge mess of information and
pictures. The original CD contains a compressed database created
with Watcom SQL, a SQL database engine designed for large
departmental networks and stand-alone PCs. Watcom International
Corporation does not longer exists, now the product is SQL
Adaptive Server Anywhere, from Sybase.

I wish to tell you the steps that - in a couple of night - led me


into having a readable PostgreSQL database. Then I spent several
hours in writing a simple PHP program to consult it. So if you
want to run the database, you have to run a web server with PHP
and PostgreSQL, MySQL or any other supported database.

Enjoy

--------------------------------------------------------------------------
1 Read the database
--------------------------------------------------------------------------
The database onto the CD-ROM (/database/HONDA.CDB) is a
compressed WATCOM SQL database 5.5.03 (now Sybase SQL
Anywhere).
I dowloaded and installed the 60 days evaluation version of SQL
Anywhere Studio for 32-bit Windows (http://www.sybase.com/).

1.1 Uncompress the database


---------------------------
- Run the Sybase Central utility.
- Go to Adaptive Server Anywhere 8, Utilities, Uncompress
Database.
- Follow the wizard: a new, uncompressed file of approx.
350 Mb will be created.

1.2 Restore the unknown DBA password


------------------------------------
Every database created with SQL Anywhere has a table called
SYSUSERPERM which contains users and passwords. There is a
default administrator account called "DBA", the default password
is "SQL", but unfortunately it was changed in HONDA.DB.

To restore the password to its default value, I used an hex


editor (I tried Hiew in DOS). I searched the following hex
string:

44 42 41 24 21 58 F6 AE
A8 18 BC 71 26 CB 31 AA
14 84 5A 72 5D E0 A6 44
9B 34 10 48 9B 72 73 14
51 D0 9D C9 F7 EC B1 43

and replaced it with:

44 42 41 24 35 5B EE F8
73 1B 01 20 BA E0 D6 40
01 20 99 B8 04 89 3C 7F
17 1F 81 30 58 1E 10 77
B0 20 35 A0 3F E6 05 41

The first four bytes are the string "DBA$", then there is the
encrypted password. NOTE: I found 4 occurrencies of the string,
don't know why. I replaced all them.
1.3 Connect to the database
---------------------------
- Start the database engine using the the now uncompressed and
modified database. The command line is something like this:

"C:\Program Files\Sybase\SQL Anywhere 8\win32\dbeng8.exe"


-c 8m -n honda "C:\Honda\honda.db"

- Start the "Interactive SQL" from the evaluation software,


specify user "dba" and password "sql". In the Database tab
search the database server named "honda" running on
localhost... voila'! You are connected!

Try the following SQL command to get a list of defined tables:

SELECT * FROM systable WHERE creator = '1' AND table_type =


'BASE';

----------------------------------------------------------------------
2 Dump (export) the database to an SQL ASCII file.
----------------------------------------------------------------------
In Sybase SQL Anywhere terminology, to dump a database to an ASCI
text file is called "unloading a database".

- With the database engine running, launch the Sybase Central


utility and select "Unload Database".

- Because the HONDA.DB is built with version 5.5 of the engine,


you are suggested to unload the database and reload it
(restore) in the new format.

- Follow the wizard to dump only the structure and/or the data to
an ASCII file. If you need to import data in a different
database (eg. MySQL or PostgreSQL), you don't need to create a
new database and reload back the dump.

To reload the dump into PostgreSQL or MySQL may be you have to


convert from comma separated values to tab separated values
and/or adjust some syntax.

You might also like