gopocs

package
v0.0.0-...-d66a22c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UNIQUE_NAMES = map[string]string{
		"\x00": "WorkstationService",
		"\x03": "Messenger Service",
		"\x06": "RAS Server Service",
		"\x1F": "NetDDE Service",
		"\x20": "ServerService",
		"\x21": "RAS Client Service",
		"\xBE": "Network Monitor Agent",
		"\xBF": "Network Monitor Application",
		"\x1D": "Master Browser",
		"\x1B": "Domain Master Browser",
	}

	GROUP_NAMES = map[string]string{
		"\x00": "DomainName",
		"\x1C": "DomainControllers",
		"\x1E": "Browser Service Elections",
	}

	NetBIOS_ITEM_TYPE = map[string]string{
		"\x01\x00": "NetBiosComputerName",
		"\x02\x00": "NetBiosDomainName",
		"\x03\x00": "ComputerName",
		"\x04\x00": "DomainName",
		"\x05\x00": "DNS tree name",
		"\x07\x00": "Time stamp",
	}
	NegotiateSMBv1Data1 = []byte{}/* 137 elements not displayed */

	NegotiateSMBv1Data2 = []byte{}/* 270 elements not displayed */

)
View Source
var CheckContent = "" /* 152-byte string literal not displayed */
View Source
var Mutex = &sync.Mutex{}
View Source
var PluginList = map[string]interface{}{
	"NetBios-GetHostInfo": NetBIOS,
	"RPC-GetHostInfo":     Findnet,
	"SSH-Crack":           SshScan,
	"FTP-Crack":           FtpScan,
	"Mysql-Crack":         MysqlScan,
	"Mssql-Crack":         MssqlScan,
	"Oracle-Crack":        OracleScan,
	"MongoDB-Crack":       MongodbScan,
	"RDP-Crack":           RdpScan,
	"Redis-Crack":         RedisScan,
	"SMB-MS17-010":        MS17010,
	"PostgreSQL-Crack":    PostgresScan,
	"SMB-Crack":           SmbScan,
	"Telnet-Crack":        TelnetScan,
	"Memcache-Crack":      MemcachedScan,
	"JDWP-Scan":           JDWPScan,
	"Shiro-Key-Crack":     ShiroKeyCheck,
}
View Source
var WriteResultLock sync.Mutex

Functions

func AESCBCEncrypt

func AESCBCEncrypt(key []byte, Content []byte) (string, error)

func AESGCMEncrypt

func AESGCMEncrypt(key []byte, Content []byte) (string, error)

func AddScan

func AddScan(scantype string, info structs.HostInfo, ch *chan struct{}, wg *sync.WaitGroup)

func AesDecrypt

func AesDecrypt(cryted string, key string) string

func AesEncrypt

func AesEncrypt(orig string, key string) string

func CheckErrs

func CheckErrs(err error) bool

func Findnet

func Findnet(info *structs.HostInfo) error

func FindnetScan

func FindnetScan(info *structs.HostInfo) error

func FtpConn

func FtpConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func FtpScan

func FtpScan(info *structs.HostInfo) (tmperr error)

func GetTelnetServerType

func GetTelnetServerType(ip string, port int) int

func GoPocWriteResult

func GoPocWriteResult(result structs.GoPocsResultType)

func GoPocsDispatcher

func GoPocsDispatcher(nucleiResults []output.ResultEvent)

func HexUnicodeStringToString

func HexUnicodeStringToString(src string) string

func JDWPScan

func JDWPScan(info *structs.HostInfo) (err error)

func MS17010

func MS17010(info *structs.HostInfo) error

func MS17010Scan

func MS17010Scan(info *structs.HostInfo) error

func MemcachedScan

func MemcachedScan(info *structs.HostInfo) (err error)

func MongodbScan

func MongodbScan(info *structs.HostInfo) error

func MongodbUnauth

