bypasser

package
v0.0.0-...-10c5ee3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2014 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CipherTypeAES256 = iota
	CipherTypeSimple
)
View Source
const (
	AES256KEY       = "Internat"
	InvalidPassword = "iNvaLIDpAsSwoRd"
)
View Source
const (
	INFO = iota
	DEBUG
	ERROR
)
View Source
const (
	AuthenticatingMethodNo               = 0x00
	AuthenticatingMethodGSSAPI           = 0x01
	AuthenticatingMethodUsernamePassword = 0x02
	AuthenticatingMethodCustom           = 0x0C
	AuthenticatingMethodNotSupported     = 0xff
)
View Source
const (
	CipherTypeInUse = CipherTypeSimple
)

Variables

This section is empty.

Functions

func HandleConnectionNegotiationClient

func HandleConnectionNegotiationClient(conn *net.TCPConn, serverAddr *net.TCPAddr, uname, pword string)

func HandleConnectionNegotiationServer

func HandleConnectionNegotiationServer(conn *net.TCPConn, users map[string]string, udata chan DataUsage)

func HandleMethodSelectionClient

func HandleMethodSelectionClient(req []byte) []byte

func HandleMethodSelectionServer

func HandleMethodSelectionServer(req []byte) ([]byte, byte)

func HandleRequestClient

func HandleRequestClient(rqst []byte, conn, connToServer *net.TCPConn, mCipher GFWCipher)

func HandleRequestServer

func HandleRequestServer(rqst []byte, conn *net.TCPConn, mCipher GFWCipher, username string, udata chan DataUsage) ([]byte, error)

func NewAESCTRCipher

func NewAESCTRCipher(key []byte, initialVector []byte) (aESCTRCipher, error)

func NewShiftCipher

func NewShiftCipher(key byte) shiftCipher

Types

type Authenticator

type Authenticator interface {
	HandleAuthentication(packet []byte, legalUsers map[string]string) ([]byte, GFWCipher, string, bool, error)
}

type CustomAuthenticator

type CustomAuthenticator struct {
}

func (CustomAuthenticator) HandleAuthentication

func (c CustomAuthenticator) HandleAuthentication(packet []byte, legalUsers map[string]string) ([]byte, GFWCipher, string, bool, error)

type DataUsage

type DataUsage struct {
	Username string
	DataUsed int64
}

type GFWCipher

type GFWCipher interface {
	Encrypt(dst, src []byte)
	Decrypt(dst, src []byte)
}

type GFWLogger

type GFWLogger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(out io.Writer, tags []string) *GFWLogger

func (*GFWLogger) DisableTag

func (l *GFWLogger) DisableTag(tag int) error

func (*GFWLogger) EnableTag

func (l *GFWLogger) EnableTag(tag int) error

func (*GFWLogger) Log

func (l *GFWLogger) Log(tag int, text string)

type MethodSelectionRequest

type MethodSelectionRequest struct {
	Version      byte
	NumOfMethods byte
	Methods      []byte
}

type MethodSelectionResponse

type MethodSelectionResponse struct {
	Version        byte
	SelectedMethod byte
}

type UnamePwordHandler

type UnamePwordHandler struct {
}

func (UnamePwordHandler) Authenticate

func (h UnamePwordHandler) Authenticate(p []byte) ([]byte, bool, error)

Jump to

Keyboard shortcuts

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