Dave Page

July 20, 2008

KeePass Merge

Filed under: Computers, Software — Tags: , , , , , , , — dave @ 2:16 pm

I use KeePass to track hundreds of passwords, securely.

I also use Replicator to synchronize the files between my USB flash drive, home and work PCs. Sometimes it gets confused, mostly when I make changes at both ends. Replicator realizes this and stops. It creates a copy of the file, renames it password~1.kdb and replicates the two copies.

How to tell what changed? Cool tools like WinMerge only detect differences of binary files, not what changed. Especially for an encrypted file.

I export each file to an xml file, say password.kdb.xml and password~1.kdb.xml. I uncheck the top two - encode \n and eliminate backup items. Who cares? I include all fields below.

WARNING: these files now have ALL your passwords in cleartext. DELETE them when done — preferably a DOD delete.

Each record has a GUID — so no matter what change you make to the record, the GUID remains the same. So the way to check is to sort the XML by GUID and then compare the two with a diff tool.

I wrote an XSL stylesheet to sort them:


------keepass-exp-sortbyguid.xsl----------
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0″>
  <xsl:template match=”pwlist”>
    <xsl:apply-templates>
      <xsl:sort select=”uuid”/>
    </xsl:apply-templates>
  </xsl:template>
  <xsl:template match=”*”>
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

I use the msxsl transformer cuz its easy on windows. Use your own, or send me a script for cygwin tools.

iconv is required to convert the output of the XSL transform from UTF-8 into ISO-8859-1 or else bad things happen down the chain.

Here is the batch file to drive them:

------keepass-export-xml-sorter-converter.bat----------
setlocal
rem take the xml output of keepass export, sort them by UUID,
rem export to new file for comparison. CLEARTEXT!!!

set ICONV_HOME=c:\Program Files\GnuWin32\bin
msxsl password~1.kdb.xml keepass-exp-sortbyguid.xsl | “%ICONV_HOME%\iconv”
  -f UTF-16 -t ISO-8859-1 | tidy -xml -i -wrap 99999 > password~1.kdb.sort.xml
msxsl password.kdb.xml keepass-exp-sortbyguid.xsl | “%ICONV_HOME%\iconv” -f UTF-16
 &nbsp-t ISO-8859-1 | tidy -xml -i -wrap 99999 > password.kdb.sort.xml

endlocal

Now it is trivial to compare the two with WinMerge and identify the differences — everything lines up!

I had a problem this last time with characters that do not convert — typographic quotes and em dashes (ala Word Auto-Correcting). If you see
09063 Flaming Moeiconv: x: cannot convert
check the line for the goofy chars.

This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Creative Commons License

June 26, 2008

Course: Edward Tufte, Presenting Data and Information

Filed under: Books, Computers, Postcards, Software — Tags: , , , , , , — dave @ 8:00 am

Karin from work and I attended a one-day course, Presenting Data and Information, by Edward Tufte at the Hyatt Regency Chicago.

I had read some of his stuff a year or two earlier, tried to go to the Chicago course, and our crack clerical staff missed the deadline and it was full. So here we go! Long walk from Metra station to E Wacker Drive. But nice. Good weather. Nice walk.

Showed up, found our way thru the rabbit warren, and registered. We were issued a heavy cardboard box of 4 of ET’s books, and a homework assignment for reading before the class started. I grabbed a Starbucks from the lobby, and off we went.

Big room, lots of people, and not a lot of personal space — typical seminar. We plopped down and read. ET held “office hours” for autograph seekers and questions before, at lunchtime, and afterwards. When does the guy go potty?

The course itself was interesting. The guy is a great speaker, engaging and interesting. The time flew by. He showed 16th century books as examples of books and graphics as timeless art. Neat.

We did the fast 15-minute lunch at Houlihan’s next door. In and out quick, I had a nice chicken wrap, but by the time you walk there, eat, and return it was time to get going again. And the Starbuck’s went away in the PM.

Most of the items listed on the list of items to be covered were indeed covered. The final items were design of information displays in public spaces and design of computer interfaces and manuals. These were the items we were interested in. We got some of the kiosk discussion, but I don’t think we got much of the design of interfaces and manuals. NOTE: I found a review of Visual Explanations with references to Web development, but upon review, it is good stuff, but not a cookbook, more a philosophy.

Tufte manages to get everything important about Web design onto pages 146 through 149 of this book: let the information become the interface, use text rather than icons, don’t let the Web site mimic the bureaucratic structure of the publisher. The most remarkable thing is that he wasn’t even writing about the Web!

On the way home, got some combo cheese-and-caramel corn from the Garrett’s popcorn kiosk in the Metra station. Made a nice snack for us later.

Summary: Good course. Neat to see the 16th century books. If you read and have the books, probably a waste of time and money. If you don’t do technical presentations with lots of tables trying to prove things, (like us) perhaps limited use. But hearing “KISS” once more can be a good thing. And bashing PowerPoint is always fun.

May 10, 2008

Gallery Remote

Filed under: Computers, Software — Tags: , — dave @ 5:12 pm

So when I try to use the latest Gallery Remote 1.5 I get an error message:

Error: http post failed (http 404 not found)

Using Wireshark to sniff the request from GR:

POST /gallery_remote2.php HTTP/1.1
User-Agent: Gallery Remote 1.5
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Content-type: application/x-www-form-urlencoded
Content-length: 59

cmd=login&protocol_version=2.3&uname=XXX&password=XX

The response:
HTTP/1.1 404 Not Found

So it seems to be looking for a file called gallery_remote2.php. I don’t have it.

April 24, 2008

Thanks 1&1 Ya Dopes for not including Subversion

Filed under: Computers, Musings, Software — Tags: , , , , , — dave @ 9:50 pm

OK so they warned me. They moved to a new Linux platform, and Subversion stopped working.

I used my own instructions to rebuild. No good. Errors.

After some Googling I found an article by Nick Sergeant and he basically had the same routine. But he dumped 1&1. I can’t afford to now.

So I tried the latest subversion 1.4.6. Looks like it built. Will it update WordPress and Gallery?

WordPress: yes. Gallery: probably. Looks like we are in business.

Why can’t 1&1 at least provide a subversion client?

March 6, 2008

clip.exe

Filed under: Software — Tags: , , , , , , , — dave @ 2:14 pm

I wrote a utility called clip many years ago — you pipe output from a DOS program into it and it puts it on the clipboard. Then you can paste it somewhere.

e.g. dir > clip

I found a link to Copy Command Line Output to Windows Clipboard Directly. Turns out Microsoft had the same idea and put a clip.exe into Windows 2003 and Vista. He links to a site, but not trusting them, I checked out a local Windows 2003 install, and yes, there it was!

The MD5 is B265B924104C248FB94C3B6D7E8D4050, CRC (zip) is 0C7584A7 — just as shipped from the great god Microsoft. I would use a local copy, if you have one, but it looks safe enough.

January 20, 2008

CorelDRAW 8 Patches

Filed under: Musings, Software — dave @ 11:24 am

My copy of CorelDRAW 8 keeps crashing. Why, ask ye, are you using a 1999 vintage program? Faster, leaner, does what I want. Only version the T-Shirt guy uses for the Sarah Dance Clinic. Upgrade to X3 (V13) is $150. So I stick with it.

But it occurs to me — have I patched it? Maybe half this stuff is fixed. (Maybe not — Corel software — especially the later stuff — tends to be a little — buggy.)

Could not find the download link on support, until the fourth time. Found an FTP site, and looked there: ftp://ftp.corel.com/pub/CorelDRAW/DRAW8Suite/
Hooray!

We’ll see how it works.

November 6, 2007

Changing CVS roots in existing checkouts

Filed under: Software — Tags: , , — dave @ 10:16 am

SO I got a chunk of CVS and the server has been moved. See this for the Unix version.

I am on windows, with no Cygwin (in this machine).


use strict;
use Cwd;
use File::Find;
use File::Copy;
use File::Basename;

my $NEW_CVSROOT = ':pserver:xxxxx@xxxxx.xxxx:/cvs/xxxxxx';
my $RootFolder = cwd();
&find( \&Filter_OverwriteRoot, $RootFolder );
warn "$0 Process complete. Terminating...\n";
exit(0);

