Skip to content

Commit

Permalink
Update WhatsApp connection client payload
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 9, 2024
1 parent ed82a5d commit b341740
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions messagix/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ import (
)

const DPR = "1"
const BrowserName = "Chrome"
const ChromeVersion = "118"
const ChromeVersionFull = ChromeVersion + ".0.5993.89"
const UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" + ChromeVersion + ".0.0.0 Safari/537.36"
const SecCHUserAgent = `"Chromium";v="` + ChromeVersion + `", "Google Chrome";v="` + ChromeVersion + `", "Not-A.Brand";v="99"`
const SecCHFullVersionList = `"Chromium";v="` + ChromeVersionFull + `", "Google Chrome";v="` + ChromeVersionFull + `", "Not-A.Brand";v="99.0.0.0"`
const SecCHPlatform = `"Linux"`
const SecCHPlatformVersion = `"6.5.0"`
const OSName = "Linux"
const OSVersion = "6.5.0"
const SecCHPlatform = `"` + OSName + `"`
const SecCHPlatformVersion = `"` + OSVersion + `"`
const SecCHMobile = "?0"
const SecCHModel = ""
const SecCHPrefersColorScheme = "light"
Expand Down
10 changes: 5 additions & 5 deletions messagix/e2ee-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *Client) getClientPayload() *waProto.ClientPayload {
Passive: proto.Bool(false),
Pull: proto.Bool(true),
UserAgent: &waProto.ClientPayload_UserAgent{
Device: proto.String("Firefox"),
Device: proto.String(BrowserName),
AppVersion: &waProto.ClientPayload_UserAgent_AppVersion{
Primary: proto.Uint32(301),
Secondary: proto.Uint32(0),
Expand All @@ -62,15 +62,15 @@ func (c *Client) getClientPayload() *waProto.ClientPayload {
LocaleCountryIso31661Alpha2: proto.String("en"),
LocaleLanguageIso6391: proto.String("en"),
//Hardware: proto.String("Linux"),
Manufacturer: proto.String("Linux"),
Manufacturer: proto.String(OSName),
Mcc: proto.String("000"),
Mnc: proto.String("000"),
OsBuildNumber: proto.String("6.0.0"),
OsVersion: proto.String("6.0.0"),
OsBuildNumber: proto.String(""),
OsVersion: proto.String(""),
//SimMcc: proto.String("000"),
//SimMnc: proto.String("000"),

Platform: waProto.ClientPayload_UserAgent_WEB.Enum(), // or BLUE_WEB?
Platform: waProto.ClientPayload_UserAgent_BLUE_WEB.Enum(),
ReleaseChannel: waProto.ClientPayload_UserAgent_DEBUG.Enum(),
},
}
Expand Down

0 comments on commit b341740

Please sign in to comment.