Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by CoffeeMugDude CoffeeMugDude is offline
Developer Last Online: Nov 2001 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-28-2001 Last Update: Never Installs: 1
 
No support by the author.

Being an old-fashioned sysadmin, I feel better in the mornings if I cannot view my user's passwords.

After installing vBulletin, I was disturbed to find that passwords were stored in cleartext. So, I made a couple of modifications, to ensure that only MD5 encrypted passwords were stored in the database.

I didn't think much of it at the time, I was sure someone had released a hack already. When browsing the VB forums, however, I found that a lot of people wanted a solution like mine.

The main issue of concern seemed to be "But now the lost-password function won't work!"

I put in place a random, "pronounceable password generator" I found on PHPBuilder. When a user "loses" their password, a new, random password is generated and emailed to them, and the MD5 encrypted version is saved into the database.

I chose MD5 because I'm fond of the concept of "one-way" encryption.

Now, no admin can see a member's password. :-)

Enjoy!

(Instructions, and a database-update script are included in the .zip file at http://www.coffeeintherain.com/scripts/md5_hack.zip )

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-17-2001, 09:32 AM
creamy
Guest
 
Posts: n/a
Default

um, i can't fix the last part on my own... maybe someone who knows php can help

when you tell it to mail you a password, its supposed to generate one from a list of words and mail that one and store it in the database. it's getting stuck on the easy part - opening the list of words.
the instructions say:
Quote:
Save the files "ppassgen.php", "encrypt_all_passwords.php", and "words.txt" to your VB "admin" directory.

You can use any word list to generate your random passwords, I used my system's /usr/dict/words. Just be sure to save your wordlist to "words.txt" in your "admin" directory.
well i did that, and i checked the chmod incase it matters, but even at 777 it doesn't work. i get this error instead:

Code:
Warning: fopen("words.txt","r") - No such file or directory in /home/mod-chi/public_html/admin/ppassgen.php on line 29

Warning: Supplied argument is not a valid File-Handle resource in /home/mod-chi/public_html/admin/ppassgen.php on line 37

Warning: Supplied argument is not a valid File-Handle resource in /home/mod-chi/public_html/admin/ppassgen.php on line 38

Warning: Supplied argument is not a valid File-Handle resource in /home/mod-chi/public_html/admin/ppassgen.php on line 37

Warning: Supplied argument is not a valid File-Handle resource in /home/mod-chi/public_html/admin/ppassgen.php on line 38
(repeating forever)
the code in the first part of ppassgen.php is:

Code:
<?
/* 
 * function ppassgen() 
 * parameters: 
 * $words = the name of the file w/ the words (one per line) 
 *      or and array of words 
 * $min = the minimum number of words per password 
 * $max = the maximum number of words per password 
 * $cutoff = the minimum number of characters per word 
 * $sep = separator for the words in the password 
 */ 

function ppassgen($words= "words.txt", $min=2, $max=4, $cutoff=5, $sep= "_") { 

	
		// This is here for cases when we email a password from the admin control panel


    if(is_array($words)) { 
        /* if we have passed and array of words, use it */ 
        $word_arr =  "words"; 
         /* 
        while(list($k,$v) = each(${$word_arr})) { 
            echo "$k $v<BR>"; 
        } 
        */ 
    } else { 
        /* read the external file into an array */ 
        $fp = fopen($words, "r");      <---------------------------- LINE 29

        if (!fp) { 
            echo  "[ERROR}: Could not open file $words<BR>\n"; 
            exit; 
        } else { 
            /* assuming words of up to 127 characters */ 
            $word_arr =  "ext_arr"; 
            while(!feof($fp)) {             <---------------------------- LINE 37
                $tword = trim(fgets($fp,128)); <------------------- LINE 38


                /* check for minimum length and for exclusion of numbers */ 
                if ((strlen($tword) >= $cut_off) && !ereg( "[0-9]",$tword)) { 
                    $ext_arr[] = strtolower($tword); 
                } 
            } 
            fclose($fp); 
        } 
    }

i already tried the following:
not putting quotes around the filename
putting a full path to the words.txt
putting a relative path to words.txt

with no success....
Reply With Quote
  #13  
Old 08-17-2001, 12:36 PM
pogo's Avatar
pogo pogo is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The full path works fine for me
Code:
function ppassgen($words= "/full/path/to/words.txt", $min=2, $max=4, $cutoff=5, $sep= "_") {
Yeah, I should have complained about the wrong encrypt_all_pass... file.
And don't forget to check the mod panel index.php. I think you have to modify something there too.
Reply With Quote
  #14  
Old 08-17-2001, 06:28 PM
creamy
Guest
 
Posts: n/a
Default

hmm
i might not have put /users/ or whatever at the start of my path, i'll try again...
you know what's the most annoying? this file has code in it to detect if the file open failed, but it's not working
Reply With Quote
  #15  
Old 08-22-2001, 06:07 AM
creamy
Guest
 
Posts: n/a
Default

yeah the absolute path to the file works fine...
only problem i have now is when i go to the control panel i have to log in again... dunno if i'm smart enough to figure whats wrong (cookie problem?)
i hope the vbulletin dudes put this in the code soon, i hate hacking my board!
Reply With Quote
  #16  
Old 08-24-2001, 08:10 AM
joecrow
Guest
 
Posts: n/a
Default

does this work with vb 2.0.3 ?
Reply With Quote
  #17  
Old 08-24-2001, 03:16 PM
pogo's Avatar
pogo pogo is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yepp.
Reply With Quote
  #18  
Old 08-24-2001, 05:03 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it seems pogo had some problems

has the install file been updated with the correct details ?
Reply With Quote
  #19  
Old 08-24-2001, 05:47 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have installed this following creamy/pogos changes and it works 100% perfect

thanks
Reply With Quote
  #20  
Old 08-27-2001, 08:00 AM
CoffeeMugDude CoffeeMugDude is offline
 
Join Date: Nov 2001
Location: South Africa
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi folks,

I've been on holiday, so this whole thread happened in my absence. Thanks for the feedback. Is anyone still struggling? Would it help if I updated the instructions for 2.0.3 ?
Reply With Quote
  #21  
Old 08-27-2001, 08:36 AM
creamy
Guest
 
Posts: n/a
Default

yeah that would probably help a lot... this is a kick-ass hack so keeping it updated is good
do you think there could be a problem somewhere? read my earlier post about it making me login again to get into he control panel - this is still happening. not a big problem but might as well fix it if possible.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04288 seconds
  • Memory Usage 2,298KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete