aa
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package jdshopapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"encoding/base64"
|
||||
"crypto/md5"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
@@ -103,21 +103,10 @@ func TestTryGetCookie(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAAADS(t *testing.T) {
|
||||
str := "AASWvkdk5a60bjm3lFqaoCyzBFIjrHQjoKSY+LN5VcswOzDkqjbjxVyK1Psdqcj3ci0+4I9v3evrtrJHLuUSo3eEfT3+psX6DF45CILeq0VbKxwxkE+AS1WTxr9RTHqaM3g="
|
||||
data, _ := base64.StdEncoding.DecodeString(str)
|
||||
data2, _ := base64.StdEncoding.DecodeString("XsGNdyDyDHnR79iKU6d5LTSJYaQyWAEssDoD7VM5Kks=")
|
||||
b := bytes.NewBuffer(data)
|
||||
b.Next(18)
|
||||
iv := make([]byte, 16)
|
||||
b.Read(iv)
|
||||
main := make([]byte, len(data)-18-16)
|
||||
b.Read(main)
|
||||
decryptedData, err := utils.AESCBCDecpryt(main, data2[:16], iv)
|
||||
// decryptedData, err := Decrypt(main, data2[:16], iv)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fmt.Println("data", string(decryptedData))
|
||||
result := md5.Sum([]byte("2147808258300913830"))
|
||||
chanIndex := int(int64(binary.LittleEndian.Uint32(result[8:])) % int64(1000))
|
||||
|
||||
fmt.Println(chanIndex)
|
||||
}
|
||||
|
||||
func Decrypt(decryptBytes, key, iv []byte) ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user