[PLUG] MD5 hash a string...

Devin dlab00 at gmail.com
Wed Jan 17 04:32:23 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Devin wrote:
> Carlos Konstanski wrote:
>>> I got horde working.  Turns out, I had to put the password for
>>> Administrator in horde's horde_users table in MD5 hash form.
>>> I ended up using a web based tool someone kindly put up to get
>>> the hash.  After that, the php administration page allows adding
>>> additional users.
>>>
>>> My question, what tool on a typical Linux box will dump the
>>> MD5 hash of a string?  Is there a way using the psql tool to
>>> enter the hash of a string instead of the actual string?
>>> Is there a special INSERT command?
>> My personal favorite: grub-md5-crypt
> 
>> Carlos Konstanski
>> _______________________________________________
>> PLUG mailing list
>> PLUG at lists.pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
> 
> 
> Very simple app I wrote that uses OpenSSL's md5 function to hash
> argv[1]: http://objdump.net/~dlab/md5.c
> 
> dlab at loathe ~$ gcc -o md5 md5.c -lssl
> dlab at loathe ~$ ./md5 "hello"
> 5d41402abc4b2a76b9719d911017c592
> 
> or md5sum:
> 
> dlab at loathe ~$ echo -n "hello" | md5sum -- -
> 5d41402abc4b2a76b9719d911017c592  -
> 
> or openssl:
> 
> dlab at loathe ~$ echo -n "hello" | openssl md5
> 5d41402abc4b2a76b9719d911017c592
> 
> 	- Devin
> 

Newer version that hashes each argument:
http://objdump.net/~dlab/md5-2.c

dlab at loathe ~$ gcc -o md5-2 md5-2.c -lssl
dlab at loathe ~$ ./md5-2
Usage: ./md5-2 string ...
Outputs MD5 hash of each string argument
dlab at loathe ~$ ./md5 password1 password2 "password three"
7c6a180b36896a0a8c02787eeafb0e4c  "password1"
6cb75f652a9b52798eb6cf2201057c73  "password2"
b33702f3e1fa2a106a01baea8ce163d9  "password three"

	- Devin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFrabVHwyTl3GgmKcRAvN2AKCAXmWuP0Eplp6+bbGGarUpc2QP2gCeP4Z+
w/NgsJY7hC9nNgBu6rxw6MA=
=7Ejp
-----END PGP SIGNATURE-----



More information about the PLUG mailing list