mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-07-09 22:19:58 -05:00
QR2: Wait to send exploit for MKDS Korea
This commit is contained in:
parent
8f91ac874c
commit
39feaa2597
|
|
@ -181,6 +181,7 @@ func (g *GameSpySession) login(command common.GameSpyCommand) {
|
|||
return
|
||||
}
|
||||
|
||||
deviceAuth := false
|
||||
if g.UnitCode == UnitCodeWii {
|
||||
if isLocalhost && !payloadVerExists && !signatureExists {
|
||||
// Players using the DNS, need patching using a QR2 exploit
|
||||
|
|
@ -195,14 +196,17 @@ func (g *GameSpySession) login(command common.GameSpyCommand) {
|
|||
}
|
||||
|
||||
g.NeedsExploit = true
|
||||
deviceAuth = false
|
||||
} else {
|
||||
deviceId = g.verifyExLoginInfo(command, authToken)
|
||||
if deviceId == 0 {
|
||||
return
|
||||
}
|
||||
deviceAuth = true
|
||||
}
|
||||
} else if g.UnitCode == UnitCodeDS {
|
||||
g.NeedsExploit = common.DoesGameNeedExploit(g.GameName)
|
||||
deviceAuth = true
|
||||
} else {
|
||||
logging.Error(g.ModuleName, "Invalid unit code specified:", aurora.Cyan(unitcd))
|
||||
g.replyError(ErrLogin)
|
||||
|
|
@ -272,7 +276,7 @@ func (g *GameSpySession) login(command common.GameSpyCommand) {
|
|||
g.LoginTicket = common.MarshalGPCMLoginTicket(g.User.ProfileId)
|
||||
g.SessionKey = rand.Int31n(290000000) + 10000000
|
||||
|
||||
g.DeviceAuthenticated = !g.NeedsExploit
|
||||
g.DeviceAuthenticated = deviceAuth
|
||||
g.LoggedIn = true
|
||||
g.ModuleName = "GPCM:" + strconv.FormatInt(int64(g.User.ProfileId), 10)
|
||||
g.ModuleName += "/" + common.CalcFriendCodeString(g.User.ProfileId, "RMCJ")
|
||||
|
|
|
|||
|
|
@ -117,9 +117,9 @@ func heartbeat(moduleName string, conn net.PacketConn, addr net.Addr, buffer []b
|
|||
sendChallenge(conn, addr, session, lookupAddr)
|
||||
}
|
||||
|
||||
if !session.ExploitReceived && session.Login != nil && session.Login.NeedsExploit {
|
||||
if login := session.Login; !session.ExploitReceived && login != nil && session.Login.NeedsExploit {
|
||||
// The version of DWC in Mario Kart DS doesn't check matching status
|
||||
if (!noIP && statechanged == "1") || payload["gamename"] == "mariokartds" {
|
||||
if (!noIP && statechanged == "1") || login.GameCode == "AMCE" || login.GameCode == "AMCP" || login.GameCode == "AMCJ" {
|
||||
logging.Notice(moduleName, "Sending SBCM exploit to DNS patcher client")
|
||||
sendClientExploit(moduleName, session)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@ func handleConnection(conn net.PacketConn, addr net.Addr, buffer []byte) {
|
|||
logging.Info(moduleName, "Command:", aurora.Yellow("CLIENT_EXPLOIT_ACK"))
|
||||
|
||||
session.ExploitReceived = true
|
||||
if login := session.Login; login != nil {
|
||||
login.NeedsExploit = false
|
||||
}
|
||||
break
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user