Projects STRLCPY metabigor Commits 4bec4c2b
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    core/common.go
    skipped 18 lines
    19 19  func InitLog(options Options) {
    20 20   logDir := options.Scan.TmpOutput
    21 21   if logDir == "" {
    22  - logDir = path.Join(os.TempDir(), "mtg-log")
     22 + options.Scan.TmpOutput = path.Join(os.TempDir(), "mtg-log")
    23 23   }
    24  - if !FolderExists(logDir) {
    25  - os.MkdirAll(logDir, 0755)
     24 + 
     25 + if !FolderExists(options.Scan.TmpOutput) {
     26 + os.MkdirAll(options.Scan.TmpOutput, 0755)
    26 27   }
    27  - options.LogFile = path.Join(logDir, "metabigor.log")
     28 + options.LogFile = path.Join(options.Scan.TmpOutput, "metabigor.log")
    28 29   f, err := os.OpenFile(options.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
    29 30   if err != nil {
    30 31   logger.Error("error opening file: %v", err)
    skipped 60 lines
  • ■ ■ ■ ■ ■
    modules/scan.go
    skipped 2 lines
    3 3  import (
    4 4   "fmt"
    5 5   "io/ioutil"
    6  - "os"
    7 6   "os/exec"
    8 7   "regexp"
    9 8   "strings"
    skipped 11 lines
    21 20   }
    22 21   
    23 22   massOutput := options.Scan.TmpOutput
    24  - tmpFile, _ := ioutil.TempFile(os.TempDir(), "masscan-*.txt")
     23 + tmpFile, _ := ioutil.TempFile(options.Scan.TmpOutput, "masscan-*.txt")
    25 24   if massOutput != "" {
    26 25   tmpFile, _ = ioutil.TempFile(massOutput, fmt.Sprintf("masscan-%v-*.txt", core.StripPath(input)))
    27 26   }
    skipped 44 lines
    72 71   ports = "443"
    73 72   }
    74 73   nmapOutput := options.Scan.TmpOutput
    75  - tmpFile, _ := ioutil.TempFile(os.TempDir(), "nmap-*")
     74 + tmpFile, _ := ioutil.TempFile(options.Scan.TmpOutput, "nmap-*")
    76 75   if nmapOutput != "" {
    77 76   tmpFile, _ = ioutil.TempFile(nmapOutput, fmt.Sprintf("nmap-%v-*", core.StripPath(input)))
    78 77   }
    skipped 126 lines
Please wait...
Page is in error, reload to recover