|
|
@ -6,7 +6,7 @@ import ( |
|
|
|
"encoding/hex" |
|
|
|
"encoding/json" |
|
|
|
"fmt" |
|
|
|
"goInOut/consumers/GZG2ZJHL/protoFiles_zjhl" |
|
|
|
"goInOut/consumers/GZG2ZJHL/protoFiles_zjhl/protoFiles_zjhl_v3" |
|
|
|
"goInOut/utils" |
|
|
|
"google.golang.org/protobuf/proto" |
|
|
|
"log" |
|
|
@ -97,7 +97,7 @@ func TestDeRC4(b *testing.T) { |
|
|
|
|
|
|
|
println("无crc", hex.EncodeToString(RawBytesNoCrc)) |
|
|
|
println("=========") |
|
|
|
complexData := &protoFiles_zjhl.ComplexData{} |
|
|
|
complexData := &protoFiles_zjhl_v3.ComplexData{} |
|
|
|
err := proto.Unmarshal(RawBytesNoCrc, complexData) |
|
|
|
if err != nil { |
|
|
|
println(err.Error()) |
|
|
@ -128,7 +128,7 @@ func TestDeRC4_2(b *testing.T) { |
|
|
|
|
|
|
|
println("无crc", hex.EncodeToString(RawBytesNoCrc)) |
|
|
|
println("=========") |
|
|
|
complexData := &protoFiles_zjhl.ComplexData{} |
|
|
|
complexData := &protoFiles_zjhl_v3.ComplexData{} |
|
|
|
err := proto.Unmarshal(RawBytesNoCrc, complexData) |
|
|
|
if err != nil { |
|
|
|
println(err.Error()) |
|
|
@ -138,7 +138,7 @@ func TestDeRC4_2(b *testing.T) { |
|
|
|
func TestProtobufDe(t *testing.T) { |
|
|
|
s := "0a3508011a1c10c7e84318e6b4e3b6d332220f0dcdcc8c3f15333353401dcdcc0c40721331313131313131313131313131313131313131" |
|
|
|
bs, _ := hex.DecodeString(s) |
|
|
|
complexData := &protoFiles_zjhl.ComplexData{} |
|
|
|
complexData := &protoFiles_zjhl_v3.ComplexData{} |
|
|
|
err := proto.Unmarshal(bs, complexData) |
|
|
|
if err != nil { |
|
|
|
println(err.Error()) |
|
|
|