static void Main(string[] args) { // Banner DesertNut_h.PrintBanner(); if (args.Length == 0) { Console.WriteLine("[!] No arguments given..", Color.Red); Console.WriteLine(" => -l(--ListSubclassWndProps) List potentially injectable properties.", Color.LightGreen); Console.WriteLine(" => -i(--Inject) Inject notepad shellcode into explorer.", Color.LightGreen); } else { int ListSubclassWndProp = Array.FindIndex(args, s => new Regex(@"(?i)(-|--|/)(l|ListSubclassWndProps)$").Match(s).Success); int PROPagate = Array.FindIndex(args, s => new Regex(@"(?i)(-|--|/)(i|Inject)$").Match(s).Success); if (ListSubclassWndProp != -1) { List <DesertNut_h.WndPropStruc> CallResult = DesertNut_h.EnumSubClassProps(true); if (CallResult.Count == 0) { Console.WriteLine("[!] Unable to get Subclassed Window Properties..", Color.Red); } return; } else if (PROPagate != -1) { PROPPagate(); } } }
static void Main(string[] args) { // Banner DesertNut_h.PrintBanner(); int ListSubclassWndProp = Array.FindIndex(args, s => new Regex(@"(?i)(-|--|/)(l|ListSubclassWndProps)$").Match(s).Success); //int PROPagate = Array.FindIndex(args, s => new Regex(@"(?i)(-|--|/)(i|Inject)$").Match(s).Success); Process[] explorerPid = Process.GetProcessesByName("explorer"); Process EntryOne = explorerPid[0]; int PROPagate = EntryOne.Id; if (ListSubclassWndProp != -1) { List <DesertNut_h.WndPropStruc> CallResult = DesertNut_h.EnumSubClassProps(true); if (CallResult.Count == 0) { Console.WriteLine("[!] Unable to get Subclassed Window Properties..", Color.Red); } return; } else if (PROPagate != -1) { PROPPagate(); } }