#!/bin/blog

January 8, 2004

chkmd5cap

Filed under: Internet, Notizen, perl — Tags: — martin @ 7:53 pm

#!/usr/bin/perl -w
require 5.000;
use strict;

# Test if this System can handle MD5 Passwords

my $testpw = '$1$oTg0Hgpx$lI1RZ2NHlP2TBv21ntM0h/';     # "foo"

print STDERR "Checking for MD5 password compatibility... ";

if ($testpw eq (crypt('foo', $testpw))){
        print STDERR "Yes.\n";
        exit 0;
}else{
        print STDERR "No.\n";
        exit 1;
}
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: