Author Topic: Any perl or php gurus out there?  (Read 4493 times)

0 Members and 1 Guest are viewing this topic.

Offline Bytes_U

  • album.pl Donor
  • album.pl Contributor
  • ***
  • Posts: 75
  • Karma: +0/-0
  • Oh no... not again?
Any perl or php gurus out there?
« on: October 21, 2003, 01:12:08 »
Problem... 400 users on IPB forum. I can't get Album to recognize the login/pw in the IPB forums sql database. If I go into manually extract that info in mysql the passwords are scrambled/encrypted? Does anyone know of a perl or php script available that would...

  • allow people to enter their user number and their password
  • when they click submit their user number, pipe symbol, and password is added to a txt file on the server (same format as author_db.tx file so I can cut/paste into it after checking it over).
  • adds a line return so the next person to submit is on the next line in the same txt file
I found a perl script that almost does that, but each new submit was written to a separate new txt file. I stopped (novice luck) the making of new files but each submit overwrites the previous without adding a new line :-( Anyone want to tackle altering the base script for me? Script file in txt format

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Any perl or php gurus out there?
« Reply #1 on: October 21, 2003, 09:43:55 »
I haven't looked too closely at it, but this line:

Code: [Select]
open (storedata, ">$data_directory/form1/$count.txt") or Common::error("unable to create $count.txt");

Will overwrite files every time. Change it to this:

Code: [Select]
open (storedata, ">>$data_directory/form1/$count.txt") or Common::error("unable to create $count.txt");

to append, which probably has it's own set of problems.

A better approach would be to understand the password hashing, and use that in album.pl checking.

Can you find out (IPB support forums maybe?) what they use to hash passwords in the DB?

Offline Bytes_U

  • album.pl Donor
  • album.pl Contributor
  • ***
  • Posts: 75
  • Karma: +0/-0
  • Oh no... not again?
Re:Any perl or php gurus out there?
« Reply #2 on: October 21, 2003, 14:04:46 »
I know the proper way is to use the IPB database in MySQL but I just can't get it to recognize/work for album.pl.  BTW, your little code edit worked great so I might just end up using that. All this perl/mysql password decrypting stuff is way over my head  :(

Thanks for the bailer wire fix... it's not the correct way, but it will have to do for now. It's better than getting 400 individual emails and typing each login|password into the author_db.txt by hand. :o
« Last Edit: October 21, 2003, 14:07:17 by Bytes_U »