Skip to content

Commit

Permalink
remove persistent flag from client job commands and update variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
TimBF committed Jun 5, 2023
1 parent 43eb9e3 commit 126dcf7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
3 changes: 1 addition & 2 deletions client/command/jobs/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ func DNSListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
Host: lhost,
Port: uint32(lport),
Canaries: !ctx.Flags.Bool("no-canaries"),
Persistent: ctx.Flags.Bool("persistent"),
EnforceOTP: !ctx.Flags.Bool("disable-otp"),
})
con.Println()
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Successfully started job #%d\n", dns.JobID)
con.PrintInfof("Successfully started job #%d\n", dns.ID)
}
}
5 changes: 2 additions & 3 deletions client/command/jobs/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,20 @@ func HTTPListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
return
}

con.PrintInfof("Starting HTTP %s:%d listener ...\n", domain, lport)
con.PrintInfof("Starting HTTP %d listener ...\n", lport)
http, err := con.Rpc.StartHTTPListener(context.Background(), &clientpb.HTTPListenerReq{
Domain: domain,
Website: ctx.Flags.String("website"),
Host: lhost,
Port: uint32(lport),
Secure: false,
Persistent: ctx.Flags.Bool("persistent"),
EnforceOTP: !disableOTP,
LongPollTimeout: int64(longPollTimeout),
LongPollJitter: int64(longPollJitter),
})
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Successfully started job #%d\n", http.JobID)
con.PrintInfof("Successfully started job #%d\n", http.ID)
}
}
5 changes: 2 additions & 3 deletions client/command/jobs/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func HTTPSListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
return
}

con.PrintInfof("Starting HTTPS %s:%d listener ...\n", domain, lport)
con.PrintInfof("Starting HTTPS %d listener ...\n", lport)
https, err := con.Rpc.StartHTTPSListener(context.Background(), &clientpb.HTTPListenerReq{
Domain: domain,
Website: website,
Expand All @@ -64,7 +64,6 @@ func HTTPSListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
Cert: cert,
Key: key,
ACME: ctx.Flags.Bool("lets-encrypt"),
Persistent: ctx.Flags.Bool("persistent"),
EnforceOTP: !disableOTP,
LongPollTimeout: int64(longPollTimeout),
LongPollJitter: int64(longPollJitter),
Expand All @@ -74,7 +73,7 @@ func HTTPSListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Successfully started job #%d\n", https.JobID)
con.PrintInfof("Successfully started job #%d\n", https.ID)
}
}

Expand Down
7 changes: 3 additions & 4 deletions client/command/jobs/mtls.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ func MTLSListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {

con.PrintInfof("Starting mTLS listener ...\n")
mtls, err := con.Rpc.StartMTLSListener(context.Background(), &clientpb.MTLSListenerReq{
Host: lhost,
Port: uint32(lport),
Persistent: ctx.Flags.Bool("persistent"),
Host: lhost,
Port: uint32(lport),
})
con.Println()
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Successfully started job #%d\n", mtls.JobID)
con.PrintInfof("Successfully started job #%d\n", mtls.ID)
}
}
9 changes: 4 additions & 5 deletions client/command/jobs/wg.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ func WGListenerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {

con.PrintInfof("Starting Wireguard listener ...\n")
wg, err := con.Rpc.StartWGListener(context.Background(), &clientpb.WGListenerReq{
Port: uint32(lport),
NPort: uint32(nport),
KeyPort: uint32(keyExchangePort),
Persistent: ctx.Flags.Bool("persistent"),
Port: uint32(lport),
NPort: uint32(nport),
KeyPort: uint32(keyExchangePort),
})
if err != nil {
con.PrintErrorf("%s\n", err)
} else {
con.PrintInfof("Successfully started job #%d\n", wg.JobID)
con.PrintInfof("Successfully started job #%d\n", wg.ID)
}
}

0 comments on commit 126dcf7

Please sign in to comment.