gokhttp_ja3spoof

package module
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 17 Imported by: 0

README

gOkHttp ja3spoof

JA3 spoofing addon for gOkHttp.

Installation

go get -u github.com/BRUHItsABunny/gOkHttp-ja3spoof

Usage

package main

import (
	"context"
	"fmt"
	gokhttp "github.com/BRUHItsABunny/gOkHttp"
	gokhttp_ja3spoof "github.com/BRUHItsABunny/gOkHttp-ja3spoof"
	gokhttp_requests "github.com/BRUHItsABunny/gOkHttp/requests"
	gokhttp_responses "github.com/BRUHItsABunny/gOkHttp/responses"
	device_utils "github.com/BRUHItsABunny/go-device-utils"
	utls "github.com/refraction-networking/utls"
)

func main() {
	browser := device_utils.AvailableBrowsers["brave"]["1.50.114"]
	hClient, err := gokhttp.NewHTTPClient(
		gokhttp_ja3spoof.NewJa3SpoofingOption(browser, &utls.Config{InsecureSkipVerify: true}),
	)
	if err != nil {
		panic(err)
	}

	req, err := gokhttp_requests.MakeGETRequest(context.Background(), "https://tls.peet.ws/api/clean")
	if err != nil {
		panic(err)
	}
	
	resp, err := hClient.Do(req)
	if err != nil {
		panic(err)
	}
	
	result, err := gokhttp_responses.ResponseText(resp)
	if err != nil {
		panic(err)
	}
	
	fmt.Println(result)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserToClientHelloSpec added in v0.0.2

func BrowserToClientHelloSpec(browser *device_utils.Browser, extensionMapFunc ExtensionMapFunc) (*utls.ClientHelloSpec, error)

func CreateSpecWithJA3Str added in v0.0.5

func CreateSpecWithJA3Str(ja3Str string) (clientHelloSpec utls.ClientHelloSpec, err error)

func CreateSpecWithTLSFingerprint added in v0.0.10

func CreateSpecWithTLSFingerprint(fingerprint *device_utils.Browser_TLSFingerprint) (clientHelloSpec utls.ClientHelloSpec, err error)

func DefaultExtensionMapV2 added in v0.0.2

func DefaultExtensionMapV2() map[int32]utls.TLSExtension

func IsGREASEUint16 added in v0.0.5

func IsGREASEUint16(v uint16) bool

Types

type ExtensionMapFunc added in v0.0.2

type ExtensionMapFunc func() map[int32]utls.TLSExtension

type Ja3SpoofingOptionV2 added in v0.0.2

type Ja3SpoofingOptionV2 struct {
	TLSConfig       *tls.Config
	ClientHelloSpec *utls.ClientHelloSpec
	Browser         *device_utils.Browser
	ClientHelloID   *utls.ClientHelloID
	ExtensionMap    func() map[int32]utls.TLSExtension
	IsHTTP1         bool
}

func NewJa3SpoofingOptionV2 added in v0.0.2

func NewJa3SpoofingOptionV2(clientHelloSpec *utls.ClientHelloSpec, clientHelloId *utls.ClientHelloID) *Ja3SpoofingOptionV2

func (*Ja3SpoofingOptionV2) Execute added in v0.0.2

func (o *Ja3SpoofingOptionV2) Execute(client *http.Client) error

func (*Ja3SpoofingOptionV2) ExecuteV2 added in v0.0.4

func (o *Ja3SpoofingOptionV2) ExecuteV2(client *oohttp.Client) error

type ProxyOption added in v0.0.2

type ProxyOption struct {
	ProxyURL string
}

func NewProxyOption added in v0.0.2

func NewProxyOption(proxyURL string) *ProxyOption

func (*ProxyOption) Execute added in v0.0.2

func (o *ProxyOption) Execute(client *http.Client) error

func (*ProxyOption) ExecuteV2 added in v0.0.4

func (o *ProxyOption) ExecuteV2(client *oohttp.Client) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL