Hi reader, the names Chris. Anyways, I'm having a little trouble with my/a perl script I'm trying to use to update a password list created with the
Apache 2.0.43 Win32 HTTP Server.
---When I use the
htpasswd.exe program provided with the server to add user/password pairs to the .htpasswd file I get entries such as:
chris:$apr1$404.....$FA0t857O4G8WQI/Z2oKi./
username:$apr1$no5.....$pgT9lKz99lQkfMSxiWPRn/
htpasswd says it uses MD5 encoding. But what ever it uses, the passwords validate correctly when the broswer checks them.
---The problem arises when the Perl script makes entries. The script makes additions and deletions properly but it writes then in encoding that even though it should be, isn't the same as the MD5 that htpasswd.exe uses. It adds entries such as:
-- with Digest::MD5->md5, it makes entries like:
user:xâ9·èZ9M.„cy×Þ:
-- with Digest::MD5->md5_hex, it makes entries like:
user:03911647a3b0d004fe91206255d0bb50:
-- with Digest::MD5->md5_base64, it makes entries like:
user:eB/iObfoWjlNLoQXY3nX3g
None of which validates at all. I'm not used to Perl enough yet to go any farther then I've already gone. My knowledge of Java isn't helping in the least, but I know there are a few brains worth admiration here at perl monks, so.
I hope I gave enough information without turning you away from reading everything. If you'd like to take a look at the entire script,
Click HereThanking everyone in advance,
Chris DeGrace - cdguitar01@hotmail.com
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.