Anope IRC Services

Anope Support => 1.8.x/1.7.x Support (Read Only) => Topic started by: BeBoo on March 07, 2008, 09:36:31 PM

Title: PHP/MySQL
Post by: BeBoo on March 07, 2008, 09:36:31 PM
Hello,

I'm trying to write a PHP script that uses the NickServ DB to authenticate users on my website. I was able to find the user by looking in anope_ns_alias and then using the group, I tried finding any records in anope_ns_core where the group (display) matched and the pass in the DB = md5(<password submitted>). It 's not working because the password in the DB does not appear to be md5 even though that's the encoding I'm using. Anyone have any insight into why this might be?

Thanks!

[Edited on 7-3-2008 by BeBoo]

[Edited on 7-3-2008 by BeBoo]
Title:
Post by: Jobe on March 08, 2008, 01:11:25 PM
The password in the DB is MD5 is you selected enc_md5 only it is not a hex encoded MD5 hash.

If youre using enc_old then youll need to find the PHP implimentation of the broken MD5 that Anope used to use.

As for the md5() func, try using md5("passtotest", true) to produce the MD5 hash in the same format as Anope uses for enc_md5
Title:
Post by: BeBoo on March 08, 2008, 08:29:55 PM
That worked! Thank you very much!