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

my $file = $ARGV[0];
open(IN, $file) or die "can't open $file\n";
my @array =<IN>;
close(IN);

foreach(@array) {
    chomp;
    s/\t+/\t/g;
    my ($domain,$user) = split("\t",$_);
    
    if (/([0-9A-Z]{32}+)\t([0-9A-Z]{32}+)/) {
        my ($lmhash,$ntlmhash) = ($1,$2);
        print $user . ":0:" . $lmhash . ":" . $ntlmhash . ":::\n";
    }
}

