Projects STRLCPY Osmedeus Commits 66c80fd3
🤬
  • README.md
    Content is identical
  • ■ ■ ■ ■ ■ ■
    cmd/report.go
    skipped 56 lines
    57 57  }
    58 58   
    59 59  func runReportView(_ *cobra.Command, _ []string) error {
     60 + if options.Report.PublicIP == "" {
     61 + if utils.GetOSEnv("IPAddress", "127.0.0.1") == "127.0.0.1" {
     62 + options.Report.PublicIP = utils.GetOSEnv("IPAddress", "127.0.0.1")
     63 + }
     64 + }
     65 + 
     66 + if options.Report.PublicIP == "0" || options.Report.PublicIP == "0.0.0.0" {
     67 + options.Report.PublicIP = getPublicIP()
     68 + }
     69 + 
    60 70   if len(options.Scan.Inputs) == 0 {
    61 71   core.ListWorkspaces(options)
    62 72   utils.InforF("Please select workspace to view report. Try %s", color.HiCyanString(`'osmedeus report view -t target.com'`))
    skipped 43 lines
  • ■ ■ ■ ■
    core/cron.go
    skipped 8 lines
    9 9   
    10 10  func taskWithParams(cmd string) {
    11 11   utils.InforF("Exec: %v", color.HiMagentaString(cmd))
    12  - _, err := utils.RunCommandWithErr(cmd)
     12 + _, err := utils.RunCommandSteamOutput(cmd)
    13 13   if err != nil {
    14 14   utils.ErrorF("Error running command: %v", err)
    15 15   }
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    core/external.go
    skipped 92 lines
    93 93   return otto.Value{}
    94 94   })
    95 95   
     96 + vm.Set(CleanFFUFJson, func(call otto.FunctionCall) otto.Value {
     97 + src := call.Argument(0).String()
     98 + dest := call.Argument(1).String()
     99 + execution.CleanFFUFJson(src, dest)
     100 + return otto.Value{}
     101 + })
     102 + 
    96 103   vm.Set(GenNucleiReport, func(call otto.FunctionCall) otto.Value {
    97 104   src := call.Argument(0).String()
    98 105   dest := call.Argument(1).String()
    skipped 155 lines
  • ■ ■ ■ ■ ■
    core/reference.go
    skipped 38 lines
    39 39   CleanArjun = "CleanArjun"
    40 40   GenNucleiReport = "GenNucleiReport"
    41 41   CleanJSONHttpx = "CleanJSONHttpx"
     42 + CleanFFUFJson = "CleanFFUFJson"
    42 43  )
    43 44   
    44 45  const (
    skipped 59 lines
  • ■ ■ ■ ■ ■ ■
    core/runtime.go
    skipped 118 lines
    119 119   // Cat the file to stdout
    120 120   vm.Set(Cat, func(call otto.FunctionCall) otto.Value {
    121 121   filename := call.Argument(0).String()
    122  - utils.InforF("Showing result of: %v", color.HiCyanString(filename))
     122 + utils.InforF("Showing the content of: %v", color.HiCyanString(filename))
    123 123   utils.Cat(filename)
    124 124   result, err := vm.ToValue(true)
    125 125   if err != nil {
    skipped 14 lines
    140 140   
    141 141   // ExecCmd execute command
    142 142   vm.Set(ExecCmdWithOutput, func(call otto.FunctionCall) otto.Value {
    143  - out := utils.RunCmdWithOutput(call.Argument(0).String())
    144  - result, err := vm.ToValue(out)
     143 + utils.RunCommandSteamOutput(call.Argument(0).String())
     144 + result, err := vm.ToValue(true)
    145 145   if err != nil {
    146 146   return otto.Value{}
    147 147   }
    skipped 304 lines
  • ■ ■ ■ ■ ■ ■
    execution/clean.go
    skipped 494 lines
    495 495   }
    496 496  }
    497 497   
     498 +// CleanFFUFJson get to get formatted report
     499 +func CleanFFUFJson(filename string, dest string) {
     500 + content := utils.ReadingLines(filename)
     501 + if len(content) <= 0 {
     502 + utils.WarnF("File not found: %s", filename)
     503 + return
     504 + }
     505 + 
     506 + var results []string
     507 + for _, line := range content {
     508 + jsonParsed, err := gabs.ParseJSON([]byte(line))
     509 + if err != nil {
     510 + continue
     511 + }
     512 + 
     513 + resultsJson := jsonParsed.S("results")
     514 + if resultsJson == nil {
     515 + continue
     516 + }
     517 + 
     518 + for _, item := range resultsJson.Children() {
     519 + //.url,.status,.length,.words,.lines,.redirectlocation
     520 + endpoint := cast.ToString(item.S("url").Data())
     521 + status := cast.ToString(item.S("status").Data())
     522 + length := cast.ToString(item.S("length").Data())
     523 + words := cast.ToString(item.S("words").Data())
     524 + lines := cast.ToString(item.S("lines").Data())
     525 + redirectLocation := cast.ToString(item.S("redirectlocation").Data())
     526 + 
     527 + data := fmt.Sprintf("%s,%s,%s,%s,%s,%s", endpoint, status, length, words, lines, redirectLocation)
     528 + results = append(results, data)
     529 + }
     530 + }
     531 + 
     532 + if len(results) > 0 {
     533 + utils.WriteToFile(dest, strings.Join(results, "\n"))
     534 + }
     535 +}
     536 + 
Please wait...
Page is in error, reload to recover