Documentation
¶
Index ¶
- func AnalyzeDomain(domain string, timeout time.Duration, profile string) *models.AnalysisResult
- func OutputCSV(r *models.AnalysisResult)
- func OutputJSON(r *models.AnalysisResult)
- func OutputTable(r *models.AnalysisResult)
- func ParseTimeRange(timeStr string) (time.Time, time.Time, error)
- func SaveToDB(r *models.AnalysisResult)
- type BehavioralAnalyzer
- type ChangeRecord
- type Cluster
- type ClusterEngine
- func (ce *ClusterEngine) AddDomainToCluster(domain string, analysis *models.AnalysisResult) string
- func (ce *ClusterEngine) FindClustersByResource(resourceType, resourceValue string) []*Cluster
- func (ce *ClusterEngine) GetAllClusters() []*Cluster
- func (ce *ClusterEngine) GetCluster(clusterID string) (*Cluster, bool)
- func (ce *ClusterEngine) GetClusterForDomain(domain string) (*Cluster, bool)
- func (ce *ClusterEngine) GetClusterStatistics() map[string]interface{}
- func (ce *ClusterEngine) GetClustersByConfidence() []*Cluster
- func (ce *ClusterEngine) MergeClusters(clusterID1, clusterID2 string) error
- func (ce *ClusterEngine) UpdateClusterConfidence(clusterID string)
- type DomainMonitor
- type Exporter
- func (e *Exporter) ExportCSV(results []*models.AnalysisResult, filename string) error
- func (e *Exporter) ExportJSON(results []*models.AnalysisResult, filename string) error
- func (e *Exporter) ExportSummary(results []*models.AnalysisResult, filename string) error
- func (e *Exporter) ExportToDatabase(results []*models.AnalysisResult, dbPath string) error
- func (e *Exporter) FilterResultsByCDNProvider(results []*models.AnalysisResult, provider string) []*models.AnalysisResult
- func (e *Exporter) FilterResultsByJLIScore(results []*models.AnalysisResult, minScore, maxScore float64) []*models.AnalysisResult
- func (e *Exporter) FilterResultsByTime(results []*models.AnalysisResult, startTime, endTime time.Time) []*models.AnalysisResult
- func (e *Exporter) GenerateSummary(results []*models.AnalysisResult) map[string]interface{}
- type Monitor
- func (m *Monitor) AddDomain(domain string, interval time.Duration) error
- func (m *Monitor) ExportChanges(domain, format, filename string) error
- func (m *Monitor) GetAllMonitoredDomains() []string
- func (m *Monitor) GetChanges(domain string) ([]ChangeRecord, error)
- func (m *Monitor) GetDomainStatus(domain string) (*DomainMonitor, error)
- func (m *Monitor) PauseMonitoring(domain string) error
- func (m *Monitor) RemoveDomain(domain string) error
- func (m *Monitor) ResumeMonitoring(domain string) error
- func (m *Monitor) StopAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeDomain ¶
AnalyzeDomain performs a complete analysis of a domain
func OutputCSV ¶
func OutputCSV(r *models.AnalysisResult)
OutputCSV outputs the result in CSV format
func OutputJSON ¶
func OutputJSON(r *models.AnalysisResult)
OutputJSON outputs the result in JSON format
func OutputTable ¶
func OutputTable(r *models.AnalysisResult)
OutputTable outputs the result in a formatted table
func ParseTimeRange ¶
ParseTimeRange parses a time range string (e.g., "30d", "7d", "1h")
Types ¶
type BehavioralAnalyzer ¶
type BehavioralAnalyzer struct {
GamblingKeywords []string
PaymentKeywords []string
RegexPatterns map[string]*regexp.Regexp
}
BehavioralAnalyzer performs behavioral and semantic analysis
func NewBehavioralAnalyzer ¶
func NewBehavioralAnalyzer() *BehavioralAnalyzer
NewBehavioralAnalyzer creates a new instance of BehavioralAnalyzer
func (*BehavioralAnalyzer) AnalyzeContent ¶
func (b *BehavioralAnalyzer) AnalyzeContent(content string) []models.Signal
AnalyzeContent performs behavioral and semantic analysis on content
func (*BehavioralAnalyzer) AnalyzeDOMStructure ¶
func (b *BehavioralAnalyzer) AnalyzeDOMStructure(html string) []models.Signal
AnalyzeDOMStructure analyzes the structure of the DOM for gambling patterns
func (*BehavioralAnalyzer) AnalyzePageSemantics ¶
func (b *BehavioralAnalyzer) AnalyzePageSemantics(title, description, content string) []models.Signal
AnalyzePageSemantics analyzes the semantic meaning of page content
type ChangeRecord ¶
type ChangeRecord struct {
Timestamp time.Time
OldScore float64
NewScore float64
Reason string
Signals []models.Signal
}
ChangeRecord records a change in domain analysis
type Cluster ¶
type Cluster struct {
ID string `json:"cluster_id"`
Confidence float64 `json:"confidence"`
Domains []string `json:"domains"`
FirstSeen time.Time `json:"first_seen"`
LastSeen time.Time `json:"last_seen"`
}
Cluster represents a group of related domains
type ClusterEngine ¶
ClusterEngine handles domain clustering and attribution
func NewClusterEngine ¶
func NewClusterEngine() *ClusterEngine
NewClusterEngine creates a new clustering engine
func (*ClusterEngine) AddDomainToCluster ¶
func (ce *ClusterEngine) AddDomainToCluster(domain string, analysis *models.AnalysisResult) string
AddDomainToCluster adds a domain to an appropriate cluster based on similarities
func (*ClusterEngine) FindClustersByResource ¶
func (ce *ClusterEngine) FindClustersByResource(resourceType, resourceValue string) []*Cluster
FindClustersByResource finds clusters that share a specific resource
func (*ClusterEngine) GetAllClusters ¶
func (ce *ClusterEngine) GetAllClusters() []*Cluster
GetAllClusters returns all clusters
func (*ClusterEngine) GetCluster ¶
func (ce *ClusterEngine) GetCluster(clusterID string) (*Cluster, bool)
GetCluster retrieves a cluster by ID
func (*ClusterEngine) GetClusterForDomain ¶
func (ce *ClusterEngine) GetClusterForDomain(domain string) (*Cluster, bool)
GetClusterForDomain finds the cluster for a specific domain
func (*ClusterEngine) GetClusterStatistics ¶
func (ce *ClusterEngine) GetClusterStatistics() map[string]interface{}
GetClusterStatistics returns statistics about clustering
func (*ClusterEngine) GetClustersByConfidence ¶
func (ce *ClusterEngine) GetClustersByConfidence() []*Cluster
GetClustersByConfidence returns clusters sorted by confidence
func (*ClusterEngine) MergeClusters ¶
func (ce *ClusterEngine) MergeClusters(clusterID1, clusterID2 string) error
MergeClusters merges two clusters together
func (*ClusterEngine) UpdateClusterConfidence ¶
func (ce *ClusterEngine) UpdateClusterConfidence(clusterID string)
UpdateClusterConfidence recalculates the confidence of a cluster
type DomainMonitor ¶
type DomainMonitor struct {
Domain string
LastResult *models.AnalysisResult
Changes []ChangeRecord
Interval time.Duration
Active bool
StopChan chan bool
}
DomainMonitor holds monitoring state for a single domain
type Exporter ¶
type Exporter struct{}
Exporter handles data export functionality
func (*Exporter) ExportCSV ¶
func (e *Exporter) ExportCSV(results []*models.AnalysisResult, filename string) error
ExportCSV exports analysis results to CSV format
func (*Exporter) ExportJSON ¶
func (e *Exporter) ExportJSON(results []*models.AnalysisResult, filename string) error
ExportJSON exports analysis results to JSON format
func (*Exporter) ExportSummary ¶
func (e *Exporter) ExportSummary(results []*models.AnalysisResult, filename string) error
ExportSummary exports a summary of results
func (*Exporter) ExportToDatabase ¶
func (e *Exporter) ExportToDatabase(results []*models.AnalysisResult, dbPath string) error
ExportToDatabase exports results to a database (placeholder)
func (*Exporter) FilterResultsByCDNProvider ¶
func (e *Exporter) FilterResultsByCDNProvider(results []*models.AnalysisResult, provider string) []*models.AnalysisResult
FilterResultsByCDNProvider filters results by CDN provider
func (*Exporter) FilterResultsByJLIScore ¶
func (e *Exporter) FilterResultsByJLIScore(results []*models.AnalysisResult, minScore, maxScore float64) []*models.AnalysisResult
FilterResultsByJLIScore filters results by JLI score range
func (*Exporter) FilterResultsByTime ¶
func (e *Exporter) FilterResultsByTime(results []*models.AnalysisResult, startTime, endTime time.Time) []*models.AnalysisResult
FilterResultsByTime filters results by a time range
func (*Exporter) GenerateSummary ¶
func (e *Exporter) GenerateSummary(results []*models.AnalysisResult) map[string]interface{}
GenerateSummary generates a summary of analysis results
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor tracks changes to domains over time
func (*Monitor) ExportChanges ¶
ExportChanges exports change records to file
func (*Monitor) GetAllMonitoredDomains ¶
GetAllMonitoredDomains returns all monitored domains
func (*Monitor) GetChanges ¶
func (m *Monitor) GetChanges(domain string) ([]ChangeRecord, error)
GetChanges returns changes for a domain
func (*Monitor) GetDomainStatus ¶
func (m *Monitor) GetDomainStatus(domain string) (*DomainMonitor, error)
GetDomainStatus returns the status of a monitored domain
func (*Monitor) PauseMonitoring ¶
PauseMonitoring pauses monitoring for a domain
func (*Monitor) RemoveDomain ¶
RemoveDomain removes a domain from monitoring
func (*Monitor) ResumeMonitoring ¶
ResumeMonitoring resumes monitoring for a domain