mirror of
https://github.com/4sval/FModel.git
synced 2026-06-22 16:00:17 -05:00
better ux if no aes key is set
This commit is contained in:
parent
6173eddc84
commit
19639a6df7
|
|
@ -118,7 +118,8 @@ namespace FModel.Grabber.Paks
|
|||
MenuItems.pakFiles.Add(new PakMenuItemViewModel
|
||||
{
|
||||
Header = Properties.Resources.LoadAll,
|
||||
Icon = new Image { Source = new BitmapImage(new Uri("Resources/folder-download.png", UriKind.Relative)) }
|
||||
Icon = new Image { Source = new BitmapImage(new Uri("Resources/folder-download.png", UriKind.Relative)) },
|
||||
IsEnabled = false
|
||||
});
|
||||
|
||||
// Separator
|
||||
|
|
|
|||
9
FModel/Properties/Resources.Designer.cs
generated
9
FModel/Properties/Resources.Designer.cs
generated
|
|
@ -1780,6 +1780,15 @@ namespace FModel.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à An encrypted .PAK file has been found. In order to decrypt it, please specify a working AES encryption key.
|
||||
/// </summary>
|
||||
public static string NoKeyWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("NoKeyWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recherche une chaîne localisée semblable à No Text.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite.</v
|
|||
<value>Activé</value>
|
||||
</data>
|
||||
<data name="Encrypted" xml:space="preserve">
|
||||
<value>Crypté</value>
|
||||
<value>Chiffré</value>
|
||||
<comment>sentence example: 200 Encrypted files</comment>
|
||||
</data>
|
||||
<data name="English" xml:space="preserve">
|
||||
|
|
@ -825,4 +825,7 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite.</v
|
|||
<data name="WithPosition" xml:space="preserve">
|
||||
<value>Position / Valeur</value>
|
||||
</data>
|
||||
<data name="NoKeyWarning" xml:space="preserve">
|
||||
<value>Un fichier .PAK chiffré a été trouvé. Afin de le déchiffrer, veuillez spécifier une clé de chiffrement AES fonctionnelle</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1078,4 +1078,7 @@ It's now the most used free software to leak on Fortnite.</value>
|
|||
<data name="Cpp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cpp.xshd;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="NoKeyWarning" xml:space="preserve">
|
||||
<value>An encrypted .PAK file has been found. In order to decrypt it, please specify a working AES encryption key</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -457,9 +457,6 @@
|
|||
<data name="KB" xml:space="preserve">
|
||||
<value>KB</value>
|
||||
</data>
|
||||
<data name="KbkpFilter" xml:space="preserve">
|
||||
<value>FBKP文件(*.fbkp)| *.fbkp |所有文件(*.*)| *.*</value>
|
||||
</data>
|
||||
<data name="Korean" xml:space="preserve">
|
||||
<value>韩语</value>
|
||||
</data>
|
||||
|
|
@ -691,9 +688,6 @@
|
|||
<data name="State" xml:space="preserve">
|
||||
<value>州</value>
|
||||
</data>
|
||||
<data name="Static Key" xml:space="preserve">
|
||||
<value>静态密钥</value>
|
||||
</data>
|
||||
<data name="StaticKeyNotWorking" xml:space="preserve">
|
||||
<value>{0}对您的PAK文件不起作用</value>
|
||||
</data>
|
||||
|
|
@ -787,4 +781,10 @@
|
|||
<data name="YesShowChangelog" xml:space="preserve">
|
||||
<value>是(显示更改日志)</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="FbkpFilter" xml:space="preserve">
|
||||
<value>FBKP文件(*.fbkp)| *.fbkp |所有文件(*.*)| *.*</value>
|
||||
</data>
|
||||
<data name="StaticKey" xml:space="preserve">
|
||||
<value>静态密钥</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -20,7 +20,7 @@ namespace FModel.Utils
|
|||
if (MenuItems.pakFiles.AtLeastOnePak())
|
||||
{
|
||||
if (disableAll)
|
||||
foreach (PakMenuItemViewModel menuItem in MenuItems.pakFiles.GetMenuItemWithPakFiles())
|
||||
foreach (PakMenuItemViewModel menuItem in MenuItems.pakFiles.GetMenuItemsWithPakFiles())
|
||||
menuItem.IsEnabled = false;
|
||||
else
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ namespace FModel.Utils
|
|||
bool mainError = false; // used to avoid notifications about all static paks not working with the key
|
||||
|
||||
StatusBarVm.statusBarViewModel.Reset();
|
||||
foreach (PakMenuItemViewModel menuItem in MenuItems.pakFiles.GetMenuItemWithPakFiles())
|
||||
foreach (PakMenuItemViewModel menuItem in MenuItems.pakFiles.GetMenuItemsWithPakFiles())
|
||||
{
|
||||
// reset everyone
|
||||
menuItem.PakFile.AesKey = null;
|
||||
|
|
@ -61,8 +61,11 @@ namespace FModel.Utils
|
|||
{
|
||||
mainError = true;
|
||||
StatusBarVm.statusBarViewModel.Set(e.Message, Properties.Resources.Error);
|
||||
FConsole.AppendText(string.Format(Properties.Resources.StaticKeyNotWorking, $"0x{sKey}"), FColors.Red, true);
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[AES]", $"0x{sKey} is NOT!!!! working with user's pak files");
|
||||
if (string.IsNullOrEmpty(sKey))
|
||||
FConsole.AppendText(Properties.Resources.NoKeyWarning, FColors.Red, true);
|
||||
else
|
||||
FConsole.AppendText(string.Format(Properties.Resources.StaticKeyNotWorking, $"0x{sKey}"), FColors.Red, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +90,8 @@ namespace FModel.Utils
|
|||
|
||||
menuItem.IsEnabled = menuItem.PakFile.AesKey != null || !menuItem.PakFile.Info.bEncryptedIndex;
|
||||
}
|
||||
|
||||
MenuItems.pakFiles[1].IsEnabled = MenuItems.pakFiles.AtLeastOnePakWithKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,12 +105,14 @@ namespace FModel.ViewModels.MenuItem
|
|||
// comment methods you don't use, thx
|
||||
public static bool AtLeastOnePak(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.Any(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null));
|
||||
public static IEnumerable<PakMenuItemViewModel> GetMenuItemWithPakFiles(this ObservableCollection<dynamic> o) =>
|
||||
public static bool AtLeastOnePakWithKey(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.Any(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null && (x.PakFile.AesKey != null || !x.PakFile.Info.bEncryptedIndex)));
|
||||
public static IEnumerable<PakMenuItemViewModel> GetMenuItemsWithPakFiles(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.Where(x => !x.GetType().Equals(typeof(Separator)) && x.PakFile != null).Select(x => (PakMenuItemViewModel)x));
|
||||
public static int GetPakCount(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemWithPakFiles().Count());
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemsWithPakFiles().Count());
|
||||
public static IEnumerable<PakFileReader> GetPakFileReaders(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemWithPakFiles().Select(x => x.PakFile));
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetMenuItemsWithPakFiles().Select(x => x.PakFile));
|
||||
public static IEnumerable<PakFileReader> GetDynamicPakFileReaders(this ObservableCollection<dynamic> o) =>
|
||||
Application.Current.Dispatcher.Invoke(() => o.GetPakFileReaders().Where(x => x.Info.bEncryptedIndex && !x.Info.EncryptionKeyGuid.Equals(new FGuid(0u, 0u, 0u, 0u))));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user