mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-29 06:25:30 -04:00
Add fake ticket and cert generation
This commit is contained in:
parent
3c44a9751d
commit
7e8c2facdf
5 changed files with 100 additions and 20 deletions
|
@ -1,6 +1,7 @@
|
|||
package wiiudownloader
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -49,3 +50,26 @@ func getDefaultCert(progressWindow *ProgressWindow, client *grab.Client) ([]byte
|
|||
}
|
||||
return nil, fmt.Errorf("failed to download OSv10 cetk, length: %d", len(cetkData))
|
||||
}
|
||||
|
||||
func GenerateCert(tmdData []byte, contentCount uint16, progressWindow *ProgressWindow, client *grab.Client) (bytes.Buffer, error) {
|
||||
cert := bytes.Buffer{}
|
||||
|
||||
cert0, err := getCert(tmdData, 0, contentCount)
|
||||
if err != nil {
|
||||
return bytes.Buffer{}, err
|
||||
}
|
||||
cert.Write(cert0)
|
||||
|
||||
cert1, err := getCert(tmdData, 1, contentCount)
|
||||
if err != nil {
|
||||
return bytes.Buffer{}, err
|
||||
}
|
||||
cert.Write(cert1)
|
||||
|
||||
defaultCert, err := getDefaultCert(progressWindow, client)
|
||||
if err != nil {
|
||||
return bytes.Buffer{}, err
|
||||
}
|
||||
cert.Write(defaultCert)
|
||||
return cert, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue