Skip to content

Commit b87a2c8

Browse files
committed
update
1 parent 391ec3f commit b87a2c8

File tree

7 files changed

+9394
-7820
lines changed

7 files changed

+9394
-7820
lines changed

Kataana/Kataana.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</PropertyGroup>
6464
<ItemGroup>
6565
<Reference Include="BCMakeCert">
66-
<HintPath>C:\Users\paulg\Downloads\BCMakeCert.dll</HintPath>
66+
<HintPath>D:\Fiddler\BCMakeCert.dll</HintPath>
6767
</Reference>
6868
<Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
6969
<HintPath>..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
@@ -75,7 +75,7 @@
7575
<HintPath>C:\Users\paulg\Downloads\dll\DotNetZip.dll</HintPath>
7676
</Reference>
7777
<Reference Include="FiddlerCore">
78-
<HintPath>C:\Users\paulg\Downloads\FiddlerCore.dll</HintPath>
78+
<HintPath>D:\Fiddler\FiddlerCore.dll</HintPath>
7979
</Reference>
8080
<Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
8181
<HintPath>..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
@@ -117,7 +117,7 @@
117117
<RequiredTargetFramework>4.0</RequiredTargetFramework>
118118
</Reference>
119119
<Reference Include="Telerik.NetworkConnections">
120-
<HintPath>C:\Users\paulg\Downloads\Telerik.NetworkConnections.dll</HintPath>
120+
<HintPath>D:\Fiddler\Telerik.NetworkConnections.dll</HintPath>
121121
</Reference>
122122
<Reference Include="WindowsBase" />
123123
<Reference Include="PresentationCore" />
@@ -165,6 +165,7 @@
165165
<SubType>Code</SubType>
166166
</Compile>
167167
<Compile Include="Models\AccountModel.cs" />
168+
<Compile Include="Models\JSON\JSONOptionsModel.cs" />
168169
<Compile Include="Models\PlayernameModel.cs" />
169170
<Compile Include="Models\GetAllModel.cs" />
170171
<Compile Include="Models\JSON\JSONBloodwebModel.cs" />
@@ -243,5 +244,8 @@
243244
<Resource Include="Assets\Images\icon.ico" />
244245
<Resource Include="Assets\Images\icon.png" />
245246
</ItemGroup>
247+
<ItemGroup>
248+
<WCFMetadata Include="Connected Services\" />
249+
</ItemGroup>
246250
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
247251
</Project>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using static Kataana.Models.JSON.JSONSettingsModel;
7+
8+
namespace Kataana.Models.JSON
9+
{
10+
public class JSONOptionModel: BaseModel
11+
{
12+
private bool _temporaryUnlock;
13+
public bool TemporaryUnlock
14+
{
15+
get { return _temporaryUnlock; }
16+
set { SetProperty(ref _temporaryUnlock, value); }
17+
}
18+
19+
private bool _autoRun;
20+
public bool AutoRun
21+
{
22+
get { return _autoRun; }
23+
set { SetProperty(ref _autoRun, value); }
24+
}
25+
26+
private bool _unlockMarket;
27+
public bool UnlockMarket
28+
{
29+
get { return _unlockMarket; }
30+
set { SetProperty(ref _unlockMarket, value); }
31+
}
32+
33+
private bool _spoofPlayername;
34+
public bool SpoofPlayername
35+
{
36+
get { return _spoofPlayername; }
37+
set { SetProperty(ref _spoofPlayername, value); }
38+
}
39+
40+
private bool _bypassAnalytics;
41+
public bool BypassAnalytics
42+
{
43+
get { return _bypassAnalytics; }
44+
set { SetProperty(ref _bypassAnalytics, value); }
45+
}
46+
47+
private bool _bypassLogin;
48+
public bool BypassLogin
49+
{
50+
get { return _bypassLogin; }
51+
set { SetProperty(ref _bypassLogin, value); }
52+
}
53+
54+
private bool _fakeLocation;
55+
public bool FakeLocation
56+
{
57+
get { return _fakeLocation; }
58+
set { SetProperty(ref _fakeLocation, value); }
59+
}
60+
61+
private bool _forceClientValidation;
62+
public bool ForceClientValidation
63+
{
64+
get { return _forceClientValidation; }
65+
set { SetProperty(ref _forceClientValidation, value); }
66+
}
67+
68+
private bool _forceIncentives;
69+
public bool ForceIncentives
70+
{
71+
get { return _forceIncentives; }
72+
set { SetProperty(ref _forceIncentives, value); }
73+
}
74+
}
75+
}

Kataana/Models/OptionsModel.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ namespace Kataana.Models
44
{
55
public class OptionsModel: BaseModel
66
{
7+
private string _optionFile;
8+
public string OptionFile
9+
{
10+
get { return _optionFile; }
11+
set { SetProperty(ref _optionFile, value); }
12+
}
13+
14+
private JSON.JSONOptionModel _JSONOptionModel;
15+
public JSON.JSONOptionModel JSONOptionModel
16+
{
17+
get { return _JSONOptionModel; }
18+
set { SetProperty(ref _JSONOptionModel, value); }
19+
}
20+
721
private bool _temporaryUnlock;
822
public bool TemporaryUnlock
923
{
Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,60 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34
using System.Linq;
5+
using System.Reflection;
46
using System.Text;
57
using System.Threading.Tasks;
68
using System.Windows;
9+
using System.Xml.Linq;
710
using Kataana.Models;
11+
using Newtonsoft.Json;
812

913
namespace Kataana.ViewModels
1014
{
1115
public class OptionsViewModel : BaseViewModel
1216
{
1317
public OptionsModel OptionsModel { get; set; }
18+
public DelegateCommand SaveOptionsCommand { get; set; }
1419

1520
public OptionsViewModel()
1621
{
17-
OptionsModel = new OptionsModel();
22+
OptionsModel = new OptionsModel()
23+
{
24+
OptionFile = "options.json"
25+
};
26+
SaveOptionsCommand = new DelegateCommand(SaveOptions);
27+
28+
LoadOptions();
29+
}
30+
31+
private void LoadOptions()
32+
{
33+
if (File.Exists(OptionsModel.OptionFile) == true)
34+
{
35+
OptionsModel.JSONOptionModel = JsonConvert.DeserializeObject<Models.JSON.JSONOptionModel>(
36+
File.ReadAllText(
37+
OptionsModel.OptionFile,
38+
Encoding.UTF8
39+
)
40+
);
41+
}
42+
}
43+
44+
private void SaveOptions(object data)
45+
{
46+
if (File.Exists(OptionsModel.OptionFile) == true)
47+
{
48+
File.Delete(OptionsModel.OptionFile);
49+
}
50+
51+
File.WriteAllText(
52+
OptionsModel.OptionFile,
53+
JsonConvert.SerializeObject(
54+
OptionsModel.JSONOptionModel
55+
),
56+
Encoding.UTF8
57+
);
1858
}
1959
}
2060
}

Kataana/Views/HomeView.xaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,42 +29,42 @@
2929
</Grid.RowDefinitions>
3030

3131
<StackPanel Grid.Row="0" Orientation="Horizontal">
32-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.TemporaryUnlock}"/>
32+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.TemporaryUnlock, Mode=TwoWay}"/>
3333
<Label Margin="10,0,0,0" Content="Infinite items" VerticalAlignment="Center" Foreground="White"/>
3434
</StackPanel>
3535

3636
<StackPanel Grid.Row="1" Orientation="Horizontal">
37-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.UnlockMarket}"/>
37+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.UnlockMarket, Mode=TwoWay}"/>
3838
<Label Margin="10,0,0,0" Content="Unlock characters &amp; skins" VerticalAlignment="Center" Foreground="White"/>
3939
</StackPanel>
4040

4141
<StackPanel Grid.Row="2" Orientation="Horizontal">
42-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.SpoofPlayername}"/>
42+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.SpoofPlayername, Mode=TwoWay}"/>
4343
<Label Margin="10,0,0,0" Content="Spoof playername" VerticalAlignment="Center" Foreground="White"/>
4444
</StackPanel>
4545

4646
<StackPanel Grid.Row="3" Orientation="Horizontal">
47-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.BypassAnalytics}"/>
47+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.BypassAnalytics, Mode=TwoWay}"/>
4848
<Label Margin="10,0,0,0" Content="Bypass analytics" VerticalAlignment="Center" Foreground="White"/>
4949
</StackPanel>
5050

5151
<StackPanel Grid.Row="4" Orientation="Horizontal">
52-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.BypassLogin}"/>
52+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.BypassLogin, Mode=TwoWay}"/>
5353
<Label Margin="10,0,0,0" Content="Bypass login" VerticalAlignment="Center" Foreground="White"/>
5454
</StackPanel>
5555

5656
<StackPanel Grid.Row="5" Orientation="Horizontal">
57-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.FakeLocation}"/>
57+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.FakeLocation, Mode=TwoWay}"/>
5858
<Label Margin="10,0,0,0" Content="Fake location" VerticalAlignment="Center" Foreground="White"/>
5959
</StackPanel>
6060

6161
<StackPanel Grid.Row="6" Orientation="Horizontal">
62-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.ForceClientValidation}"/>
62+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.ForceClientValidation, Mode=TwoWay}"/>
6363
<Label Margin="10,0,0,0" Content="Force client validation" VerticalAlignment="Center" Foreground="White"/>
6464
</StackPanel>
6565

6666
<StackPanel Grid.Row="7" Orientation="Horizontal">
67-
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.ForceIncentives}"/>
67+
<ToggleButton Height="20" IsChecked="{Binding ProxyViewModel.OptionsViewModel.OptionsModel.JSONOptionModel.ForceIncentives, Mode=TwoWay}"/>
6868
<Label Margin="10,0,0,0" Content="Force incentives" VerticalAlignment="Center" Foreground="White"/>
6969
</StackPanel>
7070
</Grid>
@@ -85,7 +85,12 @@
8585
</Grid>
8686

8787
<Grid Grid.Row="3" VerticalAlignment="Center">
88-
<Button Style="{StaticResource FullButton}" Content="{Binding ProxyViewModel.ProxyModel.Label}" Command="{Binding ProxyViewModel.ChangeStateProxyCommand}"/>
88+
<Grid.ColumnDefinitions>
89+
<ColumnDefinition Width="*"/>
90+
<ColumnDefinition Width="*"/>
91+
</Grid.ColumnDefinitions>
92+
<Button Grid.Column="0" Style="{StaticResource FullButton}" Content="{Binding ProxyViewModel.ProxyModel.Label}" Command="{Binding ProxyViewModel.ChangeStateProxyCommand}"/>
93+
<Button Grid.Column="1" Style="{StaticResource FullButton}" Content="Save" Command="{Binding ProxyViewModel.OptionsViewModel.SaveOptionsCommand}"/>
8994
</Grid>
9095
</Grid>
9196
</UserControl>

0 commit comments

Comments
 (0)