func MongodbUnauth(info *structs.HostInfo) (flag bool, err error)

func MssqlCMD

func MssqlCMD(sqlstr string, conn *sql.DB) ([]interface{}, string)

func MssqlConn

func MssqlConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func MssqlScan

func MssqlScan(info *structs.HostInfo) (tmperr error)

func MysqlConn

func MysqlConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func MysqlScan

func MysqlScan(info *structs.HostInfo) (tmperr error)

func NetBIOS

func NetBIOS(info *structs.HostInfo) error

func OracleConn

func OracleConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func OracleScan

func OracleScan(info *structs.HostInfo) (tmperr error)

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

补码 AES加密数据块分组长度必须为128bit(byte[16]),密钥长度可以是128bit(byte[16])、192bit(byte[24])、256bit(byte[32])中的任意一个。

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func Padding

func Padding(plainText []byte, blockSize int) []byte

func PostgresConn

func PostgresConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func PostgresScan

func PostgresScan(info *structs.HostInfo) (tmperr error)

func PrintRow

func PrintRow(colsdata []interface{}) (err error, result string)

func Randcase

func Randcase(len int) string

func RdpConn

func RdpConn(ip, domain, user, password string, port int, timeout int64) (bool, error)

func RdpScan

func RdpScan(info *structs.HostInfo) (tmperr error)

func ReadBytes

func ReadBytes(conn net.Conn) (result []byte, err error)

func RedisConn

func RedisConn(info *structs.HostInfo, pass string) (flag bool, err error)

func RedisScan

func RedisScan(info *structs.HostInfo) (tmperr error)

func RedisUnauth

func RedisUnauth(info *structs.HostInfo) (flag bool, err error)

func RemoveDuplicateUserPass

func RemoveDuplicateUserPass(input []structs.UserPasswd) []structs.UserPasswd

func ScanFunc

func ScanFunc(name *string, info *structs.HostInfo)

func ShiroKeyCheck

func ShiroKeyCheck(info *structs.HostInfo)

func SmbScan

func SmbScan(info *structs.HostInfo) (tmperr error)

func SmblConn

func SmblConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func SshConn

func SshConn(info *structs.HostInfo, user string, pass string) (flag bool, err error)

func SshScan

func SshScan(info *structs.HostInfo) (tmperr error)

func TelnetCheck

func TelnetCheck(addr, username, password string, port, serverType int) error

func TelnetScan

func TelnetScan(info *structs.HostInfo) (tmperr error)

Types

type Brutelist

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

type Client

type Client struct {
	Host string // ip:port
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, logLevel glog.LEVEL) *Client

func (*Client) Login

func (g *Client) Login(domain, user, pwd string, timeout int64) error

type NetBiosInfo

type NetBiosInfo struct {
	GroupName          string
	WorkstationService string `yaml:"WorkstationService"`
	ServerService      string `yaml:"ServerService"`
	DomainName         string `yaml:"DomainName"`
	DomainControllers  string `yaml:"DomainControllers"`
	ComputerName       string `yaml:"ComputerName"`
	OsVersion          string `yaml:"OsVersion"`
	NetDomainName      string `yaml:"NetBiosDomainName"`
	NetComputerName    string `yaml:"NetBiosComputerName"`
}

func GetNbnsname

func GetNbnsname(info *structs.HostInfo) (netbios NetBiosInfo, err error)

func JoinNetBios

func JoinNetBios(netbios1, netbios2 *NetBiosInfo) *NetBiosInfo

func NetBIOS1

func NetBIOS1(info *structs.HostInfo) (netbios NetBiosInfo, err error)

func ParseNTLM

func ParseNTLM(ret []byte) (netbios NetBiosInfo, err error)

func ParseNetBios

func ParseNetBios(input []byte) (netbios NetBiosInfo, err error)

func (*NetBiosInfo) String

func (info *NetBiosInfo) String() (output string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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