Projects STRLCPY Osmedeus Commits 5f41948e
🤬
  • ■ ■ ■ ■ ■
    README.md
    skipped 83 lines
    84 84   
    85 85  ## 💎 Donation & Sponsor
    86 86   
    87  -Check out for a couple of **[donation methods here]((https://docs.osmedeus.org/donation/))** to get a **[premium package](https://docs.osmedeus.org/premium/)**
     87 +Check out for a couple of **[donation methods here]((https://docs.osmedeus.org/donation/))** to get
     88 +a **[premium package](https://docs.osmedeus.org/premium/)**
     89 + 
    88 90  ## License
    89 91   
    90 92  `Osmedeus` is made with ♥ by [@j3ssiejjj](https://twitter.com/j3ssiejjj) and it is released under the MIT license.
    skipped 1 lines
  • ■ ■ ■ ■
    cmd/health.go
    skipped 206 lines
    207 207   if err != nil {
    208 208   utils.ErrorF("Error parsing flow: %v", flow)
    209 209   }
    210  - fmt.Printf("%10s - %s\n", parsedFlow.Name, parsedFlow.Desc)
     210 + fmt.Printf(" %15s - %s\n", parsedFlow.Name, parsedFlow.Desc)
    211 211   }
    212 212   h := "\nUsage:\n"
    213 213   h += " osmedeus scan -f [flowName] -t [target] \n"
    skipped 4 lines
  • ■ ■ ■ ■ ■ ■
    cmd/usage.go
    skipped 31 lines
    32 32  
    33 33   ## Start a simple scan with other flow
    34 34   osmedeus scan -f vuln -t sample.com
     35 + osmedeus scan -f extensive -t sample.com -t another.com
     36 +
     37 + ## Scan list of targets
     38 + osmedeus scan -T list_of_targets.txt
    35 39  
    36 40   ## Scan for CIDR with file contains CIDR with the format '1.2.3.4/24'
    37 41   osmedeus scan -f cidr -t list-of-cidrs.txt
    skipped 5 lines
    43 47   ## Use a custom wordlist
    44 48   osmedeus scan -t sample.com -p 'wordlists={{.Data}}/wordlists/content/big.txt' -p 'fthreads=40'
    45 49  
    46  - ## Scan list of targets
    47  - osmedeus scan -T list_of_targets.txt
    48  -
    49 50   ## Get target from a stdin and start the scan with 2 concurrency
    50 51   cat list_of_targets.txt | osmedeus scan -c 2
    51 52   
    52 53   ## Start the scan with your custom workflow folder
    53 54   osmedeus scan --wfFolder ~/custom-workflow/ -f your-custom-workflow -t sample.com
    54 55   
     56 + ## Start the scan with chunkk inputs to review the output way more much faster
     57 + osmedeus scan --chunk --chunk-parts 20 -f cidr -t list-of-100-cidr.txt
    55 58   `
    56 59   h += color.HiCyanString("\nScan Usage:\n")
    57 60   h += " osmedeus scan -f [flowName] -t [target] \n"
    skipped 6 lines
    64 67   h += color.HiCyanString("\nPractical Scan Usage:\n")
    65 68   h += " osmedeus scan -T list_of_targets.txt -W custom_workspaces\n"
    66 69   h += " osmedeus scan -t target.com -w workspace_name --debug\n"
    67  - h += " osmedeus scan -f general -t www.sample.com\n"
     70 + h += " osmedeus scan -f general -t sample.com\n"
     71 + h += " osmedeus scan -f extensive -t sample.com -t another.com\n"
    68 72   h += " osmedeus scan -f gdirb -T list_of_target.txt\n"
    69 73   h += " osmedeus scan -m ~/.osmedeus/core/workflow/test/dirbscan.yaml -t list_of_urls.txt\n"
    70 74   h += " osmedeus scan --wfFolder ~/custom-workflow/ -f your-custom-workflow -t list_of_urls.txt\n"
    skipped 94 lines
  • ■ ■ ■ ■ ■ ■
    core/parse.go
    skipped 167 lines
    168 168   if len(ROptions) == 0 {
    169 169   ROptions = make(map[string]string)
    170 170   }
    171  - // params from module
     171 + 
     172 + // params from module file
    172 173   if len(module.Params) > 0 {
    173 174   for _, param := range module.Params {
    174 175   for k, v := range param {
    175 176   // skip params if override: false
    176 177   _, exist := ROptions[k]
    177  - if module.Permanent && exist {
    178  - utils.DebugF("Skip Override param: %v", k)
     178 + if module.ForceParams && exist {
     179 + utils.DebugF("Skip Override param: %v --> %v", v, k)
    179 180   continue
    180 181   }
    181 182   
    skipped 6 lines
    188 189   }
    189 190   }
    190 191   
    191  - // more params
     192 + // more params from -p flag
    192 193   if len(options.Scan.Params) > 0 {
    193 194   params := ParseParams(options.Scan.Params)
    194 195   if len(params) > 0 {
    skipped 102 lines
  • ■ ■ ■ ■ ■
    core/reference.go
    skipped 69 lines
    70 70   CastToInt = "CastToInt"
    71 71   StripSlash = "StripSlash"
    72 72   Printf = "Printf"
     73 + Cat = "Cat"
    73 74  )
    74 75   
    75 76  const (
    skipped 15 lines
  • ■ ■ ■ ■ ■ ■
    core/runner.go
    skipped 20 lines
    21 21   InputType string // domain, url, ip, cidr or domain-file, url-file, ip-file, cidr-file
    22 22   RequiredInput string // this should match with InputType
    23 23   IsInvalid bool
     24 + ForceParams bool
    24 25   
    25 26   RoutineType string // module or flow
    26 27   RoutineName string // general
    skipped 65 lines
    92 93   
    93 94   r.Target["FlowPath"] = flow
    94 95   r.RequiredInput = r.Opt.Flow.Validator
     96 + r.ForceParams = r.Opt.Flow.ForceParams
    95 97   
    96 98   // get more params from flow
    97 99   if len(r.Opt.Flow.Params) > 0 {
    skipped 3 lines
    101 103   }
    102 104   }
    103 105   }
     106 + 
    104 107   }
    105 108   
    106 109   // generate routines
    skipped 109 lines
    216 219   for _, routine := range r.Routines {
    217 220   for _, module := range routine.ParsedModules {
    218 221   module = ResolveReports(module, r.Opt)
     222 + module.ForceParams = r.ForceParams
    219 223   r.Opt.Module = module
    220 224   
    221 225   // check exclude options
    skipped 24 lines
  • ■ ■ ■ ■ ■ ■
    core/runtime.go
    skipped 105 lines
    106 106   return result
    107 107   })
    108 108   
     109 + // Cat the file to stdout
     110 + vm.Set(Cat, func(call otto.FunctionCall) otto.Value {
     111 + utils.Cat(call.Argument(0).String())
     112 + result, _ := vm.ToValue(true)
     113 + return result
     114 + })
     115 + 
    109 116   // ExecCmdB execute in the background
    110 117   vm.Set(ExecCmdB, func(call otto.FunctionCall) otto.Value {
    111 118   cmd := call.Argument(0).String()
    skipped 308 lines
  • ■ ■ ■ ■ ■ ■
    libs/flow.go
    skipped 10 lines
    11 11   
    12 12  // Flow struct to define specific field for a mode
    13 13  type Flow struct {
    14  - NoDB bool `yaml:"nodb"`
    15  - Input string
    16  - Validator string // domain, cidr, ip or domain-file, cidr-file and so on
     14 + NoDB bool `yaml:"nodb"`
     15 + ForceParams bool `yaml:"force-params"`
     16 + Input string
     17 + Validator string // domain, cidr, ip or domain-file, cidr-file and so on
    17 18   
    18 19   Name string
    19 20   Type string
    skipped 12 lines
    32 33   
    33 34  // Module struct to define specific field for a module
    34 35  type Module struct {
    35  - NoDB bool `yaml:"nodb"`
    36  - Validator string // domain, cidr, ip
     36 + NoDB bool `yaml:"nodb"`
     37 + Validator string // domain, cidr, ip
     38 + ForceParams bool `yaml:"force-params"`
    37 39   
    38 40   // just for print some info
    39 41   Name string
    skipped 4 lines
    44 46   Resume bool
    45 47   // run module despite resume enable
    46 48   Forced bool
    47  - 
    48  - Permanent bool
    49 49   
    50 50   MTimeout string `yaml:"mtimeout"`
    51 51   Params []map[string]string
    skipped 18 lines
  • ■ ■ ■ ■ ■ ■
    utils/helper.go
    skipped 179 lines
    180 180   return result
    181 181  }
    182 182   
     183 +// Cat Reading file and return content as []string
     184 +func Cat(filename string) {
     185 + filename = NormalizePath(filename)
     186 + if !FileExists(filename) {
     187 + return
     188 + }
     189 + file, err := os.Open(filename)
     190 + if err != nil {
     191 + return
     192 + }
     193 + defer file.Close()
     194 + 
     195 + scanner := bufio.NewScanner(file)
     196 + for scanner.Scan() {
     197 + line := strings.TrimSpace(scanner.Text())
     198 + if line == "" {
     199 + continue
     200 + }
     201 + fmt.Println(line)
     202 + }
     203 + return
     204 +}
     205 + 
    183 206  // ReadingFileUnique Reading file and return content as []string
    184 207  func ReadingFileUnique(filename string) []string {
    185 208   var result []string
    skipped 644 lines
Please wait...
Page is in error, reload to recover