Skip to content

Commit

Permalink
use custom bx
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Jul 8, 2023
1 parent 02d1fbf commit 9b33855
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ func GetOpenAIToken() (string, string, error) {
return token, hex, err
}

func GetOpenAITokenWithBx(bx string) (string, error) {
func GetOpenAITokenWithBx(bx string) (string, string, error) {
hex := randomHex(32)
return sendRequest(hex, getBdaWitBx(bx))
token, err := sendRequest(hex, getBdaWitBx(bx))
return token, hex, err
}

//goland:noinspection SpellCheckingInspection,GoUnhandledErrorResult
Expand Down
2 changes: 1 addition & 1 deletion cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
}

func captchaStart(c *gin.Context) {
token, hex, err := funcaptcha.GetOpenAIToken()
token, hex, err := funcaptcha.GetOpenAITokenWithBx(`[{"key":"enhanced_fp","value":[{"key":"navigator_battery_charging","value":true}]},{"key":"fe","value":["DNT:1","L:zh-CN","D:24","PR:1","S:1920,1080","AS:1920,1080","TO:-480","SS:true","LS:true","IDB:true","B:false","ODB:true","CPUC:unknown","PK:Linux x86_64","CFP:11866 se","H:16","SWF:false"]}]`)
if err == nil {
c.JSON(200, gin.H{"token": token, "status": "success"})
return
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func main() {
token, hex, err := funcaptcha.GetOpenAIToken()
token, hex, err := funcaptcha.GetOpenAITokenWithBx(`[{"key":"enhanced_fp","value":[{"key":"navigator_battery_charging","value":true}]},{"key":"fe","value":["DNT:1","L:zh-CN","D:24","PR:1","S:1920,1080","AS:1920,1080","TO:-480","SS:true","LS:true","IDB:true","B:false","ODB:true","CPUC:unknown","PK:Linux x86_64","CFP:11866 se","H:16","SWF:false"]}]`)
log.Println(token)

if err == nil {
Expand Down

0 comments on commit 9b33855

Please sign in to comment.