1
0
Fork 0
mirror of https://github.com/i1v/googleplay synced 2024-09-21 12:19:26 +00:00

+ "2a.pages.dev/rosso/tls"

This commit is contained in:
Zombo 2023-02-19 09:11:15 -06:00
parent 64b485f8f0
commit c5d50e9ef1
3 changed files with 17 additions and 18 deletions

29
auth.go
View file

@ -1,9 +1,9 @@
package googleplay package googleplay
import ( import (
"2a.pages.dev/rosso/crypto"
"2a.pages.dev/rosso/http" "2a.pages.dev/rosso/http"
"2a.pages.dev/rosso/protobuf" "2a.pages.dev/rosso/protobuf"
"2a.pages.dev/rosso/tls"
"bufio" "bufio"
"io" "io"
"net/url" "net/url"
@ -12,16 +12,6 @@ import (
"strings" "strings"
) )
var Client = http.Default_Client
type Auth struct {
url.Values
}
type Response struct {
*http.Response
}
// You can also use host "android.clients.google.com", but it also uses // You can also use host "android.clients.google.com", but it also uses
// TLS fingerprinting. // TLS fingerprinting.
func New_Auth(email, password string) (*Response, error) { func New_Auth(email, password string) (*Response, error) {
@ -39,18 +29,27 @@ func New_Auth(email, password string) (*Response, error) {
return nil, err return nil, err
} }
req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
hello, err := crypto.Parse_JA3(crypto.Android_API_26) var hello tls.Client_Hello
if err != nil { if err := hello.UnmarshalText(tls.Android_API_26()); err != nil {
return nil, err return nil, err
} }
tr := crypto.Transport(hello) res, err := Client.Transport(hello.Transport()).Do(req)
res, err := Client.Transport(tr).Do(req)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &Response{res}, nil return &Response{res}, nil
} }
var Client = http.Default_Client
type Auth struct {
url.Values
}
type Response struct {
*http.Response
}
func (r Response) Create(name string) error { func (r Response) Create(name string) error {
file, err := os.Create(name) file, err := os.Create(name)
if err != nil { if err != nil {

2
go.mod
View file

@ -2,7 +2,7 @@ module 2a.pages.dev/googleplay
go 1.19 go 1.19
require 2a.pages.dev/rosso v1.0.6 require 2a.pages.dev/rosso v1.0.8
require ( require (
github.com/andybalholm/brotli v1.0.5 // indirect github.com/andybalholm/brotli v1.0.5 // indirect

4
go.sum
View file

@ -1,5 +1,5 @@
2a.pages.dev/rosso v1.0.6 h1:0RMZKfylFSwN1iUDaUVGjcOBlhcBJh7kY1IQpsWseg0= 2a.pages.dev/rosso v1.0.8 h1:ddm/S/v8N8E5msE1dZBlgRv0vHLXOHFG9ElaDcPNfYI=
2a.pages.dev/rosso v1.0.6/go.mod h1:F/1kEbhRJBdEW7hRN7eKXkS/jJkJQljpA6ir1sdfWhw= 2a.pages.dev/rosso v1.0.8/go.mod h1:BdsjSTjdUXzcr3IdZ/LdA/NqWVMI+AesF6Nq24eyowY=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=