Skip to content

Commit a72bee7

Browse files
committed
Add project files.
1 parent 5bbbfd0 commit a72bee7

13 files changed

+620
-0
lines changed

JWTValidtor_Framework.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29728.190
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JWTValidtor_Framework", "JWTValidtor_Framework\JWTValidtor_Framework.csproj", "{A20AA75C-4864-4E3E-B1F2-840823072550}"
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+
{A20AA75C-4864-4E3E-B1F2-840823072550}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{A20AA75C-4864-4E3E-B1F2-840823072550}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A20AA75C-4864-4E3E-B1F2-840823072550}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{A20AA75C-4864-4E3E-B1F2-840823072550}.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 = {C205C218-B8AD-45C6-8535-78240CA3E47E}
24+
EndGlobalSection
25+
EndGlobal

JWTValidtor_Framework/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
5+
</startup>
6+
</configuration>

JWTValidtor_Framework/App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="JWTValidtor_Framework.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:JWTValidtor_Framework"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

JWTValidtor_Framework/App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace JWTValidtor_Framework
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{A20AA75C-4864-4E3E-B1F2-840823072550}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>JWTValidtor_Framework</RootNamespace>
10+
<AssemblyName>JWTValidtor_Framework</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<Deterministic>true</Deterministic>
16+
<TargetFrameworkProfile />
17+
<PublishUrl>publish\</PublishUrl>
18+
<Install>true</Install>
19+
<InstallFrom>Disk</InstallFrom>
20+
<UpdateEnabled>false</UpdateEnabled>
21+
<UpdateMode>Foreground</UpdateMode>
22+
<UpdateInterval>7</UpdateInterval>
23+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24+
<UpdatePeriodically>false</UpdatePeriodically>
25+
<UpdateRequired>false</UpdateRequired>
26+
<MapFileExtensions>true</MapFileExtensions>
27+
<ApplicationRevision>0</ApplicationRevision>
28+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29+
<IsWebBootstrapper>false</IsWebBootstrapper>
30+
<UseApplicationTrust>false</UseApplicationTrust>
31+
<BootstrapperEnabled>true</BootstrapperEnabled>
32+
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
34+
<PlatformTarget>AnyCPU</PlatformTarget>
35+
<DebugSymbols>true</DebugSymbols>
36+
<DebugType>full</DebugType>
37+
<Optimize>false</Optimize>
38+
<OutputPath>bin\Debug\</OutputPath>
39+
<DefineConstants>DEBUG;TRACE</DefineConstants>
40+
<ErrorReport>prompt</ErrorReport>
41+
<WarningLevel>4</WarningLevel>
42+
</PropertyGroup>
43+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44+
<PlatformTarget>AnyCPU</PlatformTarget>
45+
<DebugType>none</DebugType>
46+
<Optimize>true</Optimize>
47+
<OutputPath>bin\Release\</OutputPath>
48+
<DefineConstants>TRACE</DefineConstants>
49+
<ErrorReport>prompt</ErrorReport>
50+
<WarningLevel>4</WarningLevel>
51+
</PropertyGroup>
52+
<ItemGroup>
53+
<Reference Include="JsonWebTokens, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>..\packages\JsonWebTokens.4.0.0\lib\netstandard2.0\JsonWebTokens.dll</HintPath>
55+
</Reference>
56+
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
57+
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
58+
</Reference>
59+
<Reference Include="System" />
60+
<Reference Include="System.Data" />
61+
<Reference Include="System.Xml" />
62+
<Reference Include="Microsoft.CSharp" />
63+
<Reference Include="System.Core" />
64+
<Reference Include="System.Xml.Linq" />
65+
<Reference Include="System.Data.DataSetExtensions" />
66+
<Reference Include="System.Net.Http" />
67+
<Reference Include="System.Xaml">
68+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
69+
</Reference>
70+
<Reference Include="WindowsBase" />
71+
<Reference Include="PresentationCore" />
72+
<Reference Include="PresentationFramework" />
73+
</ItemGroup>
74+
<ItemGroup>
75+
<ApplicationDefinition Include="App.xaml">
76+
<Generator>MSBuild:Compile</Generator>
77+
<SubType>Designer</SubType>
78+
</ApplicationDefinition>
79+
<Page Include="MainWindow.xaml">
80+
<Generator>MSBuild:Compile</Generator>
81+
<SubType>Designer</SubType>
82+
</Page>
83+
<Compile Include="App.xaml.cs">
84+
<DependentUpon>App.xaml</DependentUpon>
85+
<SubType>Code</SubType>
86+
</Compile>
87+
<Compile Include="MainWindow.xaml.cs">
88+
<DependentUpon>MainWindow.xaml</DependentUpon>
89+
<SubType>Code</SubType>
90+
</Compile>
91+
</ItemGroup>
92+
<ItemGroup>
93+
<Compile Include="Properties\AssemblyInfo.cs">
94+
<SubType>Code</SubType>
95+
</Compile>
96+
<Compile Include="Properties\Resources.Designer.cs">
97+
<AutoGen>True</AutoGen>
98+
<DesignTime>True</DesignTime>
99+
<DependentUpon>Resources.resx</DependentUpon>
100+
</Compile>
101+
<Compile Include="Properties\Settings.Designer.cs">
102+
<AutoGen>True</AutoGen>
103+
<DependentUpon>Settings.settings</DependentUpon>
104+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
105+
</Compile>
106+
<EmbeddedResource Include="Properties\Resources.resx">
107+
<Generator>ResXFileCodeGenerator</Generator>
108+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
109+
</EmbeddedResource>
110+
<None Include="packages.config" />
111+
<None Include="Properties\Settings.settings">
112+
<Generator>SettingsSingleFileGenerator</Generator>
113+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
114+
</None>
115+
</ItemGroup>
116+
<ItemGroup>
117+
<None Include="App.config" />
118+
</ItemGroup>
119+
<ItemGroup>
120+
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
121+
<Visible>False</Visible>
122+
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
123+
<Install>true</Install>
124+
</BootstrapperPackage>
125+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
126+
<Visible>False</Visible>
127+
<ProductName>.NET Framework 3.5 SP1</ProductName>
128+
<Install>false</Install>
129+
</BootstrapperPackage>
130+
</ItemGroup>
131+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
132+
</Project>

