common

package
v0.0.0-...-3a30977 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package common contains code and data common to both the server and implant.

Index

Constants

View Source
const ConfigName = "config.json"

ConfigName is the name of the config file in JEServer's work dir.

View Source
const DefaultImplantKey = "id_ed25519_implant"

DefaultImplantKey is the name of the default implant key.

View Source
const Die = "die"

Die is a request type to ask the implant to die

View Source
const Fingerprints = "fingerprints"

Fingerprints is a request type to inform implants of allowed fingerprints.

View Source
const LogMessage = "log-message"

LogMessage is a request type to ask the server to log something.

View Source
const Operator = "operator"

Operator is a channel type indicating an operator wants to connect to an implant.

View Source
const ServerKeyFile = "id_ed25519_server"

serverKeyName is the name of the SSH server's key's file.

Variables

This section is empty.

Functions

func DiscardRequests

func DiscardRequests(tag string, reqs <-chan *ssh.Request)

DiscardRequests is like ssh.DiscardRequests but logs the requests.

func GetOrMakeKey

func GetOrMakeKey(fn string) (key ssh.Signer, b []byte, made bool, err error)

GetOrMakeKey tries to read a private key from the file named fn. If the file doesn't exist, a key is made. The bytes are the PEM-encoded key.

Types

type FakeAddr

type FakeAddr struct {
	Net  string
	Addr string
}

FakeAddr is a net.Addr which uses static values.

func (FakeAddr) Network

func (f FakeAddr) Network() string

Network returns f.Net

func (FakeAddr) String

func (f FakeAddr) String() string

String return f.Addr

Jump to

Keyboard shortcuts

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