Documentation ¶
Index ¶
- Variables
- type State
- func (s *State) Delete(ctx context.Context, userContext am.UserContext, group *am.ScanGroup) error
- func (s *State) DoBruteDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) DoBruteETLD(ctx context.Context, orgID, scanGroupID, expireSeconds int, maxAllowed int, ...) (int, bool, error)
- func (s *State) DoCTDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) DoMutateDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) DoNSRecords(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) DoPortScan(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) DoWebDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
- func (s *State) Exists(ctx context.Context, orgID, scanGroupID int, host, ipAddress string) (bool, error)
- func (s *State) FilterNew(ctx context.Context, orgID, scanGroupID int, ...) (map[string]*am.ScanGroupAddress, error)
- func (s *State) GetGroup(ctx context.Context, orgID, scanGroupID int, wantModules bool) (*am.ScanGroup, error)
- func (s *State) GetPortResults(ctx context.Context, orgID, scanGroupID int, host string) (*am.PortResults, error)
- func (s *State) GroupStatus(ctx context.Context, userContext am.UserContext, scanGroupID int) (bool, am.GroupStatus, error)
- func (s *State) Init(addr, pass string) error
- func (s *State) PopAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int, limit int) (map[string]*am.ScanGroupAddress, error)
- func (s *State) Put(ctx context.Context, userContext am.UserContext, group *am.ScanGroup) error
- func (s *State) PutAddressMap(ctx context.Context, userContext am.UserContext, scanGroupID int, ...) error
- func (s *State) PutAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int, ...) error
- func (s *State) PutPortResults(ctx context.Context, orgID, scanGroupID, expireSeconds int, host string, ...) error
- func (s *State) Start(ctx context.Context, userContext am.UserContext, scanGroupID int) error
- func (s *State) Stop(ctx context.Context, userContext am.UserContext, scanGroupID int) error
- func (s *State) Subscribe(ctx context.Context, onStartFn state.SubOnStart, ...) error
- func (s *State) TestGetConn() redis.Conn
Constants ¶
This section is empty.
Variables ¶
var ( //ErrEmptyRCAddress missing redis address ErrEmptyRCAddress = errors.New("rc_addr was empty or invalid") // ErrEmptyRCPassword missing redis password ErrEmptyRCPassword = errors.New("rc_pass was empty or invalid") )
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
State manager
func (*State) DoBruteDomain ¶
func (s *State) DoBruteDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoBruteDomain org:group:module:dnsbrute:zones:brute:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't do analysis.
func (*State) DoBruteETLD ¶
func (s *State) DoBruteETLD(ctx context.Context, orgID, scanGroupID, expireSeconds int, maxAllowed int, etld string) (int, bool, error)
DoBruteETLD global method to rate limit how many ETLDs we will brute force concurrently.
func (*State) DoCTDomain ¶
func (s *State) DoCTDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoCTDomain org:group:":module:bigdata:zones:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't look up in bigdata.
func (*State) DoMutateDomain ¶
func (s *State) DoMutateDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoMutateDomain org:group:module:dnsbrute:zones:mutate:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't do analysis.
func (*State) DoNSRecords ¶
func (s *State) DoNSRecords(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoNSRecords org:group:module:ns:zone:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't do NS records for this zone.
func (*State) DoPortScan ¶
func (s *State) DoPortScan(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoPortScan org:group:":module:port:zones:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't port scan this zone.
func (*State) DoWebDomain ¶
func (s *State) DoWebDomain(ctx context.Context, orgID, scanGroupID int, expireSeconds int, zone string) (bool, error)
DoWebDomain org:group:module:web:zones:analyze:<zonename> sets the zone as already being checked or, if it already exists return that we shouldn't do analysis.
func (*State) Exists ¶
func (s *State) Exists(ctx context.Context, orgID, scanGroupID int, host, ipAddress string) (bool, error)
Exists checks if a host/ipaddress pair is in our list of *known* addreses for this group
func (*State) FilterNew ¶
func (s *State) FilterNew(ctx context.Context, orgID, scanGroupID int, addresses map[string]*am.ScanGroupAddress) (map[string]*am.ScanGroupAddress, error)
FilterNew returns only new addresses
func (*State) GetGroup ¶
func (s *State) GetGroup(ctx context.Context, orgID, scanGroupID int, wantModules bool) (*am.ScanGroup, error)
GetGroup returns the entire scan group details.
func (*State) GetPortResults ¶
func (*State) GroupStatus ¶
func (s *State) GroupStatus(ctx context.Context, userContext am.UserContext, scanGroupID int) (bool, am.GroupStatus, error)
GroupStatus returns the status of this group in redis (exists, status)
func (*State) PopAddresses ¶
func (s *State) PopAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int, limit int) (map[string]*am.ScanGroupAddress, error)
PopAddresses pops the addresses hashes from the work queue key, uses that to call HGETALL to return the address data
func (*State) Put ¶
Put the scan group configuration and publish to the scan group RN that it has been put or updated TODO: PUT SCANGROUP IN SET
func (*State) PutAddressMap ¶
func (s *State) PutAddressMap(ctx context.Context, userContext am.UserContext, scanGroupID int, addresses map[string]*am.ScanGroupAddress) error
PutAddressMap puts addresses that are in map form into the work queue, exists set, and the address data
func (*State) PutAddresses ¶
func (s *State) PutAddresses(ctx context.Context, userContext am.UserContext, scanGroupID int, addresses []*am.ScanGroupAddress) error
PutAddresses puts addresses that are in slice form into the work queue, exists set, and the address data
func (*State) PutPortResults ¶
func (s *State) PutPortResults(ctx context.Context, orgID, scanGroupID, expireSeconds int, host string, portResults *am.PortResults) error
PutPortResults current results only, tcp / udp ports and banners (ips and timestamps and previous results not stored)