JWTValidtor_Framework/MainWindow.xaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Window x:Class="JWTValidetor.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:JWTValidetor"
7+
mc:Ignorable="d"
8+
Title="JWTValidetor" Height="450" Width="310">
9+
<Grid Background="#FF4E92B9">
10+
<Button x:Name="BtnCheckValid" Content="CheckValid" Margin="0,0,16,15" Click="BtnCheckValid_Click" Height="30" VerticalAlignment="Bottom" Background="{x:Null}" Foreground="White" BorderBrush="White" HorizontalAlignment="Right" Width="78"/>
11+
<Button x:Name="BtnSelectList" Content="Select List" HorizontalAlignment="Left" Margin="195,22,0,0" VerticalAlignment="Top" RenderTransformOrigin="-1.741,4.361" Width="96" Click="BtnSelectList_Click" Background="{x:Null}" Foreground="White" BorderBrush="White"/>
12+
<TextBox x:Name="TxtAddressFile" HorizontalAlignment="Left" Margin="20,24,0,0" Text="" TextWrapping="NoWrap" VerticalAlignment="Top" Width="153"/>
13+
<TextBox VerticalScrollBarVisibility="Auto" AcceptsReturn="True" x:Name="TxtJWTToken" HorizontalAlignment="Center" Margin="0,80,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="271" Height="148"/>
14+
<Label Content="Jwt token :" HorizontalAlignment="Left" Margin="20,50,0,0" Foreground="White" Height="25" VerticalAlignment="Top"/>
15+
<ListView x:Name="LogShow" Margin="0,233,0,50" HorizontalAlignment="Center" Width="270">
16+
<ListView.View>
17+
<GridView>
18+
<GridViewColumn Header="Logs" Width="220px"/>
19+
</GridView>
20+
</ListView.View>
21+
</ListView>
22+
<Button Content="About" HorizontalAlignment="Left" Margin="16,0,0,15" Width="67" Click="Button_Click" Background="{x:Null}" BorderBrush="White" Foreground="White" Height="30" VerticalAlignment="Bottom"/>
23+
24+
25+
</Grid>
26+
</Window>
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+

