Skip to content

Highest/plat 37693#106

Open
highesttt wants to merge 8 commits into
mainfrom
highest/plat-37693
Open

Highest/plat 37693#106
highesttt wants to merge 8 commits into
mainfrom
highest/plat-37693

Conversation

@highesttt

Copy link
Copy Markdown

Checklist

@highesttt highesttt requested a review from tulir July 1, 2026 18:37
Comment thread .gitignore Outdated
Comment thread pkg/twittermeow/client.go Outdated
Comment on lines +11 to +14
const ChromeVersion = "149"
const UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" + ChromeVersion + ".0.0.0 Safari/537.36"
const SecCHUserAgent = `"Google Chrome";v="` + ChromeVersion + `", "Chromium";v="` + ChromeVersion + `", "Not)A;Brand";v="24"`
const OSName = "Windows"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are wrong and probably need to be reverted. The TLS library hasn't been updated for Chrome 148+ yet, 141 is still equivalent to 120. The order in sec-ch headers is random and doesn't need to be changed unless implementing proper randomization like how chrome does it

Comment thread pkg/twittermeow/methods/html.go Outdated
Comment thread pkg/connector/login.go Outdated
} else if seconds > 268435455 {
seconds = 268435455
}
timeBytes := []byte{byte(seconds >> 24), byte(seconds >> 16), byte(seconds >> 8), byte(seconds)}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeBytes := []byte{byte(seconds >> 24), byte(seconds >> 16), byte(seconds >> 8), byte(seconds)}
timeBytes := binary.BigEndian.AppendUint32(nil, uint32(seconds))

seconds = 268435455
}
timeBytes := []byte{byte(seconds >> 24), byte(seconds >> 16), byte(seconds >> 8), byte(seconds)}
msBytes := []byte{byte((timestampMillis % 1000) >> 8), byte(timestampMillis % 1000)}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msBytes := []byte{byte((timestampMillis % 1000) >> 8), byte(timestampMillis % 1000)}
msBytes := binary.BigEndian.AppendUint16(nil, timestampMillis % 1000)

Comment on lines +676 to +700
func jetfuelTimezone() string {
if timezone := strings.TrimSpace(os.Getenv("TWITTER_JETFUEL_TIMEZONE")); timezone != "" {
return timezone
}
if local := time.Local.String(); strings.Contains(local, "/") {
return local
}
_, offset := time.Now().Zone()
switch offset {
case -10 * 60 * 60:
return "Pacific/Honolulu"
case -9 * 60 * 60:
return "America/Anchorage"
case -8 * 60 * 60:
return "America/Los_Angeles"
case -7 * 60 * 60:
return "America/Denver"
case -6 * 60 * 60, -5 * 60 * 60:
return "America/Chicago"
case -4 * 60 * 60:
return "America/New_York"
default:
return "UTC"
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these really supposed to be hardcoded?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in this file looks extremely fragile

Comment thread pkg/twittermeow/castle_web_token_test.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants