Run goimports
This commit is contained in:
parent
02ef5ab82c
commit
cdf9b1e4a0
16 changed files with 127 additions and 130 deletions
|
@ -2,6 +2,7 @@ package binary
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
|
|
1
libgm/cache/settings.go
vendored
1
libgm/cache/settings.go
vendored
|
@ -1,6 +1,5 @@
|
|||
package cache
|
||||
|
||||
|
||||
type Settings struct {
|
||||
CarrierName string `json:"carrierName,omitempty"`
|
||||
HexHash string `json:"hexHash,omitempty"`
|
||||
|
|
|
@ -26,13 +26,13 @@ func (t *JWK) Marshal() ([]byte, error) {
|
|||
JWKJSON, err := json.Marshal(t)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to marshal JWK: %v", err)
|
||||
return nil,err
|
||||
return nil, err
|
||||
}
|
||||
fmt.Printf("%s\n", JWKJSON)
|
||||
return JWKJSON,err
|
||||
return JWKJSON, err
|
||||
}
|
||||
|
||||
func (t *JWK) PrivKeyB64Bytes() ([]byte, error){
|
||||
func (t *JWK) PrivKeyB64Bytes() ([]byte, error) {
|
||||
decodedPrivateKey, err2 := Base64Decode(t.D)
|
||||
return decodedPrivateKey, err2
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func GenerateECDSA_P256_JWK() (*JWK, error) {
|
|||
privKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to generate private key: %v", err)
|
||||
return nil,err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
JWK := &JWK{
|
||||
|
@ -109,5 +109,5 @@ func GenerateECDSA_P256_JWK() (*JWK, error) {
|
|||
Ext: true,
|
||||
KeyOps: []string{"sign"},
|
||||
}
|
||||
return JWK,nil
|
||||
return JWK, nil
|
||||
}
|
|
@ -75,7 +75,7 @@ func (ic *ImageCryptor) Decrypt(iv []byte, data []byte, aad []byte) ([]byte, err
|
|||
|
||||
func (ic *ImageCryptor) EncryptData(data []byte) ([]byte, error) {
|
||||
rawChunkSize := 1 << 15
|
||||
chunkSize := rawChunkSize-28
|
||||
chunkSize := rawChunkSize - 28
|
||||
var tasks []chan []byte
|
||||
chunkIndex := 0
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package debug
|
|||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/mattn/go-colorable"
|
||||
zerolog "github.com/rs/zerolog"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package events
|
||||
|
||||
|
||||
type BROWSER_ACTIVE struct {
|
||||
SessionId string
|
||||
}
|
||||
|
@ -11,13 +10,13 @@ func NewBrowserActive(sessionId string) *BROWSER_ACTIVE {
|
|||
}
|
||||
}
|
||||
|
||||
type BATTERY struct {}
|
||||
type BATTERY struct{}
|
||||
|
||||
func NewBattery() *BATTERY {
|
||||
return &BATTERY{}
|
||||
}
|
||||
|
||||
type DATA_CONNECTION struct {}
|
||||
type DATA_CONNECTION struct{}
|
||||
|
||||
func NewDataConnection() *DATA_CONNECTION {
|
||||
return &DATA_CONNECTION{}
|
||||
|
|
|
@ -42,7 +42,6 @@ func (s *SessionHandler) addRequestToChannel(requestId string, opCode int64) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func (s *SessionHandler) respondToRequestChannel(res *Response) {
|
||||
requestId := res.Data.RequestId
|
||||
reqChannel, ok := s.requests[requestId]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package util
|
||||
|
||||
|
||||
var GOOG_API_KEY = "AIzaSyCA4RsOZUFrm9whhtGosPlJLmVPnfSHKz8"
|
||||
var USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
|
||||
var OS = "Linux"
|
||||
|
|
|
@ -2,7 +2,6 @@ package util
|
|||
|
||||
import "fmt"
|
||||
|
||||
|
||||
type InstructionNotFound struct {
|
||||
Opcode int64
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/nu7hatch/gouuid"
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
)
|
||||
|
||||
var Charset = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890")
|
||||
|
@ -35,8 +35,8 @@ func GenerateTmpId() string {
|
|||
}
|
||||
|
||||
func ParseTimestamp(unixTs int64) time.Time {
|
||||
seconds := unixTs / int64(time.Second / time.Microsecond)
|
||||
nanoseconds := (unixTs % int64(time.Second / time.Microsecond)) * int64(time.Microsecond / time.Nanosecond)
|
||||
seconds := unixTs / int64(time.Second/time.Microsecond)
|
||||
nanoseconds := (unixTs % int64(time.Second/time.Microsecond)) * int64(time.Microsecond/time.Nanosecond)
|
||||
return time.Unix(seconds, nanoseconds).UTC()
|
||||
}
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@ package util
|
|||
|
||||
var MESSAGES_GOOGLE_BASE_URL = "https://messages.google.com"
|
||||
|
||||
var MESSAGES_GOOGLE_AUTHENTICATION = MESSAGES_GOOGLE_BASE_URL+"/web/authentication"
|
||||
var MESSAGES_GOOGLE_TIMESOURCE = MESSAGES_GOOGLE_BASE_URL+"/web/timesource"
|
||||
var MESSAGES_GOOGLE_AUTHENTICATION = MESSAGES_GOOGLE_BASE_URL + "/web/authentication"
|
||||
var MESSAGES_GOOGLE_TIMESOURCE = MESSAGES_GOOGLE_BASE_URL + "/web/timesource"
|
||||
|
||||
var INSTANT_MESSAGING = "https://instantmessaging-pa.googleapis.com"
|
||||
|
||||
var UPLOAD_MEDIA = INSTANT_MESSAGING+"/upload"
|
||||
var UPLOAD_MEDIA = INSTANT_MESSAGING + "/upload"
|
||||
|
||||
var PAIRING = INSTANT_MESSAGING+"/$rpc/google.internal.communications.instantmessaging.v1.Pairing"
|
||||
var REGISTER_PHONE_RELAY = PAIRING+"/RegisterPhoneRelay"
|
||||
var REFRESH_PHONE_RELAY = PAIRING+"/RefreshPhoneRelay"
|
||||
var GET_WEB_ENCRYPTION_KEY = PAIRING+"/GetWebEncryptionKey"
|
||||
var PAIRING = INSTANT_MESSAGING + "/$rpc/google.internal.communications.instantmessaging.v1.Pairing"
|
||||
var REGISTER_PHONE_RELAY = PAIRING + "/RegisterPhoneRelay"
|
||||
var REFRESH_PHONE_RELAY = PAIRING + "/RefreshPhoneRelay"
|
||||
var GET_WEB_ENCRYPTION_KEY = PAIRING + "/GetWebEncryptionKey"
|
||||
|
||||
var MESSAGING = INSTANT_MESSAGING+"/$rpc/google.internal.communications.instantmessaging.v1.Messaging"
|
||||
var RECEIVE_MESSAGES = MESSAGING+"/ReceiveMessages"
|
||||
var SEND_MESSAGE = MESSAGING+"/SendMessage"
|
||||
var ACK_MESSAGES = MESSAGING+"/AckMessages"
|
||||
var MESSAGING = INSTANT_MESSAGING + "/$rpc/google.internal.communications.instantmessaging.v1.Messaging"
|
||||
var RECEIVE_MESSAGES = MESSAGING + "/ReceiveMessages"
|
||||
var SEND_MESSAGE = MESSAGING + "/SendMessage"
|
||||
var ACK_MESSAGES = MESSAGING + "/AckMessages"
|
||||
|
||||
var TENOR_BASE_URL = "https://api.tenor.com/v1"
|
||||
var TENOR_SEARCH_GIF = TENOR_BASE_URL+"/search"
|
||||
var TENOR_SEARCH_GIF = TENOR_BASE_URL + "/search"
|
||||
|
|
Loading…
Reference in a new issue