mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-03-21 17:44:58 -05:00
NAS: Support multiple Stage1 versions
This commit is contained in:
parent
c6cae968fb
commit
e6172fa941
|
|
@ -9,17 +9,21 @@ import (
|
|||
"crypto/x509"
|
||||
"encoding/hex"
|
||||
"encoding/pem"
|
||||
"github.com/logrusorgru/aurora/v3"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"wwfc/logging"
|
||||
|
||||
"github.com/logrusorgru/aurora/v3"
|
||||
)
|
||||
|
||||
func downloadStage1(w http.ResponseWriter, stage1Ver int) {
|
||||
// TODO: Actually use the stage 1 version
|
||||
dat, err := os.ReadFile("payload/stage1.bin")
|
||||
path := "payload/stage1.bin"
|
||||
if stage1Ver != 0 {
|
||||
path = "payload/stage1v" + strconv.Itoa(stage1Ver) + ".bin"
|
||||
}
|
||||
dat, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user