mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-22 19:13:11 +00:00
Loadine folders nwo also have the id at the end & you can read the ckey now from otp.bin
This commit is contained in:
parent
ed7bb51c96
commit
c80beecd55
5 changed files with 45 additions and 4 deletions
|
@ -1269,11 +1269,11 @@ namespace UWUVCI_AIO_WPF
|
|||
if (gameName == null || gameName == string.Empty) gameName = "NoName";
|
||||
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
|
||||
//string outputPath = Path.Combine(Properties.Settings.Default.InjectionPath, gameName);
|
||||
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName,"")}");
|
||||
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName,"")} [{mvvm.prodcode}]");
|
||||
int i = 0;
|
||||
while (Directory.Exists(outputPath))
|
||||
{
|
||||
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName, "")}_{i}");
|
||||
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName, "")} [{mvvm.prodcode}]_{i}");
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -1516,8 +1516,9 @@ namespace UWUVCI_AIO_WPF
|
|||
string appXml = Path.Combine(baseRomPath, "code", "app.xml");
|
||||
Random random = new Random();
|
||||
string ID = $"{random.Next(0x3000, 0x10000):X4}{random.Next(0x3000, 0x10000):X4}";
|
||||
string ID2 = $"{random.Next(0x3000, 0x10000):X4}";
|
||||
|
||||
string ID2 = $"{random.Next(0x3000, 0x10000):X4}";
|
||||
mvvm.prodcode = ID2;
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
public class MainViewModel : BaseModel
|
||||
{
|
||||
public string prodcode = "";
|
||||
//public GameConfig GameConfiguration { get; set; }
|
||||
private GameConfig gameConfiguration = new GameConfig();
|
||||
|
||||
|
@ -203,7 +204,33 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
private List<GameBases> lTG16 = new List<GameBases>();
|
||||
|
||||
public string ReadCkeyFromOtp()
|
||||
{ string ret = "";
|
||||
using (var dialog = new System.Windows.Forms.OpenFileDialog())
|
||||
{
|
||||
dialog.Filter = "OTP.bin | otp.bin";
|
||||
DialogResult res = dialog.ShowDialog();
|
||||
if (res == DialogResult.OK)
|
||||
{
|
||||
var filepath = dialog.FileName;
|
||||
using (var fs = new FileStream(filepath,
|
||||
FileMode.Open,
|
||||
FileAccess.Read))
|
||||
{
|
||||
byte[] test = new byte[16];
|
||||
fs.Seek(0xE0, SeekOrigin.Begin);
|
||||
|
||||
fs.Read(test, 0, 16);
|
||||
fs.Close();
|
||||
foreach(var b in test)
|
||||
{
|
||||
ret += string.Format("{0:X2}", b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public List<GameBases> LTG16
|
||||
{
|
||||
|
@ -838,6 +865,7 @@ namespace UWUVCI_AIO_WPF
|
|||
bootsound = "";
|
||||
NKITFLAG = false;
|
||||
CBasePath = null;
|
||||
prodcode = "";
|
||||
if(Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"))) Directory.Delete(Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,11 @@
|
|||
|
||||
</StackPanel>
|
||||
<StackPanel FocusManager.FocusedElement="{Binding ElementName=tbKey }">
|
||||
|
||||
<TextBox x:Name="tbKey" materialDesign:HintAssist.Hint="ENTER KEY" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,40,15,90" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18"/>
|
||||
</StackPanel>
|
||||
<Button Content="Read from otp.bin" HorizontalAlignment="Left" Margin="32,103,0,0" VerticalAlignment="Top" Width="152" Click="Button_Click_2" Name="otp"/>
|
||||
<Label Content="or" HorizontalAlignment="Left" Height="100" Margin="7,92,0,-45" VerticalAlignment="Top" Name="or" FontSize="15"/>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public EnterKey(int i)
|
||||
|
@ -70,7 +71,8 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
Key.Text += "1";
|
||||
}
|
||||
|
||||
or.Visibility = Visibility.Hidden;
|
||||
otp.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,5 +158,10 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
(FindResource("mvm") as MainViewModel).mw.Topmost = false;
|
||||
}
|
||||
|
||||
private void Button_Click_2(object sender, RoutedEventArgs e)
|
||||
{
|
||||
tbKey.Text = (FindResource("mvm") as MainViewModel).ReadCkeyFromOtp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,9 @@ namespace UWUVCI_AIO_WPF
|
|||
mvm.Index = -1;
|
||||
mvm.donttrim = false;
|
||||
mvm.NKITFLAG = false;
|
||||
mvm.prodcode = "";
|
||||
mvm.isDoneMW();
|
||||
|
||||
switch ((sender as ListView).SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
|
|
Loading…
Reference in a new issue