feat: add network-tools

This commit is contained in:
hophacker 2022-04-30 11:30:15 +08:00 committed by hophacker
parent b273cdb62e
commit 4cf8950556
2 changed files with 5 additions and 1 deletions

View File

@ -95,7 +95,6 @@ function strip_color() {
function docker_rm_all() {
docker rm -f `docker ps --no-trunc -aq`
}
alias ag="ag --hidden"
# Replace replaces non-regex pattern recursively
# Example: Replace 'ctx.Status(400)' "ctx.Status(http.StatusBadRequest)"
function Replace () {

5
zsh/network-tools.zsh Normal file
View File

@ -0,0 +1,5 @@
alias intercept_request_hosts="sudo tcpdump -i any -A -vv -s 0 | grep -e 'Host:'"
test_port() {
nc -z localhost $1
}