Skip to content

Commit

Permalink
feat pow
Browse files Browse the repository at this point in the history
  • Loading branch information
xqdoo00o committed May 31, 2024
1 parent 842a0d4 commit e306e66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/bogdanfinn/tls-client/profiles"
tls "github.com/bogdanfinn/utls"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/gorilla/websocket"
"golang.org/x/crypto/sha3"
"golang.org/x/net/proxy"
Expand Down Expand Up @@ -56,6 +57,7 @@ var (
timeLocation, _ = time.LoadLocation("Asia/Shanghai")
timeLayout = "Mon Jan 2 2006 15:04:05"
cachedHardware = 0
cachedSid = uuid.NewString()
cachedScripts = []string{}
cachedDpl = ""
cachedRequireProof = ""
Expand Down Expand Up @@ -333,7 +335,7 @@ func getConfig() []interface{} {
rand.New(rand.NewSource(time.Now().UnixNano()))
script := cachedScripts[rand.Intn(len(cachedScripts))]
timeNum := (float64(time.Since(startTime).Nanoseconds()) + rand.Float64()) / 1e6
return []interface{}{cachedHardware, getParseTime(), int64(4294705152), 0, userAgent, script, cachedDpl, "zh-CN", "zh-CN", 0, "webkitGetUserMedia−function webkitGetUserMedia() { [native code] }", "location", "ontransitionend", timeNum}
return []interface{}{cachedHardware, getParseTime(), int64(4294705152), 0, userAgent, script, cachedDpl, "zh-CN", "zh-CN", 0, "webkitGetUserMedia−function webkitGetUserMedia() { [native code] }", "location", "ontransitionend", timeNum, cachedSid}
}
func CalcProofToken(require *ChatRequire, proxy string) string {
proof := generateAnswer(require.Proof.Seed, require.Proof.Difficulty, proxy)
Expand Down

0 comments on commit e306e66

Please sign in to comment.