Modify

#456 closed enhancement (fixed)

Refactor encode/decode programs to useful things

Reported by: Des Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 1.2.3
Keywords: md5 encode decode Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:

Description

Hi, I've found myself in the need for generating a md5 password hash for the bitlbee.conf file and founding no tool for it code a patch that replaces the encode thing which is afict not useful anymore with a utility to do this.

Some days later someone came to #bitlbee asking how to decode their im account passwords knowing his bitlebee password, so as I had just looked over that parts of the code I wrote the decode thingy for him and also replace the previous decode code for bitlebee.

So here we have:

encode - which encode a given password in the md5 form that bitlbee.conf uses

decode - which decode a hash obtained from a xml account file given the correct bitlbee password for that account

I'd love to see this code as part of the bitlbee distribution, and I think it is useful. Obviously you have my permission to distribute this under the same license you distribute bitlbee now or in the future.

Attachments (1)

encode_decode.patch (3.8 KB) - added by des@… at 2008-11-07T13:02:23Z.
Patch for useful encode/decode programs

Download all attachments as: .zip

Change History (2)

Changed at 2008-11-07T13:02:23Z by des@…

Attachment: encode_decode.patch added

Patch for useful encode/decode programs

comment:1 Changed at 2010-03-08T02:19:40Z by wilmer

Resolution: fixed
Status: newclosed

Thanks for the patch .. but I admit I didn't use it in the end because I went for a different approach: First of all crypting.c will go away soonish. So instead I built it straight into the main binary, hiding everything behind a flag -x.

wilmer@ruby:~/src/bitlbee/devel$ ./bitlbee -x 
Supported:
  ./bitlbee -x enc <key> <cleartext password>
  ./bitlbee -x dec <key> <encrypted password>
  ./bitlbee -x hash <cleartext password>
  ./bitlbee -x unhash <hashed password>
  ./bitlbee -x chkhash <hashed password> <cleartext password>
wilmer@ruby:~/src/bitlbee/devel$ ./bitlbee -x enc pom frites
FjZQhNzkgDpjLxIcWKvqcjFU
wilmer@ruby:~/src/bitlbee/devel$ ./bitlbee -x dec pom FjZQhNzkgDpjLxIcWKvqcjFU
frites
wilmer@ruby:~/src/bitlbee/devel$ ./bitlbee -x hash blaataap
AE6SHpT+R8e83ixnXKEkIui6g0HS
wilmer@ruby:~/src/bitlbee/devel$ ./bitlbee -x chkhash AE6SHpT+R8e83ixnXKEkIui6g0HS blaataap
Hash matches given password.

changeset:devel,491

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.