common

package
v0.0.0-...-5e783f3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalConfig  *Config
	GlobalDbUtils *DbUtils
	UserDirt      = map[string][]string{
		"ftp":        {"ftp", "admin", "www", "web", "root", "db", "wwwroot", "data"},
		"mysql":      {"root", "mysql"},
		"mssql":      {"sa", "sql"},
		"smb":        {"administrator", "admin", "guest"},
		"rdp":        {"administrator", "admin", "guest"},
		"postgresql": {"postgres", "admin"},
		"ssh":        {"root", "admin"},
		"mongodb":    {"root", "admin"},
		"oracle":     {"sys", "system", "admin", "test", "web", "orcl"},
		"custom":     {"root", "admin", "postgres", "sa", "mysql", "ftp", "www", "wwwroot", "orcl", "system", "administrator"},
	}
	Passwords = []string{"123456", "admin", "admin123", "root", "pass123", "pass@123", "password", "123123", "654321", "111111", "123", "1", "admin@123", "Admin@123", "admin123!@#", "{user}", "{user}1", "{user}111", "{user}123", "{user}@123", "{user}_123", "{user}#123", "{user}@111", "{user}@2019", "{user}@123#4", "P@ssw0rd!", "P@ssw0rd", "Passw0rd", "qwe123", "12345678", "test", "test123", "123qwe", "123qwe!@#", "123456789", "123321", "666666", "a123456.", "123456~a", "123456!a", "000000", "1234567890", "8888888", "!QAZ2wsx", "1qaz2wsx", "abc123", "abc123456", "1qaz@WSX", "a11111", "a12345", "Aa1234", "Aa1234.", "Aa12345", "a123456", "a123123", "Aa123123", "Aa123456", "Aa12345.", "sysadmin", "system", "1qaz!QAZ", "2wsx@WSX", "qwe123!@#", "Aa123456!", "A123456s!", "sa123456", "1q2w3e", "Charge123", "Aa123456789"}
)
View Source
var SchemaMap = map[string]string{
	"http":   "Http",
	"socks5": "Socks5",
}

Functions

func InitSql

func InitSql()

func ParseIps

func ParseIps(ips string) ([]string, error)

ParseIps

Types

type AddrParam

type AddrParam struct {
	Host    string
	Port    string
	Service string
}

type Auth

type Auth struct {
	Uname string
	Pass  string
}

type Config

type Config struct {
	Thread  int
	Timeout int
	Proxy   []string
	Dns     []string
	Auth    map[string][]*Auth
	Cache   *utils.Cache[*httptpl.YakTemplate]
	DbInfo  *DbParam
}

Config 全局的配置类

type DbParam

type DbParam struct {
	Type   string
	Dbname string
	User   string
	Pass   string
	Addr   string
}

type DbUtils

type DbUtils struct {
	// contains filtered or unexported fields
}
var Db *DbUtils

func NewDbUtils

func NewDbUtils(ctx context.Context, param *DbParam, options ...DbUtilsOptions) (*DbUtils, error)

NewDbUtils 创建服务侧的Dbutils

func (*DbUtils) GetDbConn

func (d *DbUtils) GetDbConn() *gorm.DB

func (*DbUtils) Init

func (d *DbUtils) Init(dst ...interface{}) error

type DbUtilsConfig

type DbUtilsConfig struct {
	AutoCache bool
	// contains filtered or unexported fields
}

type DbUtilsOptions

type DbUtilsOptions func(config *DbUtilsConfig)

func WithAutoCache

func WithAutoCache() DbUtilsOptions

func WithInitPlugins

func WithInitPlugins(plugins map[string]gorm.Plugin) DbUtilsOptions

type PortScanStatus

type PortScanStatus string
const (
	Null    PortScanStatus = "Null"
	Open    PortScanStatus = "Open"
	Close   PortScanStatus = "Close"
	Unknown PortScanStatus = "Unknown"
)

func (PortScanStatus) String

func (p PortScanStatus) String() string

type ProxyUtils

type ProxyUtils struct {
	Type  string
	Proxy string
	Auth  *Auth
}

ProxyUtils 代理类

func ParseProxy

func ParseProxy(addr string) (*ProxyUtils, error)

ParseProxy 解析代理

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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