Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: PHP/MySQL  (Read 4862 times)

0 Members and 1 Guest are viewing this topic.

BeBoo

  • Anope User
  • Offline Offline
  • Posts: 8
    • http://www.blueliquidx.net
PHP/MySQL
« 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]
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
(No subject)
« Reply #1 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
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

BeBoo

  • Anope User
  • Offline Offline
  • Posts: 8
    • http://www.blueliquidx.net
(No subject)
« Reply #2 on: March 08, 2008, 08:29:55 PM »

That worked! Thank you very much!
Logged
Pages: [1]   Go Up