1. Marcin Kasperski
  2. perl/keyring/osxkeychain

Commits

Marcin Kasperski  committed 8428ffc

fixs

  • Participants
  • Parent commits 27b3130
  • Branches default

Comments (0)

Files changed (1)

File lib/Passwd/Keyring/OSXKeychain.pm

View file
 sub _parse_password_from_find_output {
     my ($text) = @_;
 
+    if($text =~ /^ *password: *"([^"]*)"/m)  {
+        return $1;
+    }
+    elsif($text =~ /^ *password: *\$([0-9A-Fa-f]*)/m) {
+        return unpack("h*", $1);
+    }
+    elsif($text =~ /^ *password: *$/m)  {
+        return "";
+    }
+
 }
 
 =head2 get_password($user_name, $realm)