web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateRequest

type GenerateRequest struct {
	JobID           string  `json:"job_id"`
	Author          string  `json:"author"`
	Reference       string  `json:"reference"`
	ShowScores      bool    `json:"show_scores"`
	ExcludeOpcodes  bool    `json:"exclude_opcodes"`
	NoSuper         bool    `json:"no_super"`
	ExcludeGoodware bool    `json:"exclude_goodware"`
	NoMagic         bool    `json:"no_magic"`
	NoFilesize      bool    `json:"no_filesize"`
	UseLLM          bool    `json:"use_llm"`
	MinScore        float64 `json:"min_score"`
	MaxStrings      int     `json:"max_strings"`
	Debug           bool    `json:"debug"`
}

GenerateRequest contains parameters for rule generation.

type Job

type Job struct {
	ID        string                  `json:"id"`
	Status    string                  `json:"status"`
	Files     []UploadedFile          `json:"files"`
	Strings   map[string][]StringInfo `json:"strings,omitempty"`
	Rules     string                  `json:"rules,omitempty"`
	Error     string                  `json:"error,omitempty"`
	DebugLog  string                  `json:"debug_log,omitempty"`
	CreatedAt time.Time               `json:"created_at"`
}

Job represents a rule generation job.

type Server

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

Server represents the HTTP server for the yarGen web UI.

func NewServer

func NewServer(cfg *config.Config, yargen *service.YarGen) *Server

NewServer creates a new HTTP server with the given configuration and yarGen service.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type StringInfo

type StringInfo struct {
	Value         string  `json:"value"`
	Score         float64 `json:"score"`
	IsWide        bool    `json:"is_wide"`
	IsHighScoring bool    `json:"is_high_scoring"`
	GoodwareCount int     `json:"goodware_count"`
	Selected      bool    `json:"selected"`
}

StringInfo contains information about an extracted string.

type SuggestNameRequest

type SuggestNameRequest struct {
	JobID       string   `json:"job_id"`
	Tags        []string `json:"tags"`
	Description string   `json:"description"`
}

SuggestNameRequest contains parameters for rule name suggestion.

type UploadedFile

type UploadedFile struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
	Path string `json:"-"`
}

UploadedFile represents an uploaded malware sample file.

Jump to

Keyboard shortcuts

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