common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhiteLabelName                 = "reVisit"
	WhiteLabelFileName             = "admin.exe"
	WhiteLabelCommunicatorFileName = "communicator.exe"
	RevisitVersion                 = "1.20"

	DefaultMainServerName = "server.rvisit.net"
	DefaultNumberPassword = false

	WaitCountRestartSrv = 10
	WaitCount           = 15
	WaitIdle            = 500
	WaitAfterConnect    = 250
	WaitSendMess        = 50
	WaitPing            = 10
	MaxEncPass          = 48
	LengthPass          = 6
	LengthToken         = 16
	HttpTimeout         = 30
)

Variables

View Source
var (

	//конфиг тут храним
	Options options

	Flags = flags{
		ReInstallVNC:    false,
		Reload:          false,
		Terminated:      false,
		Password:        false,
		ChRefreshAgents: make(chan bool),
	}

	//текстовая расшифровка статических сообщений
	MessStaticText = []string{
		"пустое сообщение",
		"ошибка сети",
		"ошибка прокси",
		"ошибка авторизации",
		"ошибка VNC",
		"ошибка времени ожидания",
		"отсутствует пир",
		"не правильный тип подключения",
		"ошибка авторизации",
		"учетная запись занята",
		"не удалось отправить письмо",
		"регистрация выполнена"}
)

Functions

func CheckExistsProcess

func CheckExistsProcess(name string) (bool, int)

func CheckForAdmin

func CheckForAdmin() bool

func Clean

func Clean()

func Close

func Close()

func CloseLogFile

func CloseLogFile()

func CloseProcess

func CloseProcess(name string)

func DecXOR

func DecXOR(str1, str2 string) (string, bool)

func EncXOR

func EncXOR(str1, str2 string) string

func ExtractZip

func ExtractZip(arch string, out string) bool

func GetAlert

func GetAlert() string

func GetHttpClient

func GetHttpClient() *http.Client

func GetHttpServerAddress

func GetHttpServerAddress() string

func GetInfoOS

func GetInfoOS() string

func GetLocalHttpServerAddress

func GetLocalHttpServerAddress() string

func GetLocalServerAddress

func GetLocalServerAddress() string

func GetMac

func GetMac() string

func GetMainServerAddress

func GetMainServerAddress() string

func GetParentFolder

func GetParentFolder() string

func GetSHA256

func GetSHA256(str string) string

func GetVNCAddress

func GetVNCAddress() string

func HelperService

func HelperService()

func LoadOptions

func LoadOptions() error

func RandInt

func RandInt(min int, max int) int

func RandomNumber

func RandomNumber(l int) string

func RandomString

func RandomString(l int) string

func ReOpenLogFile

func ReOpenLogFile()

func Reload

func Reload()

func RestartSystem

func RestartSystem() bool

func RotateLogFiles

func RotateLogFiles()

func SaveOptions

func SaveOptions() bool

func SetAlert

func SetAlert(message string)

func SetDefaultOptions

func SetDefaultOptions()

Types

type Contact

type Contact struct {
	Id      int
	Caption string
	Type    string //node - контакт, fold - папка
	Pid     string

	Inner *Contact
	Next  *Contact
}

type Profile

type Profile struct {
	Email string
	Pass  string `json:"-"`

	Contacts *Contact
}

Jump to

Keyboard shortcuts

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