Exploit databaseDownload repository ZIP
GH-ea91ecf629103514d4b348ce44007631
jamf/cve-2020-1206-poc
Sources for CVE-2020-1206
3 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files38
jamf/cve-2020-1206-pocRevision 9e917e593af3
- ↑..Parent directory
- Properties/
- images/
- AdapterPage.xaml
- AdapterPage.xaml.cs
- App.config
- App.xaml
- App.xaml.cs
- AutoDetectionPage.xaml
- AutoDetectionPage.xaml.cs
- ConfigMethodPage.xaml
- ConfigMethodPage.xaml.cs
- ConfigPage.xaml
- ConfigPage.xaml.cs
- DetectingPage.xaml
- Helper.cs
- MainWindow.xaml
- MainWindow.xaml.cs
- Pages.cs
- RulePage.xaml
- RulePage.xaml.cs
- RunPage.xaml
- RunPage.xaml.cs
- SUTInfoPage.xaml
- SUTInfoPage.xaml.cs
- StringResources.Designer.cs
- StringResources.resx
- TestReportWindow.xaml
- TestReportWindow.xaml.cs
- TestSuiteIntro.xml
- TestSuiteWindow.xaml
- TestSuiteWindow.xaml.cs
- UI.csproj
- UserPromptWindow.xaml
- UserPromptWindow.xaml.cs
- WelcomePage.xaml
- WelcomePage.xaml.cs
- app.manifest
- config-blue.ico
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
ProtocolTestManager/UI/UserPromptWindow.xaml.cs
C# · 2,511 bytes// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Microsoft.Protocols.TestManager.UI
{
public partial class UserPromptWindow : Window
{
private UserPromptWindow()
{
InitializeComponent();
}
private void GenerateContent(string contentString, bool hasLinks)
{
if (hasLinks)
{
var children = Helper.GenerateInlines(contentString);
content.Inlines.AddRange(children);
}
else
{
content.Inlines.Add(new Run(contentString));
}
}
private static ImageSource GetIcon(Icon icon)
{
var bitmap = icon.ToBitmap();
var hBitmap = bitmap.GetHbitmap();
var result = Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
return result;
}
public enum IconType
{
Error,
Warning,
Information,
}
public static void Show(string title, string text, IconType iconType)
{
ShowInternal(title, text, false, iconType);
}
public static void ShowWithLinks(string title, string source, IconType iconType)
{
ShowInternal(title, source, true, iconType);
}
private static void ShowInternal(string title, string content, bool hasLinks, IconType iconType)
{
var window = new UserPromptWindow();
window.Title = title;
window.GenerateContent(content, hasLinks);
var iconMap = new Dictionary<IconType, Icon>
{
[IconType.Error] = SystemIcons.Error,
[IconType.Warning] = SystemIcons.Warning,
[IconType.Information] = SystemIcons.Information,
};
window.icon.Source = GetIcon(iconMap[iconType]);
window.button.Click += (s, e) =>
{
window.Close();
};
window.Owner = App.Current.MainWindow;
window.ShowDialog();
}
}
}