Professional Web Applications Themes

General Module question.. Digest::HMAC_MD5 - PERL Modules

So I need to get into my yabbse database and I am using (trying) the Digest::HMAC_MD5 module, which powweb says it has installed, but I cannot get even the simplets script to work. Here it is.. #!/usr/bin/perl use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex); print "Content-type: text/html\n\n"; #$password="password"; #$key="key"; #print hmac_md5_hex($password, "key"); I thought I may have had carriage returns, so I ran multiple conversions, etc., but no luck. If I take out the line use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex); It works fine and prints the html headers. I checked usage at cpan - [url]http://search.cpan.org/~gaas/Digest...est/HMAC_MD5.pm[/url] and all looks good. All I can think of ...

  1. #1

    Default General Module question.. Digest::HMAC_MD5

    So I need to get into my yabbse database and I am using (trying) the
    Digest::HMAC_MD5 module, which powweb says it has installed, but I cannot
    get even the simplets script to work. Here it is..

    #!/usr/bin/perl

    use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex);

    print "Content-type: text/html\n\n";

    #$password="password";
    #$key="key";
    #print hmac_md5_hex($password, "key");


    I thought I may have had carriage returns, so I ran multiple conversions,
    etc., but no luck. If I take out the line

    use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex);

    It works fine and prints the html headers. I checked usage at cpan -

    [url]http://search.cpan.org/~gaas/Digest...est/HMAC_MD5.pm[/url]

    and all looks good. All I can think of is I need to refer to the location of
    the install, or that it is not installed properly. Any other ideas?

    I use powweb for hosting and it shows that they have it installed -
    [url]http://ops.powweb.com/powweb-bin/perldiver.cgi[/url]

    Thanks

    ZafT



    ZafT Guest

  2. #2

    Default Re: General Module question.. Digest::HMAC_MD5

    ZafT wrote:
    > If I take out the line
    >
    > use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex);
    >
    > It works fine ...
    Add this before that line:

    use CGI::Carp 'fatalsToBrowser';

    and you may have the reason why it fails conveniently on the screen.

    --
    Gunnar Hjalmarsson
    Email: [url]http://www.gunnar.cc/cgi-bin/contact.pl[/url]

    Gunnar Hjalmarsson Guest

  3. #3

    Default Re: General Module question.. Digest::HMAC_MD5

    > use CGI::Carp 'fatalsToBrowser';
    >
    > and you may have the reason why it fails conveniently on the screen.


    You are my hero - at least now I have an idea what the problem is. It
    looks like it isn't installed properly.

    Thanks!
    ZafT

    Output below...

    Software error:
    Can't locate Digest/HMAC_MD5.pm in INC (INC contains:
    /usr/local/lib/perl5/site_perl/5.8.0/mach
    /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl
    /usr/local/lib/perl5/5.8.0/BSDPAN /usr/local/lib/perl5/5.8.0/mach
    /usr/local/lib/perl5/5.8.0 .) at md5.pl line 4.
    Please send mail to this site's webmaster for help. Content-type:
    text/html

    Software error:
    [Sat Jan 24 10:16:31 2004] HMAC_MD5.pm: Can't locate
    Digest/HMAC_MD5.pm in INC (INC contains:
    /usr/local/lib/perl5/site_perl/5.8.0/mach
    /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl
    /usr/local/lib/perl5/5.8.0/BSDPAN /usr/local/lib/perl5/5.8.0/mach
    /usr/local/lib/perl5/5.8.0 .) at md5.pl line 4. BEGIN
    failed--compilation aborted at md5.pl line 4.
    Please send mail to this site's webmaster for help.
    Shane Guest

  4. #4

    Default CGI::Carp, was Re: General Module question.. Digest::HMAC_MD5

    On Sat, 24 Jan 2004, Shane wrote:
    > > use CGI::Carp 'fatalsToBrowser';
    > >
    > > and you may have the reason why it fails conveniently on the screen.
    >
    > You are my hero - at least now I have an idea what the problem is. It
    > looks like it isn't installed properly.
    It sure looks that way from your report, yes.

    If you haven't met CGI::Carp before, then there might be other
    useful information contained in, or linked from, perlfaq9 that
    would repay taking a moment to study.
    [url]http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html[/url]

    "FAQs are good for you. Take one frequently, and especially when the
    symptoms occur". -SCNR

    By the way, when putting the final result into production, it's
    probably as well to turn off these CGI::Carp diagnostics from the
    browser window. Obviously they _shouldn't_ be happening in production
    code, but in the event that something goes wrong internally, not only
    are they unhelpful for ordinary users, they might reveal internal
    details of the script that could be helpful to crackers.

    good luck
    Alan J. Flavell Guest

  5. #5

    Default Re: General Module question.. Digest::HMAC_MD5

    Gunnar Hjalmarsson <noreplygunnar.cc> wrote in message news:<butktj$kur2h$1ID-184292.news.uni-berlin.de>...
    > ZafT wrote:
    > > If I take out the line
    > >
    > > use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex);
    > >
    > > It works fine ...
    >
    > Add this before that line:
    >
    > use CGI::Carp 'fatalsToBrowser';
    >
    > and you may have the reason why it fails conveniently on the screen.
    So I just installed the module directory in my cgi-bin and it worked.
    It seems that my hosting provider did not have it installed properly.

    Thanks for the point in the right direction!

    ZafT
    Shane Guest

  6. #6

    Default Re: General Module question.. Digest::HMAC_MD5

    Shane wrote:
    > So I just installed the module directory in my cgi-bin and it
    > worked. It seems that my hosting provider did not have it installed
    > properly.
    >
    > Thanks for the point in the right direction!
    You are welcome.

    "perl diver" may give you a general idea about which modules are
    available on a site, but its result is ambigous in a few respects, and
    - as you know now - the fact that a module gets listed by "perl diver"
    does not guarantee that it's ready to use.

    --
    Gunnar Hjalmarsson
    Email: [url]http://www.gunnar.cc/cgi-bin/contact.pl[/url]

    Gunnar Hjalmarsson Guest

  7. #7

    Default Re: CGI::Carp, was Re: General Module question.. Digest::HMAC_MD5

    In article <Pine.LNX.4.53.0401241838250.20482ppepc56.ph.gla. ac.uk>,
    "Alan J. Flavell" <flavellph.gla.ac.uk> wrote:
    > By the way, when putting the final result into production, it's
    > probably as well to turn off these CGI::Carp diagnostics from the
    > browser window. Obviously they _shouldn't_ be happening in production
    Needless to say I totally agree...
    > code, but in the event that something goes wrong internally, not only
    > are they unhelpful for ordinary users, they might reveal internal
    > details of the script that could be helpful to crackers.
    ....and I also agree with this. But if (or when) something does go wrong
    on the live code it's nice to get this kind of detailed information
    output _somewhere_, like a logfile on the webserver. That way we can see
    it, but the public (and crackers) can't see it. A brief look at the
    CGI::Carp docs makes me think that this should be pretty easy to arrange
    (haven't tried though)

    On our main webserver the custom 500 error page records, IIRC, all the
    handy env. vars in a form and all it asks the user to do is optionally
    add a message and an email address, and hit submit. When we get that
    error report we have stuff like the local time on the server, the
    useragent, etc, all recorded automatically. And once we've got the time
    that the error occurred we can go and look in the logfile to get, maybe,
    more detailed info, which hopefully will alert us to the problem.

    P

    --
    pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
    Remove the tea to reply
    pkent Guest

  8. #8

    Default Re: CGI::Carp, was Re: General Module question.. Digest::HMAC_MD5

    >
    > By the way, when putting the final result into production, it's
    > probably as well to turn off these CGI::Carp diagnostics from the
    > browser window. Obviously they _shouldn't_ be happening in production
    > code, but in the event that something goes wrong internally, not only
    > are they unhelpful for ordinary users, they might reveal internal
    > details of the script that could be helpful to crackers.
    >
    > good luck
    Cool, Thanks for the pointers. This group has been very helpful to me.

    :-) ZafT
    Shane Guest

Similar Threads

  1. Module Digest:SHA
    By Guenther Sohler in forum PERL Modules
    Replies: 2
    Last Post: June 13th, 05:22 AM
  2. Module to retrieve general TTF font info
    By hoyoul@gmail.com in forum Perl / CGI
    Replies: 1
    Last Post: June 2nd, 11:44 AM
  3. ANN: Digest::SHA Module on CPAN
    By Mark Shelor in forum PERL Modules
    Replies: 0
    Last Post: December 14th, 08:08 AM
  4. Replies: 4
    Last Post: August 27th, 12:28 PM
  5. debian-user-digest Digest V2003 #2112
    By John Stevenson in forum Debian
    Replies: 0
    Last Post: July 23rd, 07:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139