WindowsEveryonePrincipal : update regex for FR

"Everyone" in a french Windows is "Tout le monde".
Thus, the line.split(" ") returns only "Tout" and putBlob() throws an exception.
The modified regex search for the first two consecutive white char to return the name.
Windows's whoami returns a bunch of 0x20 between the name and the type.
This commit is contained in:
mildis 2017-01-05 09:16:24 +01:00 committed by Zack Shoylev
parent f8025790bf
commit 61d0920f19
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ public class Utils {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
while ((line = reader.readLine()) != null) {
if (line.indexOf("S-1-1-0") != -1) {
return line.split(" ")[0];
return line.split("\\s{2,}")[0];
}
}
}