Projects STRLCPY Osmedeus Commits e479865f
🤬
  • ■ ■ ■ ■ ■
    Makefile
    skipped 24 lines
    25 25   rm -rf ./dist/osmedeus
    26 26   cp dist/* ~/myGit/premium-osmedeus-base/dist/
    27 27   cp dist/* ~/org-osmedeus/osmedeus-base/dist/
     28 + $(TARGET) update --gen dist/public.json
    28 29  run:
    29 30   $(GO) $(GOFLAGS) run *.go
    30 31   
    skipped 6 lines
  • ■ ■ ■ ■ ■
    cmd/health.go
    skipped 198 lines
    199 199   }
    200 200   fmt.Printf("[+] Health Check Workflows: %s\n", color.GreenString("✔"))
    201 201   
    202  - fmt.Printf("\nChecking available workflow at: %s \n\n", color.HiBlueString(options.Env.WorkFlowsFolder))
    203  - 
    204 202   var content [][]string
    205 203   for _, flow := range flows {
    206 204   parsedFlow, err := core.ParseFlow(flow)
    skipped 6 lines
    213 211   }
    214 212   content = append(content, row)
    215 213   }
     214 + fmt.Printf("\nFound %v available workflows at: %s \n\n", color.HiGreenString("%v", len(content)), color.HiCyanString(options.Env.WorkFlowsFolder))
    216 215   
    217  - table := tablewriter.NewWriter(os.Stderr)
     216 + table := tablewriter.NewWriter(os.Stdout)
    218 217   table.SetAutoFormatHeaders(false)
    219 218   table.SetHeader([]string{"Flow Name", "Description"})
    220 219   table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
    skipped 10 lines
  • ■ ■ ■ ■ ■ ■
    cmd/report.go
     1 +package cmd
     2 + 
     3 +import (
     4 + "github.com/fatih/color"
     5 + "github.com/j3ssie/osmedeus/core"
     6 + "github.com/j3ssie/osmedeus/utils"
     7 + "github.com/spf13/cobra"
     8 + "io/ioutil"
     9 + "net/http"
     10 +)
     11 + 
     12 +func init() {
     13 + var reportCmd = &cobra.Command{
     14 + Use: "report",
     15 + Short: "Show report of existing workspace",
     16 + Long: core.Banner(),
     17 + RunE: runReport,
     18 + }
     19 + 
     20 + reportCmd.Flags().BoolVar(&options.Report.Raw, "raw", false, "Show all the file in the workspace")
     21 + reportCmd.Flags().StringVar(&options.Report.PublicIP, "ip", "", "Show downloadable file with the given IP address")
     22 + reportCmd.Flags().BoolVar(&options.Report.Static, "static", false, "Show report file with Prefix Static")
     23 + reportCmd.SetHelpFunc(ReportHelp)
     24 + 
     25 + var lsCmd = &cobra.Command{
     26 + Use: "list",
     27 + Aliases: []string{"ls"},
     28 + Short: "List all current existing workspace",
     29 + Long: core.Banner(),
     30 + RunE: runReportList,
     31 + }
     32 + reportCmd.AddCommand(lsCmd)
     33 + 
     34 + var viewCmd = &cobra.Command{
     35 + Use: "view",
     36 + Short: "View all reports of existing workspace",
     37 + Long: core.Banner(),
     38 + RunE: runReportView,
     39 + }
     40 + reportCmd.AddCommand(viewCmd)
     41 + 
     42 + var extractCmd = &cobra.Command{
     43 + Use: "extract",
     44 + Short: "Extract a compressed workspace",
     45 + Long: core.Banner(),
     46 + RunE: runReportExtract,
     47 + }
     48 + extractCmd.Flags().StringVar(&options.Report.WorkspaceFile, "ws", "", "Workspace file to extract")
     49 + reportCmd.AddCommand(extractCmd)
     50 + RootCmd.AddCommand(reportCmd)
     51 +}
     52 + 
     53 +func runReportList(_ *cobra.Command, _ []string) error {
     54 + core.ListWorkspaces(options)
     55 + return nil
     56 +}
     57 + 
     58 +func runReportView(_ *cobra.Command, _ []string) error {
     59 + if len(options.Scan.Inputs) == 0 {
     60 + core.ListWorkspaces(options)
     61 + utils.InforF("Please select workspace to view report. Try %s", color.HiCyanString(`'osmedeus report view -t target.com'`))
     62 + return nil
     63 + }
     64 + 
     65 + for _, target := range options.Scan.Inputs {
     66 + core.ListSingleWorkspace(options, target)
     67 + }
     68 + return nil
     69 +}
     70 + 
     71 +func runReportExtract(_ *cobra.Command, _ []string) error {
     72 + core.ListWorkspaces(options)
     73 + return nil
     74 +}
     75 + 
     76 +func runReport(_ *cobra.Command, _ []string) error {
     77 + if options.Report.PublicIP == "" {
     78 + if utils.GetOSEnv("IPAddress", "127.0.0.1") == "127.0.0.1" {
     79 + options.Report.PublicIP = utils.GetOSEnv("IPAddress", "127.0.0.1")
     80 + }
     81 + }
     82 + 
     83 + if options.Report.PublicIP == "0" || options.Report.PublicIP == "0.0.0.0" {
     84 + options.Report.PublicIP = getPublicIP()
     85 + }
     86 + 
     87 + return nil
     88 +}
     89 + 
     90 +func getPublicIP() string {
     91 + utils.DebugF("getting Public IP Address")
     92 + req, err := http.Get("https://api.ipify.org")
     93 + if err != nil {
     94 + return "127.0.0.1"
     95 + }
     96 + defer req.Body.Close()
     97 + 
     98 + body, err := ioutil.ReadAll(req.Body)
     99 + if err != nil {
     100 + return "127.0.0.1"
     101 + }
     102 + return string(body)
     103 +}
     104 + 
  • ■ ■ ■ ■ ■
    cmd/root.go
    skipped 37 lines
    38 38   RootCmd.PersistentFlags().StringVar(&options.ConfigFile, "configFile", fmt.Sprintf("~/.%s/config.yaml", libs.BINARY), "Config File")
    39 39   RootCmd.PersistentFlags().StringVar(&options.Env.WorkspacesFolder, "wsFolder", fmt.Sprintf("~/.%s/workspaces", libs.BINARY), "Root Workspace folder")
    40 40   RootCmd.PersistentFlags().StringVar(&options.Env.WorkFlowsFolder, "wfFolder", "", fmt.Sprintf("Custom Workflow folder (default will get from '$HOME/%s-base/workflow')", libs.BINARY))
    41  - RootCmd.PersistentFlags().StringVar(&options.LogFile, "log", "", "Log File")
     41 + RootCmd.PersistentFlags().StringVar(&options.LogFile, "log", "", fmt.Sprintf("Log File (default will store in '%s')", libs.LDIR))
    42 42   RootCmd.PersistentFlags().IntVarP(&options.Concurrency, "concurrency", "c", 1, "Concurrency level (recommend to keep it as 1 on machine has RAM smaller than 2GB)")
    43 43   
    44 44   // parse target as global flag
    skipped 20 lines
    65 65   RootCmd.PersistentFlags().BoolVar(&options.WildCardCheck, "ww", false, "Check for wildcard target")
    66 66   RootCmd.PersistentFlags().BoolVar(&options.DisableValidateInput, "nv", false, "Disable Validate Input")
    67 67   RootCmd.PersistentFlags().BoolVar(&options.Update.NoUpdate, "nu", false, "Disable Update options")
    68  - RootCmd.PersistentFlags().BoolVarP(&options.Verbose, "verbose", "V", false, "Show stat info too")
    69 68   RootCmd.PersistentFlags().BoolVarP(&options.EnableFormatInput, "format-input", "J", false, "Enable special input format")
    70 69   
    71 70   // disable options
    skipped 12 lines
    84 83   RootCmd.PersistentFlags().IntVar(&options.PollingTime, "poll-timee", 100, "Number of seconds to sleep before do next sync check")
    85 84   RootCmd.PersistentFlags().BoolVar(&options.NoCdn, "no-cdn", false, "Disable CDN feature")
    86 85   RootCmd.PersistentFlags().BoolVarP(&options.EnableBackup, "backup", "b", false, "Enable Backup after done")
    87  - RootCmd.PersistentFlags().BoolVar(&options.JsonOutput, "json", false, "Output as JSON")
    88 86   
    89 87   // update options
    90 88   RootCmd.PersistentFlags().BoolVar(&options.Update.IsUpdateBin, "bin", false, "Update binaries too")
    skipped 55 lines
  • ■ ■ ■ ■ ■ ■
    cmd/scan.go
    1 1  package cmd
    2 2   
    3 3  import (
     4 + "github.com/fatih/color"
    4 5   "github.com/j3ssie/osmedeus/core"
    5 6   "github.com/j3ssie/osmedeus/libs"
    6 7   "github.com/j3ssie/osmedeus/utils"
    skipped 53 lines
    60 61   
    61 62  func CreateRunner(j interface{}) {
    62 63   target := j.(string)
     64 + if core.IsRootDomain(target) && options.Scan.Flow == "general" {
     65 + utils.WarnF("looks like you scanning a subdomain '%s' with general flow. The result might be much less than usual", color.HiCyanString(target))
     66 + utils.WarnF("Better input should be root domain with TLD like '-t target.com'")
     67 + }
     68 + 
    63 69   runner, err := core.InitRunner(target, options)
    64 70   if err != nil {
    65 71   utils.ErrorF("Error init runner with: %s", target)
    skipped 5 lines
  • ■ ■ ■ ■ ■ ■
    cmd/update.go
    skipped 1 lines
    2 2   
    3 3  import (
    4 4   "github.com/j3ssie/osmedeus/core"
     5 + "github.com/j3ssie/osmedeus/utils"
    5 6   "github.com/spf13/cobra"
    6 7  )
    7 8   
    skipped 5 lines
    13 14   RunE: runUpdate,
    14 15   }
    15 16   updateCmd.Flags().String("meta", "", "Custom MetaData URL")
     17 + updateCmd.Flags().BoolVar(&options.Update.ForceUpdate, "force", false, "Force Update")
     18 + updateCmd.Flags().BoolVar(&options.Update.CleanOldData, "clean", false, "Clean Old Data")
     19 + // generate update meta data
     20 + updateCmd.Flags().StringVar(&options.Update.GenerateMeta, "gen", "", "Generate metadata for update")
    16 21   RootCmd.AddCommand(updateCmd)
    17 22  }
    18 23   
    19 24  func runUpdate(cmd *cobra.Command, _ []string) error {
    20 25   meta, _ := cmd.Flags().GetString("meta")
    21 26   if meta != "" {
    22  - options.Update.UpdateURL = meta
     27 + options.Update.MetaDataURL = meta
     28 + }
     29 + 
     30 + if options.Update.GenerateMeta != ""{
     31 + core.GenerateMetaData(options)
     32 + return nil
     33 + }
     34 + 
     35 + var shouldUpdate bool
     36 + options.Update.UpdateURL = core.GetUpdateURL(options)
     37 + 
     38 + if options.Update.ForceUpdate {
     39 + shouldUpdate = true
     40 + utils.InforF("Force to Update latest release")
     41 + } else {
     42 + shouldUpdate = core.CheckUpdate(&options)
     43 + }
     44 + 
     45 + if shouldUpdate {
     46 + err := core.RunUpdate(options)
     47 + if err != nil {
     48 + return err
     49 + }
    23 50   }
    24  - core.UpdateMetadata(&options)
     51 + 
    25 52   return nil
    26 53  }
    27 54   
  • ■ ■ ■ ■ ■ ■
    cmd/usage.go
    skipped 37 lines
    38 38   osmedeus scan -T list_of_targets.txt
    39 39  
    40 40   ## Scan for CIDR with file contains CIDR with the format '1.2.3.4/24'
    41  - osmedeus scan -f cidr -t list-of-cidrs.txt
     41 + osmedeus scan -f cidr -t list-of-ciders.txt
    42 42   osmedeus scan -f cidr -t '1.2.3.4/24' # this will auto convert the single input to the file and run
    43 43  
    44 44   ## Directly run on vuln scan and directory scan on list of domains
    skipped 27 lines
    72 72   h += " osmedeus scan -t target.com -w workspace_name --debug\n"
    73 73   h += " osmedeus scan -f general -t sample.com\n"
    74 74   h += " osmedeus scan -f extensive -t sample.com -t another.com\n"
    75  - h += " osmedeus scan -f gdirb -T list_of_target.txt\n"
     75 + h += " cat list_of_urls.txt | osmedeus scan -f urls\n"
    76 76   h += " osmedeus scan -m ~/.osmedeus/core/workflow/test/dirbscan.yaml -t list_of_urls.txt\n"
    77 77   h += " osmedeus scan --wfFolder ~/custom-workflow/ -f your-custom-workflow -t list_of_urls.txt\n"
     78 + h += " osmedeus scan --chunk --chunk-part 40 -c 2 -f cidr -t list-of-cidr.txt\n"
     79 + 
    78 80   return h
    79 81  }
    80 82   
    skipped 45 lines
    126 128   return h
    127 129  }
    128 130   
     131 +func ReportUsage() string {
     132 + h := color.HiCyanString("\nReport Usage:\n")
     133 + h += " osmedeus report list\n"
     134 + h += " osmedeus report view --raw -t target.com\n"
     135 + h += " osmedeus report view --static -t target.com\n"
     136 + h += " osmedeus report view --raw --static --ip <your-public-ip> -t target.com\n"
     137 + return h
     138 +}
     139 + 
    129 140  // ScanHelp scan help message
    130 141  func ScanHelp(cmd *cobra.Command, _ []string) {
    131 142   fmt.Println(core.Banner())
    skipped 26 lines
    158 169   fmt.Println(core.Banner())
    159 170   fmt.Println(cmd.UsageString())
    160 171   h := UtilsUsage()
     172 + fmt.Println(h)
     173 + printDocs()
     174 +}
     175 + 
     176 +// ReportHelp utils help message
     177 +func ReportHelp(cmd *cobra.Command, _ []string) {
     178 + fmt.Println(core.Banner())
     179 + fmt.Println(cmd.UsageString())
     180 + h := ReportUsage()
    161 181   fmt.Println(h)
    162 182   printDocs()
    163 183  }
    skipped 13 lines
  • ■ ■ ■ ■ ■ ■
    cmd/version.go
    skipped 14 lines
    15 15  )
    16 16   
    17 17  func init() {
    18  - var execCmd = &cobra.Command{
     18 + var versionCmd = &cobra.Command{
    19 19   Use: "version",
    20 20   Short: "Show core version",
    21 21   Long: core.Banner(),
    22 22   RunE: runVersion,
    23 23   }
    24  - RootCmd.AddCommand(execCmd)
     24 + versionCmd.Flags().BoolVarP(&options.Verbose, "verbose", "V", false, "Show stat info too")
     25 + versionCmd.Flags().BoolVar(&options.JsonOutput, "json", false, "Output as JSON")
     26 + RootCmd.AddCommand(versionCmd)
    25 27  }
    26 28   
    27 29  func runVersion(_ *cobra.Command, _ []string) error {
    skipped 112 lines
  • ■ ■ ■ ■ ■ ■
    core/db.go
    1 1  package core
    2 2   
    3 3  import (
     4 + "github.com/fatih/color"
    4 5   "github.com/j3ssie/osmedeus/database"
    5 6   "github.com/j3ssie/osmedeus/libs"
    6 7   "github.com/j3ssie/osmedeus/utils"
    skipped 8 lines
    15 16  func (r *Runner) LoadDBScripts() string {
    16 17   var output string
    17 18   
    18  - r.VM.Set("TotalSubdomain", func(call otto.FunctionCall) otto.Value {
     19 + r.VM.Set(TotalSubdomain, func(call otto.FunctionCall) otto.Value {
    19 20   length := utils.FileLength(call.Argument(0).String())
    20 21   r.TargetObj.TotalAssets = length
     22 + utils.InforF("Total subdomain found: %v", color.HiMagentaString("%v", length))
    21 23   return otto.Value{}
    22 24   })
    23 25   
    24  - r.VM.Set("TotalDns", func(call otto.FunctionCall) otto.Value {
     26 + r.VM.Set(TotalDns, func(call otto.FunctionCall) otto.Value {
    25 27   length := utils.FileLength(call.Argument(0).String())
    26 28   r.TargetObj.TotalDns = length
     29 + utils.InforF("Total Dns: %v", color.HiMagentaString("%v", length))
    27 30   return otto.Value{}
    28 31   })
    29 32   
    30  - r.VM.Set("TotalScreenShot", func(call otto.FunctionCall) otto.Value {
     33 + r.VM.Set(TotalScreenShot, func(call otto.FunctionCall) otto.Value {
    31 34   length := utils.FileLength(call.Argument(0).String())
    32 35   r.TargetObj.TotalScreenShot = length
     36 + utils.InforF("Total ScreenShot: %v", color.HiMagentaString("%v", length))
    33 37   return otto.Value{}
    34 38   })
    35 39   
    36  - r.VM.Set("TotalTech", func(call otto.FunctionCall) otto.Value {
     40 + r.VM.Set(TotalTech, func(call otto.FunctionCall) otto.Value {
    37 41   length := utils.FileLength(call.Argument(0).String())
    38 42   r.TargetObj.TotalTech = length
     43 + utils.InforF("Total Tech: %v", color.HiMagentaString("%v", length))
    39 44   return otto.Value{}
    40 45   })
    41 46   
    42  - r.VM.Set("TotalVulnerability", func(call otto.FunctionCall) otto.Value {
     47 + r.VM.Set(TotalVulnerability, func(call otto.FunctionCall) otto.Value {
    43 48   data := utils.ReadingFileUnique(call.Argument(0).String())
    44 49   var length int
    45 50   for _, line := range data {
    skipped 2 lines
    48 53   }
    49 54   }
    50 55   r.TargetObj.TotalVulnerability = length
     56 + utils.InforF("Total Vulnerability: %v", color.HiMagentaString("%v", length))
    51 57   return otto.Value{}
    52 58   })
    53 59   
    54  - r.VM.Set("TotalArchive", func(call otto.FunctionCall) otto.Value {
     60 + r.VM.Set(TotalArchive, func(call otto.FunctionCall) otto.Value {
    55 61   length := utils.FileLength(call.Argument(0).String())
    56 62   r.TargetObj.TotalArchive = length
     63 + utils.InforF("Total Archive: %v", color.HiMagentaString("%v", length))
    57 64   return otto.Value{}
    58 65   })
    59 66   
    60  - r.VM.Set("TotalLink", func(call otto.FunctionCall) otto.Value {
     67 + r.VM.Set(TotalLink, func(call otto.FunctionCall) otto.Value {
    61 68   length := utils.FileLength(call.Argument(0).String())
    62 69   r.TargetObj.TotalLink = length
     70 + utils.InforF("Total Link: %v", color.HiMagentaString("%v", length))
    63 71   return otto.Value{}
    64 72   })
    65 73   
    66  - r.VM.Set("TotalDirb", func(call otto.FunctionCall) otto.Value {
     74 + r.VM.Set(TotalDirb, func(call otto.FunctionCall) otto.Value {
    67 75   length := utils.FileLength(call.Argument(0).String())
    68 76   r.TargetObj.TotalDirb = length
     77 + utils.InforF("Total Dirb: %v", color.HiMagentaString("%v", length))
    69 78   return otto.Value{}
    70 79   })
    71 80   
    72 81   // CreateReport('report', 'subdomain')
    73  - r.VM.Set("CreateReport", func(call otto.FunctionCall) otto.Value {
     82 + r.VM.Set(CreateReport, func(call otto.FunctionCall) otto.Value {
    74 83   args := call.ArgumentList
    75 84   report := args[0].String()
    76 85   if utils.FileExists(report) {
    skipped 149 lines
  • ■ ■ ■ ■ ■ ■
    core/parse.go
    skipped 294 lines
    295 295   return target
    296 296  }
    297 297   
     298 +func IsRootDomain(raw string) bool {
     299 + suffix, ok := publicsuffix.PublicSuffix(raw)
     300 + if ok {
     301 + return false
     302 + }
     303 + 
     304 + input := strings.ReplaceAll(raw, fmt.Sprintf(".%s", suffix), "")
     305 + if strings.Count(input, ".") == 1 {
     306 + return true
     307 + }
     308 + return false
     309 +}
     310 + 
  • ■ ■ ■ ■ ■ ■
    core/reference.go
    skipped 88 lines
    89 89   ReadLines = "ReadLines"
    90 90  )
    91 91   
     92 +const (
     93 + TotalSubdomain = "TotalSubdomain"
     94 + TotalDns = "TotalDns"
     95 + TotalScreenShot = "TotalScreenShot"
     96 + TotalTech = "TotalTech"
     97 + TotalVulnerability = "TotalVulnerability"
     98 + TotalArchive = "TotalArchive"
     99 + TotalLink = "TotalLink"
     100 + TotalDirb = "TotalDirb"
     101 + CreateReport = "CreateReport"
     102 +)
     103 + 
  • ■ ■ ■ ■ ■ ■
    core/report.go
     1 +package core
     2 + 
     3 +import (
     4 + "fmt"
     5 + "github.com/Jeffail/gabs/v2"
     6 + "github.com/fatih/color"
     7 + "github.com/j3ssie/osmedeus/libs"
     8 + "github.com/j3ssie/osmedeus/utils"
     9 + "github.com/olekukonko/tablewriter"
     10 + "github.com/spf13/cast"
     11 + "io/ioutil"
     12 + "os"
     13 + "path"
     14 + "path/filepath"
     15 + "strings"
     16 +)
     17 + 
     18 +func ListWorkspaces(options libs.Options) (content [][]string) {
     19 + workspaces, err := ioutil.ReadDir(utils.NormalizePath(options.Env.WorkspacesFolder))
     20 + if err != nil {
     21 + utils.ErrorF("Error reading workspaces folder: %s", err)
     22 + return content
     23 + }
     24 + 
     25 + for _, ws := range workspaces {
     26 + if ws.IsDir() {
     27 + status := "unknown"
     28 + flowName := "unknown"
     29 + progress := "N/A"
     30 + wsFolder := path.Join(utils.NormalizePath(options.Env.WorkspacesFolder), ws.Name())
     31 + 
     32 + if utils.DirLength(wsFolder) == 0 {
     33 + continue
     34 + }
     35 + 
     36 + if utils.FileExists(path.Join(wsFolder, "done")) {
     37 + status = "done"
     38 + }
     39 + 
     40 + runtimeFile := path.Join(wsFolder, "runtime")
     41 + if utils.FileExists(runtimeFile) {
     42 + utils.DebugF("Reading information from: %v", runtimeFile)
     43 + runtimeContent := utils.GetFileContent(runtimeFile)
     44 + 
     45 + if jsonParsed, ok := gabs.ParseJSON([]byte(runtimeContent)); ok == nil {
     46 + flowName = cast.ToString(jsonParsed.S("task_name").Data())
     47 + doneStep := cast.ToString(jsonParsed.S("done_step").Data())
     48 + totalSteps := cast.ToString(jsonParsed.S("total_steps").Data())
     49 + isRunning := cast.ToString(jsonParsed.S("is_running").Data())
     50 + 
     51 + if isRunning == "true" {
     52 + status = "running"
     53 + }
     54 + 
     55 + progress = color.HiCyanString(fmt.Sprintf(doneStep + "/" + totalSteps))
     56 + }
     57 + }
     58 + 
     59 + row := []string{
     60 + path.Base(ws.Name()), status, flowName, progress, wsFolder,
     61 + }
     62 + content = append(content, row)
     63 + }
     64 + }
     65 + 
     66 + table := tablewriter.NewWriter(os.Stderr)
     67 + table.SetAutoFormatHeaders(false)
     68 + table.SetHeader([]string{"Workspace Name", "Flow", "Status", "Progress", "Workspace Path"})
     69 + table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
     70 + table.SetColWidth(120)
     71 + table.AppendBulk(content)
     72 + table.Render()
     73 + 
     74 + fmt.Println(color.HiGreenString("📁 Total Workspaces: ") + color.HiMagentaString("%v", len(content)))
     75 + return content
     76 +}
     77 + 
     78 +func ListSingleWorkspace(options libs.Options, target string) (content [][]string) {
     79 + workspaces, err := ioutil.ReadDir(utils.NormalizePath(options.Env.WorkspacesFolder))
     80 + if err != nil {
     81 + utils.ErrorF("Error reading workspaces folder: %s", err)
     82 + return content
     83 + }
     84 + 
     85 + header := []string{"Workspace Name", "Module", "Report Name", "Report Path"}
     86 + 
     87 + for _, ws := range workspaces {
     88 + if !ws.IsDir() {
     89 + continue
     90 + }
     91 + if target != path.Base(ws.Name()) {
     92 + continue
     93 + }
     94 + wsFolder := path.Join(utils.NormalizePath(options.Env.WorkspacesFolder), ws.Name())
     95 + 
     96 + runtimeFile := path.Join(wsFolder, "runtime")
     97 + if utils.FileExists(runtimeFile) && !options.Report.Raw {
     98 + utils.InforF("Reading information from: %v", runtimeFile)
     99 + runtimeContent := utils.GetFileContent(runtimeFile)
     100 + 
     101 + if jsonParsed, ok := gabs.ParseJSON([]byte(runtimeContent)); ok == nil {
     102 + reports := jsonParsed.S("target", "reports").Children()
     103 + 
     104 + for _, report := range reports {
     105 + moduleName := cast.ToString(report.S("module").Data())
     106 + reportName := cast.ToString(report.S("report_name").Data())
     107 + reportPath := cast.ToString(report.S("report_path").Data())
     108 + 
     109 + row := []string{
     110 + ws.Name(), moduleName, processReport(options, reportName), processReport(options, reportPath),
     111 + }
     112 + 
     113 + content = append(content, row)
     114 + }
     115 + }
     116 + continue
     117 + }
     118 + 
     119 + header = []string{"Workspace Name", "Report Name", "Report Path"}
     120 + if options.Report.Static {
     121 + header = []string{"Workspace Name", "Report Name", "Report URL"}
     122 + }
     123 + filepath.Walk(wsFolder, func(reportPath string, _ os.FileInfo, err error) error {
     124 + reportName := path.Base(reportPath)
     125 + row := []string{
     126 + ws.Name(), processReport(options, reportName), processReport(options, reportPath),
     127 + }
     128 + content = append(content, row)
     129 + return nil
     130 + })
     131 + }
     132 + 
     133 + table := tablewriter.NewWriter(os.Stderr)
     134 + table.SetAutoFormatHeaders(false)
     135 + table.SetHeader(header)
     136 + table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
     137 + table.SetColWidth(120)
     138 + table.AppendBulk(content)
     139 + table.Render()
     140 + 
     141 + return content
     142 +}
     143 + 
     144 +func processReport(options libs.Options, reportPath string) string {
     145 + if options.Report.Static {
     146 + base := fmt.Sprintf("https://%s:8000/%s/workspaces", options.Report.PublicIP, options.Server.StaticPrefix)
     147 + reportPath = strings.ReplaceAll(reportPath, options.Env.WorkspacesFolder, base)
     148 + }
     149 + 
     150 + if strings.HasSuffix(reportPath, ".html") {
     151 + reportPath = color.HiCyanString(reportPath)
     152 + }
     153 + if strings.HasSuffix(reportPath, ".json") {
     154 + reportPath = color.HiBlueString(reportPath)
     155 + }
     156 + 
     157 + return reportPath
     158 +}
     159 + 
  • ■ ■ ■ ■ ■
    core/runtime.go
    skipped 105 lines
    106 106   if err != nil {
    107 107   validate = true
    108 108   }
    109  - result, _ := vm.ToValue(validate)
     109 + result, err := vm.ToValue(validate)
     110 + if err != nil {
     111 + return otto.Value{}
     112 + }
    110 113   return result
    111 114   })
    112 115   
    skipped 2 lines
    115 118   filename := call.Argument(0).String()
    116 119   utils.InforF("Showing result of: %v", color.HiCyanString(filename))
    117 120   utils.Cat(filename)
    118  - result, _ := vm.ToValue(true)
     121 + result, err := vm.ToValue(true)
     122 + if err != nil {
     123 + return otto.Value{}
     124 + }
    119 125   return result
    120 126   })
    121 127   
    skipped 7 lines
    129 135   return result
    130 136   })
    131 137   
    132  - // ExecCmd execute command command
     138 + // ExecCmd execute command
    133 139   vm.Set(ExecCmdWithOutput, func(call otto.FunctionCall) otto.Value {
    134 140   out := utils.RunCmdWithOutput(call.Argument(0).String())
    135 141   result, err := vm.ToValue(out)
    skipped 3 lines
    139 145   return result
    140 146   })
    141 147   
    142  - // ExecCmd execute command command
     148 + // ExecCmd execute command
    143 149   vm.Set(ExecContain, func(call otto.FunctionCall) otto.Value {
    144 150   out := utils.RunCmdWithOutput(call.Argument(0).String())
    145 151   expected := call.Argument(2).String()
    skipped 136 lines
    282 288   })
    283 289   
    284 290   vm.Set(EmptyFile, func(call otto.FunctionCall) otto.Value {
    285  - result, _ := vm.ToValue(utils.EmptyFile(call.Argument(0).String(), 0))
     291 + result, err := vm.ToValue(utils.EmptyFile(call.Argument(0).String(), 0))
     292 + if err != nil {
     293 + return otto.Value{}
     294 + }
    286 295   if len(call.ArgumentList) > 1 {
    287 296   num, _ := call.Argument(0).ToInteger()
    288  - result, _ = vm.ToValue(utils.EmptyFile(call.Argument(0).String(), int(num)))
     297 + result, err = vm.ToValue(utils.EmptyFile(call.Argument(0).String(), int(num)))
     298 + if err != nil {
     299 + return otto.Value{}
     300 + }
    289 301   }
    290 302   return result
    291 303   })
    skipped 145 lines
  • ■ ■ ■ ■ ■ ■
    core/update.go
    skipped 5 lines
    6 6   "github.com/fatih/color"
    7 7   "github.com/hashicorp/go-version"
    8 8   "github.com/j3ssie/osmedeus/libs"
     9 + "github.com/j3ssie/osmedeus/provider"
    9 10   "github.com/j3ssie/osmedeus/utils"
    10 11   jsoniter "github.com/json-iterator/go"
    11 12   "github.com/mitchellh/go-homedir"
    skipped 6 lines
    18 19   
    19 20  /* Mostly calling OS commands for double-check the PATH too */
    20 21   
    21  -func UpdateMetadata(options *libs.Options) {
     22 +func CheckUpdate(options *libs.Options) bool {
    22 23   // t.Format("02-Jan-2006")
    23 24   
    24 25   var shouldUpdate bool
    skipped 19 lines
    44 45   oldMetaDataContent := utils.GetFileContent(metadataFile)
    45 46   if err := jsoniter.UnmarshalFromString(oldMetaDataContent, &oldMetaData); err != nil {
    46 47   utils.ErrorF("error to parse metadata: %v", metadataFile)
    47  - return
     48 + return false
    48 49   }
    49 50   }
    50 51   
    skipped 2 lines
    53 54   if res.StatusCode == 200 {
    54 55   if err := jsoniter.UnmarshalFromString(res.Body, &newMetaData); err != nil {
    55 56   utils.ErrorF("error to parse metadata: %v", options.Update.MetaDataURL)
    56  - return
     57 + return false
    57 58   }
    58 59   
    59 60   utils.InforF("Writing metadata to: %v", color.HiCyanString(metadataFile))
    skipped 2 lines
    62 63   }
    63 64   } else {
    64 65   utils.ErrorF("error fetching metadata from: %v", options.Update.MetaDataURL)
    65  - return
     66 + return false
    66 67   }
    67 68   
    68 69   utils.DebugF(res.Body)
    skipped 1 lines
    70 71   v1, err := version.NewVersion(oldMetaData.CoreVersion)
    71 72   if err != nil {
    72 73   utils.ErrorF("error parsing version: %v -- %v", oldMetaData.CoreVersion, err)
    73  - return
     74 + return false
    74 75   }
    75 76   
    76 77   // get from metadata URL
    skipped 1 lines
    78 79   if err != nil {
    79 80   utils.ErrorF("error parsing version: %v -- %v", newMetaData.CoreVersion, err)
    80 81   
    81  - return
     82 + return false
    82 83   }
    83 84   
    84 85   // Comparison example. There is also GreaterThan, Equal, and just
    skipped 25 lines
    110 111   home, _ := homedir.Dir()
    111 112   fmt.Printf("📖 Run %s again to update Check out this page for more detail: %s\n", color.HiGreenString("the same install script"), color.HiGreenString("https://docs.osmedeus.org/installation/"))
    112 113   fmt.Printf("💡 If you want a fresh install please run the command: %s\n", color.HiBlueString("rm -rf %s/osmedeus-base %s/.osmedeus", home, home))
     114 + }
     115 + 
     116 + return shouldUpdate
     117 +}
     118 + 
     119 +func GetUpdateURL(options libs.Options) string {
     120 + if !options.PremiumPackage {
     121 + utils.InforF("Getting update url of public community package")
     122 + return libs.INSTALL
     123 + }
     124 + utils.InforF("💎 Getting update url of premium package")
     125 + 
     126 + providerConfigs, err := provider.ParseProvider(options.CloudConfigFile)
     127 + if err != nil {
     128 + utils.ErrorF("error to parse provider config: %v", err)
     129 + return ""
     130 + }
     131 + 
     132 + return providerConfigs.Builder.BuildRepo
     133 +}
     134 + 
     135 +func RunUpdate(options libs.Options) error {
     136 + if options.Update.UpdateURL == "" {
     137 + return fmt.Errorf("no update URL")
     138 + }
     139 + 
     140 + if options.Update.CleanOldData {
     141 + utils.InforF("Cleaning old data: %s", color.HiCyanString(options.Env.BaseFolder))
     142 + os.RemoveAll(options.Env.BaseFolder)
     143 + }
     144 + 
     145 + if options.PremiumPackage {
     146 + utils.InforF("Running update from premium package install script")
     147 + } else {
     148 + utils.InforF("Running update from: %v", color.HiCyanString(options.Update.UpdateURL))
     149 + }
     150 + 
     151 + options.Update.UpdateScript = fmt.Sprintf("/tmp/%s-update.sh", libs.BINARY)
     152 + cmd := fmt.Sprintf("rm -rf %s && wget --no-check-certificate -qO %s %s ", options.Update.UpdateScript, options.Update.UpdateScript, options.Update.UpdateURL)
     153 + _, err := utils.RunCommandWithErr(cmd)
     154 + if err != nil {
     155 + utils.ErrorF("error to run update script: %v", err)
     156 + return err
     157 + }
     158 + 
     159 + if !utils.FileExists(options.Update.UpdateScript) {
     160 + utils.ErrorF("update script doesn't exist: %v", options.Update.UpdateScript)
     161 + return fmt.Errorf("update script doesn't exist: %v", options.Update.UpdateScript)
     162 + }
     163 + 
     164 + if _, err := utils.RunCommandSteamOutput(fmt.Sprintf(`bash %s`, options.Update.UpdateScript)); err != nil {
     165 + utils.ErrorF("error to run update script: %v", err)
     166 + return err
     167 + }
     168 + return nil
     169 +}
     170 + 
     171 +func GenerateMetaData(options libs.Options) {
     172 + utils.InforF("Generating metadata to: %v", color.HiCyanString(options.Update.GenerateMeta))
     173 + t := time.Now()
     174 + t.Format("2006-01-02T15:04:05")
     175 + var updateData = libs.UpdateMetaData{
     176 + CoreVersion: libs.VERSION,
     177 + WorkflowVersion: libs.VERSION,
     178 + UpdatedAt: t.Format("2006-01-02T15:04"),
     179 + }
     180 + 
     181 + if data, ok := jsoniter.MarshalToString(updateData); ok == nil {
     182 + utils.InforF("Generate meta data: %v", data)
     183 + utils.WriteToFile(options.Update.GenerateMeta, data)
    113 184   }
    114 185  }
    115 186   
    skipped 138 lines
  • ■ ■ ■ ■ ■ ■
    go.mod
    skipped 5 lines
    6 6   github.com/Jeffail/gabs/v2 v2.6.1
    7 7   github.com/Shopify/yaml v2.1.0+incompatible
    8 8   github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
    9  - github.com/arsmn/fiber-swagger/v2 v2.24.0
    10 9   github.com/cenkalti/backoff/v4 v4.1.2
    11 10   github.com/davecgh/go-spew v1.1.1
    12 11   github.com/dgrijalva/jwt-go v3.2.0+incompatible
    skipped 2 lines
    15 14   github.com/go-playground/validator/v10 v10.10.0
    16 15   github.com/go-resty/resty/v2 v2.7.0
    17 16   github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
    18  - github.com/gofiber/fiber/v2 v2.25.0
     17 + github.com/gofiber/fiber/v2 v2.27.0
    19 18   github.com/gofiber/jwt/v2 v2.2.7
     19 + github.com/hashicorp/go-version v1.4.0
    20 20   github.com/jasonlvhit/gocron v0.0.1
    21 21   github.com/jinzhu/copier v0.3.5
    22 22   github.com/json-iterator/go v1.1.12
    skipped 2 lines
    25 25   github.com/mackerelio/go-osstat v0.2.1
    26 26   github.com/mitchellh/go-homedir v1.1.0
    27 27   github.com/mitchellh/go-ps v1.0.0
     28 + github.com/olekukonko/tablewriter v0.0.5
    28 29   github.com/panjf2000/ants v1.3.0
    29 30   github.com/parnurzeal/gorequest v0.2.16
    30 31   github.com/robertkrimen/otto v0.0.0-20211024170158-b87d35c0b86f
    31 32   github.com/shirou/gopsutil v3.21.11+incompatible
    32 33   github.com/sirupsen/logrus v1.8.1
    33  - github.com/slack-go/slack v0.10.1
     34 + github.com/slack-go/slack v0.10.2
    34 35   github.com/spf13/cast v1.4.1
    35 36   github.com/spf13/cobra v1.3.0
    36 37   github.com/spf13/viper v1.10.1
    37  - github.com/swaggo/swag v1.7.8
     38 + github.com/swaggo/swag v1.8.0
    38 39   github.com/thoas/go-funk v0.9.1
    39 40   github.com/x-cray/logrus-prefixed-formatter v0.5.2
    40  - github.com/xanzy/go-gitlab v0.54.4
    41  - golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
    42  - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
    43  - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
     41 + github.com/xanzy/go-gitlab v0.55.1
     42 + golang.org/x/crypto v0.0.0-20220214200702-86341886e292
     43 + golang.org/x/net v0.0.0-20220225172249-27dd8689420f
     44 + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b
    44 45   golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
    45 46   gorm.io/datatypes v1.0.5
    46  - gorm.io/driver/mysql v1.2.3
    47  - gorm.io/driver/sqlite v1.2.6
    48  - gorm.io/gorm v1.22.5
     47 + gorm.io/driver/mysql v1.3.2
     48 + gorm.io/driver/sqlite v1.3.1
     49 + gorm.io/gorm v1.23.1
    49 50  )
    50 51   
    51 52  require (
    52 53   github.com/KyleBanks/depth v1.2.1 // indirect
    53 54   github.com/PuerkitoBio/purell v1.1.1 // indirect
    54 55   github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
    55  - github.com/andybalholm/brotli v1.0.2 // indirect
     56 + github.com/andybalholm/brotli v1.0.4 // indirect
    56 57   github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac // indirect
    57 58   github.com/fsnotify/fsnotify v1.5.1 // indirect
    58 59   github.com/go-ole/go-ole v1.2.6 // indirect
    skipped 10 lines
    69 70   github.com/gorilla/websocket v1.4.2 // indirect
    70 71   github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
    71 72   github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
    72  - github.com/hashicorp/go-version v1.4.0 // indirect
    73 73   github.com/hashicorp/hcl v1.0.0 // indirect
    74 74   github.com/inconshreveable/mousetrap v1.0.0 // indirect
    75 75   github.com/jinzhu/inflection v1.0.0 // indirect
    76 76   github.com/jinzhu/now v1.1.4 // indirect
    77 77   github.com/josharian/intern v1.0.0 // indirect
    78  - github.com/klauspost/compress v1.13.4 // indirect
     78 + github.com/klauspost/compress v1.14.1 // indirect
    79 79   github.com/leodido/go-urn v1.2.1 // indirect
    80 80   github.com/magiconair/properties v1.8.5 // indirect
    81 81   github.com/mailru/easyjson v0.7.6 // indirect
    skipped 5 lines
    87 87   github.com/mitchellh/mapstructure v1.4.3 // indirect
    88 88   github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
    89 89   github.com/modern-go/reflect2 v1.0.2 // indirect
    90  - github.com/olekukonko/tablewriter v0.0.5 // indirect
    91 90   github.com/pelletier/go-toml v1.9.4 // indirect
    92 91   github.com/pkg/errors v0.8.1 // indirect
     92 + github.com/smartystreets/goconvey v1.7.2 // indirect
    93 93   github.com/spf13/afero v1.6.0 // indirect
    94 94   github.com/spf13/jwalterweatherman v1.1.0 // indirect
    95 95   github.com/spf13/pflag v1.0.5 // indirect
    96 96   github.com/subosito/gotenv v1.2.0 // indirect
    97  - github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 // indirect
    98 97   github.com/technoweenie/multipartstreamer v1.0.1 // indirect
    99 98   github.com/tklauser/go-sysconf v0.3.9 // indirect
    100 99   github.com/tklauser/numcpus v0.3.0 // indirect
    101 100   github.com/valyala/bytebufferpool v1.0.0 // indirect
    102  - github.com/valyala/fasthttp v1.32.0 // indirect
     101 + github.com/valyala/fasthttp v1.33.0 // indirect
    103 102   github.com/valyala/tcplisten v1.0.0 // indirect
    104 103   github.com/yusufpapurcu/wmi v1.2.2 // indirect
    105  - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
     104 + golang.org/x/sys v0.0.0-20220111092808-5a964db01320 // indirect
    106 105   golang.org/x/text v0.3.7 // indirect
    107 106   golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
    108 107   golang.org/x/tools v0.1.7 // indirect
    skipped 2 lines
    111 110   gopkg.in/ini.v1 v1.66.2 // indirect
    112 111   gopkg.in/sourcemap.v1 v1.0.5 // indirect
    113 112   gopkg.in/yaml.v2 v2.4.0 // indirect
    114  - gorm.io/driver/postgres v1.2.3 // indirect
    115  - gorm.io/driver/sqlserver v1.2.1 // indirect
     113 + gorm.io/driver/postgres v1.3.1 // indirect
     114 + gorm.io/driver/sqlserver v1.3.1 // indirect
    116 115   moul.io/http2curl v1.0.0 // indirect
    117 116  )
    118 117   
  • ■ ■ ■ ■ ■ ■
    go.sum
    skipped 45 lines
    46 46  cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
    47 47  cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
    48 48  dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
     49 +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw=
     50 +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0=
     51 +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8=
    49 52  github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
    50 53  github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
    51 54  github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
    skipped 16 lines
    68 71  github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
    69 72  github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
    70 73  github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
    71  -github.com/andybalholm/brotli v1.0.2 h1:JKnhI/XQ75uFBTiuzXpzFrUriDPiZjlOSzh6wXogP0E=
    72 74  github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
     75 +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
     76 +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
    73 77  github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
    74 78  github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
    75 79  github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
    76 80  github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
    77 81  github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
    78 82  github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
    79  -github.com/arsmn/fiber-swagger/v2 v2.24.0 h1:bocCwzuSUuIyNmOVgReB8Hx8CGi/9Lq9Q70Lu0b7YRs=
    80  -github.com/arsmn/fiber-swagger/v2 v2.24.0/go.mod h1:LesOG43zy+8Fd18VosNWbPWNA8fAbE59Fe3vXQS1BbA=
    81 83  github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
    82 84  github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
    83 85  github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
    skipped 33 lines
    117 119  github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
    118 120  github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
    119 121  github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
    120  -github.com/denisenkom/go-mssqldb v0.11.0 h1:9rHa233rhdOyrz2GcP9NM+gi2psgJZ4GWDpL/7ND8HI=
    121  -github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
     122 +github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA=
     123 +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU=
    122 124  github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
    123 125  github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
    124 126  github.com/digitalocean/godo v1.75.0 h1:UijUv60I095CqJqGKdjY2RTPnnIa4iFddmq+1wfyS4Y=
    125 127  github.com/digitalocean/godo v1.75.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs=
     128 +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
    126 129  github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac h1:XDAn206aIqKPdF5YczuuJXSQPx+WOen0Pxbxp5Fq8Pg=
    127 130  github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
    128 131  github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
    skipped 58 lines
    187 190  github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
    188 191  github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
    189 192  github.com/gofiber/fiber/v2 v2.17.0/go.mod h1:iftruuHGkRYGEXVISmdD7HTYWyfS2Bh+Dkfq4n/1Owg=
    190  -github.com/gofiber/fiber/v2 v2.24.0/go.mod h1:MR1usVH3JHYRyQwMe2eZXRSZHRX38fkV+A7CPB+DlDQ=
    191  -github.com/gofiber/fiber/v2 v2.25.0 h1:kv8dmG/sAFDFpTueCMEn4X0JS5d72pEFTKLZ3miOREw=
    192  -github.com/gofiber/fiber/v2 v2.25.0/go.mod h1:7efVWcBOZi1PyMWznnbitjnARPA7nYZxmQXJVod0bo0=
     193 +github.com/gofiber/fiber/v2 v2.27.0 h1:u34t1nOea7zz4jcZDK7+ZMiG+MVFYrHqMhTdYQDiFA8=
     194 +github.com/gofiber/fiber/v2 v2.27.0/go.mod h1:0bPXdTu+jRqINrEq1T6mHeVBnE0lQd67PGu35jD3hLk=
    193 195  github.com/gofiber/jwt/v2 v2.2.7 h1:MgXZV+ak+FiRVepD3btHBxWcyxlFzTDGXJv78dU1sIE=
    194 196  github.com/gofiber/jwt/v2 v2.2.7/go.mod h1:yaOHLccYXJidk1HX/EiIdIL+Z1xmY2wnIv6hgViw384=
    195 197  github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
    skipped 3 lines
    199 201  github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
    200 202  github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
    201 203  github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
     204 +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4=
     205 +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8=
    202 206  github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
    203 207  github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
    204 208  github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
    skipped 158 lines
    363 367  github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
    364 368  github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
    365 369  github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
    366  -github.com/jackc/pgtype v1.9.0 h1:/SH1RxEtltvJgsDqp3TbiTFApD3mey3iygpuEGeuBXk=
    367  -github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
     370 +github.com/jackc/pgtype v1.9.1 h1:MJc2s0MFS8C3ok1wQTdQxWuXQcB6+HwAm5x1CzW7mf0=
     371 +github.com/jackc/pgtype v1.9.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
    368 372  github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
    369 373  github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
    370 374  github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
    371 375  github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
    372  -github.com/jackc/pgx/v4 v4.14.0 h1:TgdrmgnM7VY72EuSQzBbBd4JA1RLqJolrw9nQVZABVc=
    373  -github.com/jackc/pgx/v4 v4.14.0/go.mod h1:jT3ibf/A0ZVCp89rtCIN0zCJxcE74ypROmHEZYsG/j8=
     376 +github.com/jackc/pgx/v4 v4.14.1 h1:71oo1KAGI6mXhLiTMn6iDFcp3e7+zon/capWjl2OEFU=
     377 +github.com/jackc/pgx/v4 v4.14.1/go.mod h1:RgDuE4Z34o7XE92RpLsvFiOEfrAUT0Xt2KxvX73W06M=
    374 378  github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
    375 379  github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
    376 380  github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
    skipped 4 lines
    381 385  github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
    382 386  github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
    383 387  github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
    384  -github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
    385 388  github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
    386 389  github.com/jinzhu/now v1.1.4 h1:tHnRBy1i5F2Dh8BAFxqFzxKqqvezXrL2OW1TnX+Mlas=
    387 390  github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
    skipped 12 lines
    400 403  github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
    401 404  github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
    402 405  github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
    403  -github.com/klauspost/compress v1.13.4 h1:0zhec2I8zGnjWcKyLl6i3gPqKANCCn5e9xmviEEeX6s=
    404  -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
     406 +github.com/klauspost/compress v1.14.1 h1:hLQYb23E8/fO+1u53d02A97a8UnsddcvYzq4ERRU4ds=
     407 +github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
    405 408  github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
    406 409  github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
    407 410  github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
    skipped 70 lines
    478 481  github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
    479 482  github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
    480 483  github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
     484 +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
    481 485  github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
    482 486  github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
    483 487  github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
    skipped 17 lines
    501 505  github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
    502 506  github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
    503 507  github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
     508 +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
    504 509  github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
    505 510  github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
    506 511  github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
    skipped 43 lines
    550 555  github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
    551 556  github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
    552 557  github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
    553  -github.com/slack-go/slack v0.10.1 h1:BGbxa0kMsGEvLOEoZmYs8T1wWfoZXwmQFBb6FgYCXUA=
    554  -github.com/slack-go/slack v0.10.1/go.mod h1:wWL//kk0ho+FcQXcBTmEafUI5dz4qz5f4mMk8oIkioQ=
    555  -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
     558 +github.com/slack-go/slack v0.10.2 h1:KMN/h2sgUninHXvQI8PrR/PHBUuWp2NPvz2Kr66tki4=
     559 +github.com/slack-go/slack v0.10.2/go.mod h1:5FLdBRv7VW/d9EBxx/eEktOptWygbA9K2QK/KW7ds1s=
    556 560  github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
    557  -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
     561 +github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
     562 +github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
    558 563  github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
     564 +github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
     565 +github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
    559 566  github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
    560 567  github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
    561 568  github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
    skipped 21 lines
    583 590  github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
    584 591  github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
    585 592  github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
    586  -github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 h1:+iNTcqQJy0OZ5jk6a5NLib47eqXK8uYcPX+O4+cBpEM=
    587  -github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
    588  -github.com/swaggo/swag v1.7.8 h1:w249t0l/kc/DKMGlS0fppNJQxKyJ8heNaUWB6nsH3zc=
    589  -github.com/swaggo/swag v1.7.8/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
     593 +github.com/swaggo/swag v1.8.0 h1:80NNhvpJcuItNpBDqgJwDuKlMmaZ/OATOzhG3bhcM3w=
     594 +github.com/swaggo/swag v1.8.0/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
    590 595  github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
    591 596  github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
    592 597  github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
    skipped 7 lines
    600 605  github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
    601 606  github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
    602 607  github.com/valyala/fasthttp v1.26.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA=
    603  -github.com/valyala/fasthttp v1.31.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
    604  -github.com/valyala/fasthttp v1.32.0 h1:keswgWzyKyNIIjz2a7JmCYHOOIkRp6HMx9oTV6QrZWY=
    605  -github.com/valyala/fasthttp v1.32.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
     608 +github.com/valyala/fasthttp v1.33.0 h1:mHBKd98J5NcXuBddgjvim1i3kWzlng1SzLhrnBOU9g8=
     609 +github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4=
    606 610  github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
    607 611  github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
    608 612  github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
    609 613  github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
    610  -github.com/xanzy/go-gitlab v0.54.4 h1:3CFEdQ9O+bFx3BsyuOK0gqgLPwnT2rwnPOjudV07wTw=
    611  -github.com/xanzy/go-gitlab v0.54.4/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
     614 +github.com/xanzy/go-gitlab v0.55.1 h1:IgX/DS9buV0AUz8fuJPQkdl0fQGfBiAsAHxpun8sNhg=
     615 +github.com/xanzy/go-gitlab v0.55.1/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
    612 616  github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
    613 617  github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
    614 618  github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
    skipped 31 lines
    646 650  golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
    647 651  golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
    648 652  golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
    649  -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
    650 653  golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
    651 654  golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
    652 655  golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
    skipped 1 lines
    654 657  golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
    655 658  golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
    656 659  golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
     660 +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
    657 661  golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
    658 662  golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
    659 663  golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
    660 664  golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
    661 665  golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
    662 666  golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
    663  -golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
    664  -golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
     667 +golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
     668 +golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE=
     669 +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
    665 670  golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
    666 671  golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
    667 672  golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
    skipped 76 lines
    744 749  golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    745 750  golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    746 751  golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
     752 +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    747 753  golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    748 754  golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    749 755  golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    750 756  golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    751  -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
     757 +golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
    752 758  golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
     759 +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
     760 +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
    753 761  golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
    754 762  golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
    755 763  golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
    skipped 11 lines
    767 775  golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
    768 776  golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
    769 777  golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
    770  -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
    771 778  golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
     779 +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
     780 +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
    772 781  golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
    773 782  golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
    774 783  golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
    skipped 79 lines
    854 863  golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    855 864  golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    856 865  golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    857  -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
    858 866  golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
     867 +golang.org/x/sys v0.0.0-20220111092808-5a964db01320 h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY=
     868 +golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    859 869  golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
    860 870  golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
    861 871  golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
    skipped 262 lines
    1124 1134  gorm.io/datatypes v1.0.5 h1:3vHCfg4Bz8SDx83zE+ASskF+g/j0kWrcKrY9jFUyAl0=
    1125 1135  gorm.io/datatypes v1.0.5/go.mod h1:acG/OHGwod+1KrbwPL1t+aavb7jOBOETeyl5M8K5VQs=
    1126 1136  gorm.io/driver/mysql v1.2.2/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo=
    1127  -gorm.io/driver/mysql v1.2.3 h1:cZqzlOfg5Kf1VIdLC1D9hT6Cy9BgxhExLj/2tIgUe7Y=
    1128  -gorm.io/driver/mysql v1.2.3/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo=
    1129  -gorm.io/driver/postgres v1.2.3 h1:f4t0TmNMy9gh3TU2PX+EppoA6YsgFnyq8Ojtddb42To=
    1130  -gorm.io/driver/postgres v1.2.3/go.mod h1:pJV6RgYQPG47aM1f0QeOzFH9HxQc8JcmAgjRCgS0wjs=
    1131  -gorm.io/driver/sqlite v1.2.6 h1:SStaH/b+280M7C8vXeZLz/zo9cLQmIGwwj3cSj7p6l4=
    1132  -gorm.io/driver/sqlite v1.2.6/go.mod h1:gyoX0vHiiwi0g49tv+x2E7l8ksauLK0U/gShcdUsjWY=
    1133  -gorm.io/driver/sqlserver v1.2.1 h1:KhGOjvPX7JZ5hPyQICTJfMuTz88zgJ2lk9bWiHVNHd8=
    1134  -gorm.io/driver/sqlserver v1.2.1/go.mod h1:nixq0OB3iLXZDiPv6JSOjWuPgpyaRpOIIevYtA4Ulb4=
    1135  -gorm.io/gorm v1.22.2/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
    1136  -gorm.io/gorm v1.22.3/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
     1137 +gorm.io/driver/mysql v1.3.2 h1:QJryWiqQ91EvZ0jZL48NOpdlPdMjdip1hQ8bTgo4H7I=
     1138 +gorm.io/driver/mysql v1.3.2/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U=
     1139 +gorm.io/driver/postgres v1.3.1 h1:Pyv+gg1Gq1IgsLYytj/S2k7ebII3CzEdpqQkPOdH24g=
     1140 +gorm.io/driver/postgres v1.3.1/go.mod h1:WwvWOuR9unCLpGWCL6Y3JOeBWvbKi6JLhayiVclSZZU=
     1141 +gorm.io/driver/sqlite v1.3.1 h1:bwfE+zTEWklBYoEodIOIBwuWHpnx52Z9zJFW5F33WLk=
     1142 +gorm.io/driver/sqlite v1.3.1/go.mod h1:wJx0hJspfycZ6myN38x1O/AqLtNS6c5o9TndewFbELg=
     1143 +gorm.io/driver/sqlserver v1.3.1 h1:F5t6ScMzOgy1zukRTIZgLZwKahgt3q1woAILVolKpOI=
     1144 +gorm.io/driver/sqlserver v1.3.1/go.mod h1:w25Vrx2BG+CJNUu/xKbFhaKlGxT/nzRkhWCCoptX8tQ=
    1137 1145  gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk=
    1138  -gorm.io/gorm v1.22.5 h1:lYREBgc02Be/5lSCTuysZZDb6ffL2qrat6fg9CFbvXU=
    1139  -gorm.io/gorm v1.22.5/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
     1146 +gorm.io/gorm v1.23.1 h1:aj5IlhDzEPsoIyOPtTRVI+SyaN1u6k613sbt4pwbxG0=
     1147 +gorm.io/gorm v1.23.1/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
    1140 1148  honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
    1141 1149  honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
    1142 1150  honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
    skipped 10 lines
  • ■ ■ ■ ■ ■ ■
    libs/options.go
    skipped 50 lines
    51 51   Update Update
    52 52   
    53 53   Cloud Cloud
     54 + Report Report
    54 55   CloudConfigFile string
    55 56   GitSync bool
    56 57   
    skipped 16 lines
    73 74   BaseWorkspace string
    74 75   CustomWorkspace string
    75 76   Force bool
     77 +}
     78 + 
     79 +// Report sub options for report
     80 +type Report struct {
     81 + CustomPreFix string
     82 + PublicIP string
     83 + WorkspaceFile string
     84 + Static bool
     85 + Raw bool
    76 86  }
    77 87   
    78 88  // Server sub options for api server
    skipped 63 lines
  • ■ ■ ■ ■ ■
    libs/update.go
    skipped 1 lines
    2 2   
    3 3  // Update some config path
    4 4  type Update struct {
    5  - UpdateURL string
     5 + UpdateURL string // url to download the update script
     6 + UpdateScript string
    6 7   MetaDataURL string
    7 8   UpdateKey string //
    8 9   UpdateType string // git, http
    skipped 2 lines
    11 12   UpdateVersion string
    12 13   UpdateFolder string
    13 14   UpdateDate string
     15 + CleanOldData bool
     16 + GenerateMeta string
     17 + ForceUpdate bool
    14 18   IsUpdateBin bool
    15 19   EnableUpdate bool
    16 20   NoUpdate bool
    skipped 8 lines
  • ■ ■ ■ ■ ■ ■
    libs/version.go
    skipped 3 lines
    4 4   
    5 5  const (
    6 6   // VERSION of this project
    7  - VERSION = "v4.0.2"
     7 + VERSION = "v4.0.3"
    8 8   // DESC description of the tool
    9 9   DESC = "A Workflow Engine for Offensive Security"
    10  - // BINARY name of Osmedeus
     10 + // BINARY name of osmedeus
    11 11   BINARY = "osmedeus"
    12  - // SNAPSHOT binary name of Osmedeus
     12 + // SNAPSHOT binary name of osmedeus
    13 13   SNAPSHOT = "osm"
    14 14   // AUTHOR of this
    15 15   AUTHOR = "@j3ssiejjj"
    skipped 1 lines
    17 17   DOCS = "https://docs.osmedeus.org"
    18 18   // METADATA domain for checking update
    19 19   METADATA = "https://metadata.osmedeus.org"
     20 + // INSTALL default install script
     21 + INSTALL = "https://raw.githubusercontent.com/osmedeus/osmedeus-base/master/install.sh"
    20 22  )
    21 23   
    22 24  // TEMP default folder to store inputs
    skipped 3 lines
  • ■ ■ ■ ■ ■ ■
    utils/helper.go
    skipped 459 lines
    460 460   }
    461 461  }
    462 462   
     463 +func RunCommandSteamOutput(cmd string) (string, error) {
     464 + DebugF("Execute: %s", cmd)
     465 + command := []string{
     466 + "bash",
     467 + "-c",
     468 + cmd,
     469 + }
     470 + var output string
     471 + realCmd := exec.Command(command[0], command[1:]...)
     472 + 
     473 + // output command output to std too
     474 + cmdReader, _ := realCmd.StdoutPipe()
     475 + scanner := bufio.NewScanner(cmdReader)
     476 + go func() {
     477 + for scanner.Scan() {
     478 + out := scanner.Text()
     479 + fmt.Println(out)
     480 + output += out
     481 + }
     482 + }()
     483 + if err := realCmd.Start(); err != nil {
     484 + return output, err
     485 + }
     486 + if err := realCmd.Wait(); err != nil {
     487 + return output, err
     488 + }
     489 + return output, nil
     490 +}
     491 + 
    463 492  func RunOSCommand(cmd string) (string, error) {
    464 493   DebugF("Execute: %s", cmd)
    465 494   command := []string{
    skipped 400 lines
Please wait...
Page is in error, reload to recover