├── MFA
├── obj
│ ├── Debug
│ │ ├── MFA.csproj.CoreCompileInputs.cache
│ │ ├── MFA.exe
│ │ ├── MFA.pdb
│ │ ├── MFA.Resource1.resources
│ │ ├── MFA.csproj.GenerateResource.cache
│ │ ├── TempPE
│ │ │ ├── Resource1.Designer.cs.dll
│ │ │ └── Properties.Resources.Designer.cs.dll
│ │ ├── MFA.Properties.Resources.resources
│ │ ├── MFA.csproj.AssemblyReference.cache
│ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ └── MFA.csproj.FileListAbsolute.txt
│ └── Release
│ │ ├── MFA.csproj.CoreCompileInputs.cache
│ │ ├── MFA.exe
│ │ ├── MFA.pdb
│ │ ├── MFA.Resource1.resources
│ │ ├── MFA.csproj.GenerateResource.cache
│ │ ├── TempPE
│ │ ├── Resource1.Designer.cs.dll
│ │ └── Properties.Resources.Designer.cs.dll
│ │ ├── MFA.Properties.Resources.resources
│ │ ├── MFA.csproj.AssemblyReference.cache
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ └── MFA.csproj.FileListAbsolute.txt
├── Resources
│ ├── msft.png
│ └── msfticon.ico
├── App.config
├── MFA.sln
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── MFA.csproj
├── Resource1.Designer.cs
├── Program.cs
└── Resource1.resx
└── README.md
/MFA/obj/Debug/MFA.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 60d733a1d3c269f4283b2e24a251a65729294126
2 |
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | e04091e11ab93134cee4a50717af3d4e070a1c84
2 |
--------------------------------------------------------------------------------
/MFA/Resources/msft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/Resources/msft.png
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.exe
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.pdb
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.exe
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.pdb
--------------------------------------------------------------------------------
/MFA/Resources/msfticon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/Resources/msfticon.ico
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.Resource1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.Resource1.resources
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.Resource1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.Resource1.resources
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.csproj.GenerateResource.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.csproj.GenerateResource.cache
--------------------------------------------------------------------------------
/MFA/obj/Debug/TempPE/Resource1.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/TempPE/Resource1.Designer.cs.dll
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.Properties.Resources.resources
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/MFA.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.csproj.GenerateResource.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.csproj.GenerateResource.cache
--------------------------------------------------------------------------------
/MFA/obj/Release/TempPE/Resource1.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/TempPE/Resource1.Designer.cs.dll
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.Properties.Resources.resources
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/MFA.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/MFA/obj/Debug/DesignTimeResolveAssemblyReferences.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/DesignTimeResolveAssemblyReferences.cache
--------------------------------------------------------------------------------
/MFA/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/MFA/obj/Release/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/MFA/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/MFA/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scriptchildie/maliciousCodeMatchingMFA/HEAD/MFA/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/MFA/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Code Matching prompt
2 | A small executable to trick a user to authenticate using code matching MFA
3 |
4 | ## How to compile
5 | This was compiled in visual studio 2022
6 |
7 | ## Usage
8 | `Usage: MFA.exe `
9 |
10 | ## Screenshot
11 | 
12 |
--------------------------------------------------------------------------------
/MFA/obj/Debug/MFA.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.csproj.AssemblyReference.cache
2 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.csproj.CoreCompileInputs.cache
3 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Debug\MFA.exe.config
4 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Debug\MFA.exe
5 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Debug\MFA.pdb
6 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.exe
7 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.pdb
8 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.Resource1.resources
9 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.csproj.GenerateResource.cache
10 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Debug\MFA.Properties.Resources.resources
11 |
--------------------------------------------------------------------------------
/MFA/obj/Release/MFA.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Release\MFA.exe.config
2 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Release\MFA.exe
3 | C:\Users\Alexandros\Desktop\drivers\MFA\bin\Release\MFA.pdb
4 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.csproj.AssemblyReference.cache
5 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.Properties.Resources.resources
6 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.Resource1.resources
7 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.csproj.GenerateResource.cache
8 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.csproj.CoreCompileInputs.cache
9 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.exe
10 | C:\Users\Alexandros\Desktop\drivers\MFA\obj\Release\MFA.pdb
11 |
--------------------------------------------------------------------------------
/MFA/MFA.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34031.279
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MFA", "MFA.csproj", "{0C9227E2-6925-4E7D-9203-1006A0467ED4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {0C9227E2-6925-4E7D-9203-1006A0467ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {0C9227E2-6925-4E7D-9203-1006A0467ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {0C9227E2-6925-4E7D-9203-1006A0467ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {0C9227E2-6925-4E7D-9203-1006A0467ED4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {BC8903F9-2BBE-49F6-8A61-D8CA5B5D83E3}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/MFA/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MFA")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MFA")]
13 | [assembly: AssemblyCopyright("Copyright © 2023")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("0c9227e2-6925-4e7d-9203-1006a0467ed4")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MFA/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace MFA.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | public class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | public static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MFA.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | public static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | public static System.Drawing.Bitmap msft {
67 | get {
68 | object obj = ResourceManager.GetObject("msft", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/MFA/MFA.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {0C9227E2-6925-4E7D-9203-1006A0467ED4}
8 | Exe
9 | MFA
10 | MFA
11 | v4.7.2
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | True
52 | True
53 | Resources.resx
54 |
55 |
56 | True
57 | True
58 | Resource1.resx
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | PublicResXFileCodeGenerator
67 | Resources.Designer.cs
68 |
69 |
70 |
71 | PublicResXFileCodeGenerator
72 | Resource1.Designer.cs
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/MFA/Resource1.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace MFA {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | public class Resource1 {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resource1() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | public static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MFA.Resource1", typeof(Resource1).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | public static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | public static System.Drawing.Bitmap msft {
67 | get {
68 | object obj = ResourceManager.GetObject("msft", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
75 | ///
76 | public static System.Drawing.Icon msfticon {
77 | get {
78 | object obj = ResourceManager.GetObject("msfticon", resourceCulture);
79 | return ((System.Drawing.Icon)(obj));
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/MFA/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.IO;
4 | using System.Reflection;
5 | using System.Reflection.Emit;
6 | using System.Resources;
7 | using System.Windows.Forms;
8 | using static System.Net.Mime.MediaTypeNames;
9 | using Image = System.Drawing.Image;
10 | using Label = System.Windows.Forms.Label;
11 |
12 | namespace ConsoleDialog
13 | {
14 | public class Program
15 | {
16 | public static void Main(string[] args)
17 | {
18 | if (args.Length != 2)
19 | {
20 | Console.WriteLine("Usage: MFA.exe ");
21 | return;
22 | }
23 |
24 | string resourceName = "MFA.Resource1";
25 | ResourceManager rm = new ResourceManager(resourceName, typeof(Program).Assembly);
26 | Image image = (Image)rm.GetObject("msft");
27 | Icon icon = (Icon)rm.GetObject("msfticon");
28 |
29 | string font = "Aldhabi";
30 |
31 | // Create a new dialog box.
32 | Form dialog = new Form();
33 | dialog.Text = "Sign in to your account";
34 | dialog.Size = new Size(400, 400);
35 | dialog.FormBorderStyle = FormBorderStyle.FixedSingle;
36 | dialog.BackColor = Color.White;
37 | dialog.Icon = icon;
38 | dialog.TopMost = true;
39 |
40 |
41 |
42 | PictureBox pictureBox = new PictureBox();
43 | pictureBox.Image = image;
44 | pictureBox.Size = new Size(216, 46);
45 | pictureBox.Location = new System.Drawing.Point(20, 10);
46 |
47 |
48 |
49 |
50 | Label email = new Label();
51 | email.AutoSize = false;
52 | email.Text = args[0];
53 | email.Font = new Font(font, 12);
54 | SizeF textSize = TextRenderer.MeasureText(email.Text, email.Font);
55 | email.Size = new Size(400, (int)textSize.Height + 10);
56 | email.Location = new System.Drawing.Point(20, 80);
57 |
58 | Label approve = new Label() ;
59 | approve.AutoSize = false;
60 | approve.Text = "Approve sign in";
61 | approve.Font = new Font(font, 16, FontStyle.Bold);
62 | textSize = TextRenderer.MeasureText(approve.Text, approve.Font);
63 | approve.Size = new Size(400, (int)textSize.Height + 10);
64 | approve.Location = new System.Drawing.Point(20, 110);
65 |
66 | Label tap = new Label();
67 | tap.AutoSize = false;
68 | tap.Text = "Tap the number you see below in your\n" +
69 | "Microsoft Authenticator app to sign in.";
70 | tap.Font = new Font(font, 12);
71 | textSize = TextRenderer.MeasureText(tap.Text, tap.Font);
72 | tap.Size = new Size(400, (int)textSize.Height + 10);
73 |
74 |
75 | tap.Location = new System.Drawing.Point(20, 164);
76 |
77 | Label number = new Label() ;
78 | number.AutoSize = false;
79 | number.Text = args[1]; ;
80 | number.Font = new Font(font, 25);
81 | textSize = TextRenderer.MeasureText(number.Text, number.Font);
82 | number.Size = new Size(350, (int)textSize.Height + 10);
83 | number.Location = new System.Drawing.Point(10, 220);
84 | number.TextAlign = ContentAlignment.MiddleCenter;
85 |
86 | // Add three paragraphs to the dialog box.
87 | dialog.Controls.Add(pictureBox);
88 | dialog.Controls.Add(email);
89 | dialog.Controls.Add(approve);
90 | dialog.Controls.Add(tap);
91 | dialog.Controls.Add(number);
92 |
93 | //dialog.Controls.Add(flowLayoutPanel1);
94 |
95 | //dialog.Controls.Add(new Label("Hello", Font.Size = 14));
96 | //dialog.Controls.Add(new Label("50", Font.Size = 20));
97 |
98 | // Add a close button to the dialog box.
99 | //Button closeButton = new Button("Close");
100 | //closeButton.Click += (sender, e) => dialog.Close();
101 | //dialog.Controls.Add(closeButton);
102 |
103 | // Display the dialog box.
104 | dialog.ShowDialog();
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/MFA/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\msft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
--------------------------------------------------------------------------------
/MFA/Resource1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | Resources\msft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | Resources\msfticon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
--------------------------------------------------------------------------------