Skip to content

Commit 306f3ce

Browse files
authored
Merge pull request #99 from cdk-team/neargle-dev
Feat(tool): add netstat,Like "netstat -antup" command.
2 parents a1578d5 + aafe2a4 commit 306f3ce

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ cdk ps
183183
|---|---|---|---|
184184
|nc|TCP Tunnel||[link](https://github.com/cdk-team/CDK/wiki/Tool:-nc)|
185185
|ps|Process Information||[link](https://github.com/cdk-team/CDK/wiki/Tool:-ps)|
186+
|netstat|Like "netstat -antup" command|||
186187
|ifconfig|Network Information||[link](https://github.com/cdk-team/CDK/wiki/Tool:-ifconfig)|
187188
|vi|Edit Files||[link](https://github.com/cdk-team/CDK/wiki/Tool:-vi)|
188189
|ectl|Unauthorized enumeration of ectd keys|||

pkg/cli/banner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var BannerContainerTpl = BannerHeader + `
5959
%s
6060
vi <file> Edit files in container like "vi" command.
6161
ps Show process information like "ps -ef" command.
62+
netstat Like "netstat -antup" command.
6263
nc [options] Create TCP tunnel.
6364
ifconfig Show network information.
6465
kcurl <path> (get|post) <uri> [<data>] Make request to K8s api-server.

pkg/tool/kubectl/common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"os"
2727
"regexp"
2828
"strings"
29+
"time"
2930

3031
"github.com/cdk-team/CDK/conf"
3132
"github.com/cdk-team/CDK/pkg/errors"
@@ -139,6 +140,7 @@ func ServerAccountRequest(opts K8sRequestOption) (string, error) {
139140
Transport: &http.Transport{
140141
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
141142
},
143+
Timeout: time.Second * 3,
142144
}
143145
var request *http.Request
144146
opts.Method = strings.ToUpper(opts.Method)

0 commit comments

Comments
 (0)