Documentation ¶
Index ¶
- Constants
- func AltResolveVariable(format string, data map[string]string) string
- func Banner() string
- func CheckResume(module libs.Module) bool
- func CheckUpdate(options *libs.Options) bool
- func CommandBuilder(inputFormat libs.InputFormat) (command string)
- func CompressWorkspace(target string, opt libs.Options)
- func DefaultWorkflows(options libs.Options) []string
- func DirectSelectModule(options libs.Options, moduleName string) string
- func DownloadUpdate(opt libs.Options) error
- func ExtractBackup(src string, opt libs.Options)
- func GenerateMetaData(options libs.Options)
- func GetCdn(options *libs.Options)
- func GetClient(options *libs.Options) map[string]string
- func GetCloud(options *libs.Options)
- func GetEnv(options *libs.Options)
- func GetGit(options *libs.Options)
- func GetNewLine(queueFile string) string
- func GetNotification(options *libs.Options)
- func GetPublicIP() string
- func GetServer(options *libs.Options)
- func GetStorages(options *libs.Options)
- func GetUpdateURL(options libs.Options) string
- func GitUpdate(opt libs.Options) error
- func HTTPUpdate(opt libs.Options) error
- func InitConfig(options *libs.Options) error
- func IsRootDomain(raw string) bool
- func ListAllFlowName(options libs.Options) (result []string)
- func ListFlow(options libs.Options) (result []string)
- func ListModuleName(options libs.Options) (result []string)
- func ListModules(options libs.Options) (modules []string)
- func ListScripts(options libs.Options) (result []string)
- func ListSingleWorkspace(options libs.Options, target string) (content [][]string)
- func ListWorkspaces(options libs.Options) (content [][]string)
- func LoadConfig(options *libs.Options) *viper.Viper
- func LoadTokenFile(options *libs.Options) *viper.Viper
- func MarkDownToHTML(options libs.Options, target string, markdownFile string, outputFile string) error
- func OldResolveData(format string, data map[string]string) string
- func ParseFlow(flowFile string) (libs.Flow, error)
- func ParseInput(raw string, options libs.Options) map[string]string
- func ParseInputFormat(raw string, options libs.Options) map[string]string
- func ParseModules(moduleFile string) (libs.Module, error)
- func ParseParams(rawParams []string) map[string]string
- func ParseTarget(raw string) map[string]string
- func ParsingConfig(options *libs.Options)
- func QueueWatcher(options libs.Options)
- func ResolveData(format string, data map[string]string) string
- func ResolveReports(module libs.Module, params map[string]string) libs.Module
- func ResolveSlice(slice []string, data map[string]string) (resolveSlice []string)
- func RunCron(cmd string, schedule int)
- func RunTheScan(target string, options libs.Options) error
- func RunUpdate(options libs.Options) error
- func SelectFlow(flowName string, options libs.Options) []string
- func SelectModules(moduleNames []string, options libs.Options) []string
- func SelectScript(scriptName string, options libs.Options) string
- func SetClientName(options *libs.Options, clientName string)
- func SetTactic(options *libs.Options)
- func SetupOSEnv(options *libs.Options)
- func SetupOpt(options *libs.Options)
- func Update(opt libs.Options)
- func UpdateBase(opt libs.Options)
- func UpdateVuln(opt libs.Options)
- type Runner
- func (r *Runner) BackupWorkspace()
- func (r *Runner) CheckCondition(conditions []string) error
- func (r *Runner) CheckRequired(requires []string) error
- func (r *Runner) ConditionExecScript(script string) bool
- func (r *Runner) DBDoneScan()
- func (r *Runner) DBNewReports(module libs.Module)
- func (r *Runner) DBNewScan()
- func (r *Runner) DBNewTarget()
- func (r *Runner) DBRuntimeUpdate()
- func (r *Runner) DBUpdateScan()
- func (r *Runner) ExecScript(script string) string
- func (r *Runner) GenMarkdownReport(markdownFile string, outputHTML string)
- func (r *Runner) InitVM()
- func (r *Runner) LoadDBScripts() string
- func (r *Runner) LoadEngineScripts()
- func (r *Runner) LoadExternalScripts() string
- func (r *Runner) LoadGitScripts() string
- func (r *Runner) LoadNotiScripts() string
- func (r *Runner) LoadScripts() string
- func (r *Runner) ParamsFromCLI()
- func (r *Runner) PrepareModule()
- func (r *Runner) PrepareParams()
- func (r *Runner) PrepareRoutine()
- func (r *Runner) PrepareWorkflow()
- func (r *Runner) ResolveContentSrc(tag string) string
- func (r *Runner) ResolveContentTag(rawData string) string
- func (r *Runner) ResolveReportsTag(rawMarkDown string) string
- func (r *Runner) ResolveRoutine()
- func (r *Runner) ResolveScanInfoTag(rawMarkdown string) string
- func (r *Runner) RetryCommandWithExpectString(cmd string, expectString string, timeoutRaw ...string) string
- func (r *Runner) RunCommands(commands []string, std string) string
- func (r *Runner) RunModule(module libs.Module)
- func (r *Runner) RunModulesWithTimeout(timeoutRaw string, module libs.Module, options libs.Options)
- func (r *Runner) RunOse(scriptName string)
- func (r *Runner) RunRoutine(modules []libs.Module)
- func (r *Runner) RunScript(script string) string
- func (r *Runner) RunScripts(scripts []string) string
- func (r *Runner) RunScriptsWithTimeOut(timeoutRaw string, scripts []string) string
- func (r *Runner) RunStep(step libs.Step) (string, error)
- func (r *Runner) RunStepWithSource(step libs.Step) (out string, err error)
- func (r *Runner) RunStepWithTimeout(timeout int, step libs.Step) (out string, err error)
- func (r *Runner) RunSteps(steps []libs.Step) error
- func (r *Runner) Start()
- func (r *Runner) StartRoutines()
- func (r *Runner) Validator() error
- type Tmux
Constants ¶
const ( Cleaning = "Cleaning" CleanAmass = "CleanAmass" CleanRustScan = "CleanRustScan" CleanGoBuster = "CleanGoBuster" CleanMassdns = "CleanMassdns" CleanSWebanalyze = "CleanSWebanalyze" CleanJSONDnsx = "CleanJSONDnsx" CleanWebanalyze = "CleanWebanalyze" CleanArjun = "CleanArjun" CleanJSONHttpx = "CleanJSONHttpx" CleanFFUFJson = "CleanFFUFJson" GenNucleiReport = "GenNucleiReport" PrintCSV = "PrintCSV" BeautifyCSV = "BeautifyCSV" )
const ( // noti for slack StartNoti = "StartNoti" DoneNoti = "DoneNoti" ReportNoti = "ReportNoti" DiffNoti = "DiffNoti" CustomNoti = "CustomNoti" NotiFile = "NotiFile" WebHookNoti = "WebHookNoti" // noti for telegram TeleMess = "TeleMess" TeleMessWrap = "TeleMessWrap" TeleMessByFile = "TeleMessByFile" TeleSendFile = "TeleSendFile" )
const ( ExecCmd = "ExecCmd" ExecCmdB = "ExecCmdB" ExecCmdWithOutput = "ExecCmdWithOutput" ExecContain = "ExecContain" Sleep = "Sleep" Exit = "Exit" CastToInt = "CastToInt" StripSlash = "StripSlash" Printf = "Printf" Warnf = "Warnf" Cat = "Cat" SortU = "SortU" SplitFile = "SplitFile" Append = "Append" Copy = "Copy" CreateFolder = "CreateFolder" DeleteFile = "DeleteFile" DeleteFolder = "DeleteFolder" SplitFileByPart = "SplitFileByPart" FileLength = "FileLength" FolderLength = "FolderLength" IsFile = "IsFile" EmptyDir = "EmptyDir" EmptyFile = "EmptyFile" ReadLines = "ReadLines" Compress = "Compress" Decompress = "Decompress" )
const ( TotalSubdomain = "TotalSubdomain" TotalDns = "TotalDns" TotalScreenShot = "TotalScreenShot" TotalTech = "TotalTech" TotalVulnerability = "TotalVulnerability" TotalArchive = "TotalArchive" TotalLink = "TotalLink" TotalDirb = "TotalDirb" CreateReport = "CreateReport" )
const ( RRSync = "RRSync" Clone = "Clone" FClone = "FClone" PushResult = "PushResult" PushFolder = "PushFolder" PullFolder = "PullFolder" DiffCompare = "DiffCompare" GitDiff = "GitDiff" LoopGitDiff = "LoopGitDiff" // for gitlab API only CreateRepo = "CreateRepo" DeleteRepo = "DeleteRepo" DeleteRepoByPid = "DeleteRepoByPid" ListProjects = "ListProjects" )
const ( UploadToS3 = "UploadToS3" DownloadFromS3 = "DownloadFromS3" DownloadFile = "DownloadFile" GenMarkdownReport = "GenMarkdownReport" )
const ( SetVar = "SetVar" SetOSVar = "SetOSVar" GetOSEnv = "GetOSEnv" )
Variables ¶
This section is empty.
Functions ¶
func AltResolveVariable ¶
AltResolveVariable just like ResolveVariable but looking for [[.var]]
func CheckUpdate ¶
func CommandBuilder ¶
func CommandBuilder(inputFormat libs.InputFormat) (command string)
func CompressWorkspace ¶
func DefaultWorkflows ¶
DefaultWorkflows select module from ~/.osmedeus/core/workflow/plugins/
func DirectSelectModule ¶
DirectSelectModule select module from ~/osmedeus-base/workflow/default-modules
func DownloadUpdate ¶
func ExtractBackup ¶
func GenerateMetaData ¶
func GetNewLine ¶
func GetPublicIP ¶
func GetPublicIP() string
func GetStorages ¶
func GetUpdateURL ¶
func HTTPUpdate ¶
func IsRootDomain ¶
func ListAllFlowName ¶
func ListModuleName ¶
func ListModules ¶
ListModules list all available module
func ListScripts ¶
ListScripts list all available mode
func ListSingleWorkspace ¶
func ListWorkspaces ¶
func MarkDownToHTML ¶
func OldResolveData ¶
OldResolveData resolve template from signature file
func ParseInput ¶
ParseInput parse input for routine
func ParseInputFormat ¶
ParseInputFormat format input
func ParseModules ¶
ParseModules parse module file
func ParseParams ¶
ParseParams parse more params from cli
func ParseTarget ¶
ParseTarget parsing target and some variable for template
func ParsingConfig ¶
func QueueWatcher ¶
func ResolveData ¶
ResolveData resolve template from signature file
func ResolveReports ¶
ResolveReports resolve real path of reports
func ResolveSlice ¶
ResolveSlice resolve template from signature file
func SelectFlow ¶
SelectFlow select flow to run
func SelectModules ¶
SelectModules return list of modules name
func SetClientName ¶
func SetupOSEnv ¶
func UpdateBase ¶
func UpdateVuln ¶
Types ¶
type Runner ¶
type Runner struct { Input string Workspace string InputType string // domain, url, ip, cidr or domain-file, url-file, ip-file, cidr-file RequiredInput string // this should match with InputType IsInvalid bool ForceParams bool RoutineType string // module or flow RoutineName string // general RoutinePath string RunnerSource string // cli or api RunnerType string // local or cloud Opt libs.Options // use for analytics DoneStep int TotalSteps int RunningTime int CurrentModule string DoneFile string RuntimeFile string WorkspaceFolder string RoutineModules []string Reports []string Routines []libs.Routine VM *otto.Otto TargetObj database.Target ScanObj database.Scan Target map[string]string // this is same as targets but won't change during the execution time Params map[string]string }
Runner runner struct to start a job
func InitRunner ¶
InitRunner init runner
func (*Runner) BackupWorkspace ¶
func (r *Runner) BackupWorkspace()
func (*Runner) CheckCondition ¶
CheckCondition check if required file exist or not
func (*Runner) CheckRequired ¶
CheckRequired check if required file exist or not
func (*Runner) ConditionExecScript ¶
func (*Runner) DBDoneScan ¶
func (r *Runner) DBDoneScan()
func (*Runner) DBNewReports ¶
func (*Runner) DBNewTarget ¶
func (r *Runner) DBNewTarget()
func (*Runner) DBRuntimeUpdate ¶
func (r *Runner) DBRuntimeUpdate()
func (*Runner) DBUpdateScan ¶
func (r *Runner) DBUpdateScan()
func (*Runner) ExecScript ¶
func (*Runner) GenMarkdownReport ¶
func (*Runner) LoadDBScripts ¶
func (*Runner) LoadEngineScripts ¶
func (r *Runner) LoadEngineScripts()
func (*Runner) LoadExternalScripts ¶
func (*Runner) LoadGitScripts ¶
func (*Runner) LoadNotiScripts ¶
func (*Runner) LoadScripts ¶
func (*Runner) PrepareModule ¶
func (r *Runner) PrepareModule()
func (*Runner) PrepareParams ¶
func (r *Runner) PrepareParams()
func (*Runner) PrepareRoutine ¶
func (r *Runner) PrepareRoutine()
func (*Runner) PrepareWorkflow ¶
func (r *Runner) PrepareWorkflow()
PrepareWorkflow prepare workflow file
func (*Runner) ResolveContentSrc ¶
func (*Runner) ResolveContentTag ¶
func (*Runner) ResolveReportsTag ¶
func (*Runner) ResolveRoutine ¶
func (r *Runner) ResolveRoutine()
ResolveRoutine resolve the module name first
func (*Runner) ResolveScanInfoTag ¶
func (*Runner) RetryCommandWithExpectString ¶
func (*Runner) RunCommands ¶
RunCommands run list of commands in parallel
func (*Runner) RunModulesWithTimeout ¶
func (*Runner) RunRoutine ¶
func (*Runner) RunScripts ¶
RunScripts run list of scripts
func (*Runner) RunScriptsWithTimeOut ¶
RunScriptsWithTimeOut run list of scripts with timeout
func (*Runner) RunStepWithSource ¶
RunStepWithSource really run a step
func (*Runner) RunStepWithTimeout ¶
RunStepWithTimeout run step with timeout