Projects STRLCPY goc2 Commits 9082967a
🤬
  • ■ ■ ■ ■ ■ ■
    cmd/goc2/goc2.go
    skipped 19 lines
    20 20  //Start RedMap
    21 21  func Start() {
    22 22   //flags
    23  - flag.BoolVar(&cliPtr, "cli", false, "run email check")
     23 + flag.BoolVar(&cliPtr, "cli", false, "start cli")
    24 24   flag.BoolVar(&webPtr, "web", false, "Start Web Server")
    25 25   flag.BoolVar(&listPtr, "list", false, "List Connected Agents")
    26  - flag.StringVar(&agentPtr, "agent", "", "Start Web Server")
     26 + flag.StringVar(&agentPtr, "agent", "", "create payload")
    27 27   flag.StringVar(&portPtr, "port", "8005", "Listen Port")
    28 28   flag.StringVar(&c2Ptr, "c2", "", "connect to c2")
    29 29   flag.Parse()
    skipped 15 lines
  • ■ ■ ■ ■ ■ ■
    pkg/cli/cli.go
    skipped 370 lines
    371 371   }
    372 372   
    373 373   for _, d := range results {
    374  - //fmt.Println(d.Output)
    375  - //fmt.Fprintln(os.Stderr, d.Output)
    376  - //updateCmdStatus(d.Cmdid, c2)
    377 374   return d.Cmdid, d.Output
    378  - //fmt.Println(d.Cmdid + ": " + d.Output)
    379  - //updateCmdStatus(d.Cmdid)
    380 375   }
    381  - 
    382  - // Print the HTTP response status.
    383  - //fmt.Println("Response status:", resp.Status)
    384  - //return "True"
    385 376   }
    386 377   return "False", "False"
    387 378   
    skipped 154 lines
  • ■ ■ ■ ■ ■
    web/server.go
    skipped 92 lines
    93 93   }
    94 94   tempFile.Write(fileBytes)
    95 95   
    96  - //jsond := map[string]interface{}{
    97  - // "file": tempFile,
    98  - //}
    99  - 
    100  - //jsondata, err := json.Marshal(jsond)
    101 96   if err != nil {
    102 97   log.Fatalln(err)
    103 98   }
    104  - //fmt.Fprintf(w, string(jsondata))
     99 + 
    105 100   fmt.Fprintf(w, tempFile.Name())
    106 101  }
    107 102   
    skipped 152 lines
    260 255   
    261 256  func apiTest(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
    262 257   w.Header().Set("Content-Type", "application/json")
    263  - //fmt.Fprintf(w, "POST request successful")
    264  - //name := r.FormValue("name")
    265  - //address := r.FormValue("address")
    266  - 
    267  - //fmt.Fprintf(w, "Name = %s\n", name)
    268  - //fmt.Fprintf(w, "Address = %s\n", address)
    269 258   json := "{\"status\": \"started\"}"
    270 259   fmt.Fprintf(w, json)
    271 260  }
    skipped 1 lines
Please wait...
Page is in error, reload to recover