2+
using Microsoft.Win32;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.ComponentModel;
6+
using System.Linq;
7+
using System.Threading.Tasks;
8+
using System.Windows;
9+
10+
11+
12+
namespace JWTValidetor
13+
{
14+
/// <summary>
15+
/// Interaction logic for MainWindow.xaml
16+
/// </summary>
17+
public partial class MainWindow : Window
18+
{
19+
List<string> listpasswords = new List<string>();
20+
BackgroundWorker worker = new BackgroundWorker();
21+
public string JWTToken { get; set; }
22+
public MainWindow()
23+
{
24+
InitializeComponent();
25+
}
26+
27+
private void BtnCheckValid_Click(object sender, RoutedEventArgs e)
28+
{
29+
worker.WorkerReportsProgress = true;
30+
worker.WorkerSupportsCancellation = true;
31+
32+
worker.DoWork += BruteForce;
33+
worker.RunWorkerCompleted += RunWorkerCompleted;
34+
worker.ProgressChanged += ProgressChanged;
35+
worker.RunWorkerAsync(TxtJWTToken.Text);
36+
}
37+
38+
private void ProgressChanged(object sender, ProgressChangedEventArgs e)
39+
{
40+
41+
}
42+
43+
private void RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
44+
{
45+
WriteToTextBox("Finish");
46+
}
47+
48+
private void BruteForce(object sender, DoWorkEventArgs e)
49+
{
50+
if (string.IsNullOrEmpty(e.Argument.ToString()))
51+
{
52+
MessageBox.Show("Jwt is Empty!");
53+
return;
54+
}
55+
JWTToken = e.Argument.ToString();
56+
foreach (var item in listpasswords)
57+
{
58+
var ret = invalidnew(item);
59+
if (ret)
60+
{
61+
MessageBox.Show("Passwod Find " + item);
62+
WriteToTextBox("Find Password " + item);
63+
return;
64+
}
65+
else
66+
WriteToTextBox("Faild " + item);
67+
}
68+
}
69+
70+
private void WriteToTextBox(string text)
71+
{
72+
if (this.LogShow.Dispatcher.CheckAccess())
73+
{
74+
this.LogShow.Items.Add(text);
75+
}
76+
else
77+
{
78+
this.LogShow.Dispatcher.Invoke(
79+
System.Windows.Threading.DispatcherPriority.Normal,
80+
new Action(() => { LogShow.Items.Add(text); }));
81+
}
82+
}
83+
public bool invalidnew(string secret)
84+
{
85+
86+
87+
88+
try
89+
{
90+
string jsonPayload = Jwt.JsonWebToken.Decode(JWTToken, secret);
91+
92+
return true;
93+
}
94+
catch
95+
{
96+
97+
98+
}
99+
return false;
100+
}
101+
102+
private void BtnSelectList_Click(object sender, RoutedEventArgs e)
103+
{
104+
// Create OpenFileDialog
105+
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
106+
107+
108+
109+
// Set filter for file extension and default file extension
110+
dlg.DefaultExt = ".png";
111+
dlg.Filter = "TXT Files (*.txt)|*.txt";
112+
113+
// Display OpenFileDialog by calling ShowDialog method
114+
Nullable<bool> result = dlg.ShowDialog();
115+
// Get the selected file name and display in a TextBox
116+
if (result == true)
117+
{
118+
// Open document
119+
string filename = dlg.FileName;
120+
TxtAddressFile.Text = filename;
121+
listpasswords.AddRange(System.IO.File.ReadAllLines(filename).ToList());
122+
123+
}
124+
}
125+
126+
private void Button_Click(object sender, RoutedEventArgs e)
127+
{
128+
MessageBox.Show("Github && twitter : @begininvoke");
129+
}
130+
}
131+
}

0 commit comments

Comments
 (0)