-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdumper.ps1
35 lines (31 loc) · 1.03 KB
/
dumper.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<#
.SYNOPSIS
Forgotton Anne save decrypter.
.DESCRIPTION
Decrypts provided save file to plain text.
.PARAMETER saveFile
Location of encrypted save file.
Default is "./ForgottonAnne-Save.new.json".
.PARAMETER dumpFile
Location of output file.
Default is "./ForgottonAnne-Save.dump.json".
.NOTES
Version: 1.0
Author: Zekfad
Creation Date: 31.01.2020
.EXAMPLE
.\dumper.ps1 -saveFile ./ForgottonAnne-Save.new.json -dumpFile ./ForgottonAnne-Save.dump.json
.LINK
https://github.com/Zekfad/ForgottonAnneSave
#>
#requires -Version 5.0
Using module .\ForgottonAnneSave.psm1;
param(
[string] $saveFile = './ForgottonAnne-Save.json',
[string] $dumpFile = './ForgottonAnne-Save.dump.json'
)
[ForgottonAnneSave] $fas = [ForgottonAnneSave]::new();
[byte[]] $save = [System.IO.File]::ReadAllBytes($saveFile);
[string[]] $saveDecrypted = $fas.Decrypt($save);
[byte[]] $saveDecryptedBytes = [Text.Encoding]::UTF8.GetBytes($saveDecrypted);
[System.IO.File]::WriteAllBytes($dumpFile, $saveDecryptedBytes);