2
0

Fix .mpw parsing.

This commit is contained in:
Maarten Billemont 2014-05-06 17:21:12 -04:00
parent 7e96496614
commit 09afe61a4c
5 changed files with 14 additions and 15 deletions

2
External/LoveLyndir vendored

@ -1 +1 @@
Subproject commit 97eafd9b59f84bd9e3fc3cb4313df8b3c034e766 Subproject commit adab69df05840d94a3f2f883251869d6cb352b0e

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 9e41cebeba085fce2bbae2592d52bbfd740f9ffb Subproject commit 081c2dec20b3638694a5ad20cd2fddccdb298447

View File

@ -0,0 +1 @@
../Resources/Data/ciphers.plist

View File

@ -132,13 +132,11 @@ int main(int argc, char *const argv[]) {
char *line = NULL; char *line = NULL;
size_t linecap = 0; size_t linecap = 0;
ssize_t linelen; ssize_t linelen;
while ((linelen = getline(&line, &linecap, mpwConfig)) > 0) { while ((linelen = getline(&line, &linecap, mpwConfig)) > 0)
char *configUserName = strsep(&line, "\t: "); if (strcmp(strsep(&line, ":"), userName) == 0) {
if (configUserName == userName) { masterPassword = line;
while (line[0] && strlen(masterPassword = strsep(&line, "\t: ")) == 0);
break; break;
} }
}
if (!masterPassword) { if (!masterPassword) {
fprintf (stderr, "Missing master password for user: %s\n", userName); fprintf (stderr, "Missing master password for user: %s\n", userName);
return 1; return 1;

View File

@ -11,25 +11,25 @@
</array> </array>
<key>Long Password</key> <key>Long Password</key>
<array> <array>
<string>CvcvnoCvcvCvcv</string> <string>CvcvnoCvcvCvcv</string>
<string>CvcvCvcvnoCvcv</string> <string>CvcvCvcvnoCvcv</string>
<string>CvcvCvcvCvcvno</string> <string>CvcvCvcvCvcvno</string>
<string>CvccnoCvcvCvcv</string> <string>CvccnoCvcvCvcv</string>
<string>CvccCvcvnoCvcv</string> <string>CvccCvcvnoCvcv</string>
<string>CvccCvcvCvcvno</string> <string>CvccCvcvCvcvno</string>
<string>CvcvnoCvccCvcv</string> <string>CvcvnoCvccCvcv</string>
<string>CvcvCvccnoCvcv</string> <string>CvcvCvccnoCvcv</string>
<string>CvcvCvccCvcvno</string> <string>CvcvCvccCvcvno</string>
<string>CvcvnoCvcvCvcc</string> <string>CvcvnoCvcvCvcc</string>
<string>CvcvCvcvnoCvcc</string> <string>CvcvCvcvnoCvcc</string>
<string>CvcvCvcvCvccno</string> <string>CvcvCvcvCvccno</string>
<string>CvccnoCvccCvcv</string> <string>CvccnoCvccCvcv</string>
<string>CvccCvccnoCvcv</string> <string>CvccCvccnoCvcv</string>
<string>CvccCvccCvcvno</string> <string>CvccCvccCvcvno</string>
<string>CvcvnoCvccCvcc</string> <string>CvcvnoCvccCvcc</string>
<string>CvcvCvccnoCvcc</string> <string>CvcvCvccnoCvcc</string>
<string>CvcvCvccCvccno</string> <string>CvcvCvccCvccno</string>
<string>CvccnoCvcvCvcc</string> <string>CvccnoCvcvCvcc</string>
<string>CvccCvcvnoCvcc</string> <string>CvccCvcvnoCvcc</string>
<string>CvccCvcvCvccno</string> <string>CvccCvcvCvccno</string>
</array> </array>
@ -70,7 +70,7 @@
<key>n</key> <key>n</key>
<string>0123456789</string> <string>0123456789</string>
<key>o</key> <key>o</key>
<string>@&amp;%?,=[]_:-+*$#!'^~;()/.</string> <string>@&amp;%?,=[]_:-+*$#!'^~;()/.</string>
<key>x</key> <key>x</key>
<string>AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz0123456789!@#$%^&amp;*()</string> <string>AEIOUaeiouBCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz0123456789!@#$%^&amp;*()</string>
</dict> </dict>