|
|
|
|
@ -98,14 +98,17 @@ func getUUID() int64 { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func processAntiCode(antiCode string, uid int, streamName string) string { |
|
|
|
|
location, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
now := time.Now().In(location) |
|
|
|
|
TimeLocation, err := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
if err != nil { |
|
|
|
|
TimeLocation = time.FixedZone("CST", 8*60*60) |
|
|
|
|
} |
|
|
|
|
now := time.Now().In(TimeLocation) |
|
|
|
|
q, _ := url.ParseQuery(antiCode) |
|
|
|
|
q.Set("t", "102") |
|
|
|
|
q.Set("ctype", "tars_mp") |
|
|
|
|
q.Set("wsTime", strconv.FormatInt(time.Now().Unix()+21600, 16)) |
|
|
|
|
q.Set("ver", "1") |
|
|
|
|
q.Set("sv", now.Format("2006010203")) |
|
|
|
|
q.Set("sv", now.Format("2006010215")) |
|
|
|
|
seqId := strconv.Itoa(uid + int(time.Now().UnixNano()/int64(time.Millisecond))) |
|
|
|
|
q.Set("seqid", seqId) |
|
|
|
|
q.Set("uid", strconv.Itoa(uid)) |
|
|
|
|
|