Skip to content

Commit

Permalink
Merge pull request #99 from cdk-team/neargle-dev
Browse files Browse the repository at this point in the history
Feat(tool): add netstat,Like "netstat -antup" command.
  • Loading branch information
neargle authored May 19, 2024
2 parents a1578d5 + aafe2a4 commit 306f3ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ cdk ps
|---|---|---|---|
|nc|TCP Tunnel||[link](https://github.com/cdk-team/CDK/wiki/Tool:-nc)|
|ps|Process Information||[link](https://github.com/cdk-team/CDK/wiki/Tool:-ps)|
|netstat|Like "netstat -antup" command|||
|ifconfig|Network Information||[link](https://github.com/cdk-team/CDK/wiki/Tool:-ifconfig)|
|vi|Edit Files||[link](https://github.com/cdk-team/CDK/wiki/Tool:-vi)|
|ectl|Unauthorized enumeration of ectd keys|||
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var BannerContainerTpl = BannerHeader + `
%s
vi <file> Edit files in container like "vi" command.
ps Show process information like "ps -ef" command.
netstat Like "netstat -antup" command.
nc [options] Create TCP tunnel.
ifconfig Show network information.
kcurl <path> (get|post) <uri> [<data>] Make request to K8s api-server.
Expand Down
2 changes: 2 additions & 0 deletions pkg/tool/kubectl/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"os"
"regexp"
"strings"
"time"

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

0 comments on commit 306f3ce

Please sign in to comment.