1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00
2021-03-19 04:59:37 +08:00

25 lines
546 B
Go

package tlv
import "github.com/Mrs4s/MiraiGo/binary"
func T1F(isRoot bool, osName, osVersion, simOperatorName, apn []byte, networkType uint16) []byte {
return binary.NewWriterF(func(w *binary.Writer) {
w.WriteUInt16(0x1F)
w.WriteTlv(binary.NewWriterF(func(w *binary.Writer) {
w.WriteByte(func() byte {
if isRoot {
return 1
} else {
return 0
}
}())
w.WriteTlv(osName)
w.WriteTlv(osVersion)
w.WriteUInt16(networkType)
w.WriteTlv(simOperatorName)
w.WriteTlv([]byte{})
w.WriteTlv(apn)
}))
})
}