Update Program.cs

pull/49/head
Mr.Un1k0d3r 3 years ago committed by GitHub
parent d2e96c1dc7
commit 86156cfce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      SharpPrintNightmare/SharpPrintNightmare/Program.cs

@ -70,7 +70,10 @@ namespace SharpPrintNightmare
dllpath = args[0]; dllpath = args[0];
if (dllpath.Contains("\\\\")) if (dllpath.Contains("\\\\"))
{ {
dllpath = dllpath.Replace("\\\\", "\\??\\UNC\\"); // only replace the first occurence of \\\\
string pattern = "\\\\";
int position = dllpath.IndexOf("\\\\");
dllpath = dllpath.Remove(position, pattern.Length).Insert(position, "\\??\\UNC\\");
} }
if (args.Length > 2) if (args.Length > 2)

Loading…
Cancel
Save