Projects STRLCPY reverse_ssh Commits ad46ba4f
🤬
  • Add ability to bake in proxy address

  • Loading...
  • NHAS committed 11 months ago
    ad46ba4f
    1 parent 059f239d
  • ■ ■ ■ ■ ■ ■
    cmd/client/main.go
    skipped 42 lines
    43 43  var (
    44 44   destination string
    45 45   fingerprint string
     46 + proxy string
    46 47   ignoreInput string
    47 48  )
    48 49   
    skipped 9 lines
    58 59  func main() {
    59 60   
    60 61   if len(os.Args) == 0 || ignoreInput == "true" {
    61  - Run(destination, fingerprint, "")
     62 + Run(destination, fingerprint, proxy)
    62 63   return
    63 64   }
    64 65   
    skipped 19 lines
    84 85   fg := line.IsSet("foreground")
    85 86   
    86 87   proxyaddress, _ := line.GetArgString("proxy")
     88 + if len(proxyaddress) > 0 {
     89 + proxy = proxyaddress
     90 + }
    87 91   
    88 92   userSpecifiedFingerprint, err := line.GetArgString("fingerprint")
    89 93   if err == nil {
    skipped 23 lines
    113 117   }
    114 118   
    115 119   if fg || child {
    116  - Run(destination, fingerprint, proxyaddress)
     120 + Run(destination, fingerprint, proxy)
    117 121   return
    118 122   }
    119 123   
    120  - err = Fork(destination, fingerprint, proxyaddress, processArgv...)
     124 + err = Fork(destination, fingerprint, proxy, processArgv...)
    121 125   if err != nil {
    122  - Run(destination, fingerprint, proxyaddress)
     126 + Run(destination, fingerprint, proxy)
    123 127   }
    124 128   
    125 129  }
    skipped 1 lines
Please wait...
Page is in error, reload to recover