#########################################

sub Filter_OverwriteRoot # ()
{
my $fileSpec = $File::Find::name;
my $fileName = $_;

# if a file...
if ( -f $fileSpec )
{
# Root is done
if ( $fileName =~ /^Root$/i )
{
print "update $File::Find::dir $fileName \n";
open (FILE, ">$fileName") || die "Can't open $fileName: $!\n";
print FILE $NEW_CVSROOT . "\n";
close(FILE);
}

}
}

Run this in the root folder for the checked out code. Seems to work…

MAKE SURE YOU ONLY HAVE ONE ROOT LINE PER CVS/Root file! The other solution replaces them all. Mine doesn’t.

October 21, 2007

Paint Shop Pro X2 Duplicate Error Messages

Filed under: Software — Tags: , , , , , — dave @ 1:24 pm

I just upgraded to Corel PSP X2, and when I start it up got a bunch of dialogs complaining about duplicate image names related to the default brush, tube, and other files installed with the product. After some Googling and analysis, I found the filenames were stored with two cases for the drive letter, like “C:\Program Files” and “c:\Program Files” and PSP was being case sensitive in its dupe checking.

I decided to ignore the messages.

Today I was trying to create a custom brush from a selection and got the same messages. I happened to click on the File Locations button in the brush selection box, and there was under the Brush File FOlders list, two paths to the same location “C:\Program Files\Corel\Corel Paint Shop Pro Photo X2\Corel_01″ and “c:\Program Files\Corel\Corel Paint Shop Pro Photo X2\Corel_01″. So the program loaded all the files from these locations, and did case-sensitive compare — and found duplicates! No way!

Remove the path. No more problems. Also work your way down the list and look for more duplicates.

August 11, 2007

Hell, thy name is XP installer

Filed under: Software — dave @ 11:08 am

Picture this: my computer with Win2K has this partitioning:

disk partition/drive letter
0 part0=C: part1=G: part2=D:
1 part0=E:

Okay, so I can easily back up drive C:, and use the XP installer to delete the C: partition and create a new partition in that slot. Then, reinstall, set up apps, everyone is happy, no?

No.

After I was done, partition 1 is now marked as system drive, and d1/p0 is marked D: and — the good part — I can’t change any of this with the XP Manage Hard Disks.

After much Googling and reading I found a nice app called MBRWizard, but this stuff scared me. If I blow the partition table, ALL my drives are dead, and I don’t have backups of the other drives. I conveniently received a sales email from my old Boot Commander folks Vcom about their new Partition Commander release for $30. I had used Partition Magic at work, and it worked ok. I bought, installed, burned the boot CD and it showed me a lovely arrangement of sensibly arranged drive letters. Click Save, reboot, and reinstall XP. Now the C drive AND the boot drive is d0/p0 as the Lord ordained. XP install complete for the 5th time, and a little drive letter munging, and we are back!

Wikipedia on Master Boot Record
MBRWizard freeware

August 5, 2007

Subversion on 1&1 Shared Hosting

Filed under: Software — dave @ 10:56 am

WordPress has another security update. I am tired of patching zips, and the Subversion update looks a lot easier, but for some stupid reason, 1&1 does not include the SVN client in their standard setup.

The tags to upgrade to are here. All I need is the Subversion client!

The basic Subversion build is here at http://svn.collab.net/repos/svn/trunk/INSTALL

Get both the source and the deps files, for example subversion-1.4.4.tar and subversion-deps-1.4.4.tar.

mkdir svn
cd svn
tar xvf subversion-1.4.4.tar
tar xvf subversion-deps-1.4.4.tar
cd subversion-1.4.4
./configure --prefix=$HOME
make
make install

The --prefix=$HOME dumps the client code into ~/bin, since we cannot write into the shared “root” areas.

Now (per here) I edit ~/.bash_profile (not .bashrc) and add the lines:
PATH=$PATH:$HOME/bin
export PATH

Load it up:
source ~/.bash_profile

I am not a Unix guru. This only took two hours and my Sunday morning to figure out. Curse 1&1.

keywords: 1and1 hosting

Newer Posts »

Powered by WordPress