From 4cf895055607d2576ef35f6699e42a450d770980 Mon Sep 17 00:00:00 2001 From: hophacker Date: Sat, 30 Apr 2022 11:30:15 +0800 Subject: [PATCH] feat: add network-tools --- zsh/functions.zsh | 1 - zsh/network-tools.zsh | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 zsh/network-tools.zsh diff --git a/zsh/functions.zsh b/zsh/functions.zsh index a808e37..c128a37 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -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 () { diff --git a/zsh/network-tools.zsh b/zsh/network-tools.zsh new file mode 100644 index 0000000..e103192 --- /dev/null +++ b/zsh/network-tools.zsh @@ -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 +}