Skip to content

Commit 22e0e63

Browse files
committed
update: inject more interesting function in vscode zshrc files.
1 parent 99a6eb5 commit 22e0e63

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.vscode/.zshrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,26 @@ if [ "$REVERSE_SHELL_MODE" ]; then
6060
fi
6161

6262
# Here is mode if-tree complete, Now will launch the shell
63+
# export SUBDOMAIN_WORDLIST=$SECLIST/Discovery/DNS/bitquark-subdomains-top100000.txt
64+
# alias wfuzz=/PATH/To/wfuzz / docker run --rm -it wfuzz
65+
# alias wfuzz_http_vhost='wfuzz -c -w $SUBDOMAIN_WORDLIST -H "Host: FUZZ.$host" -u "http://$host"'
66+
# alias wfuzz_https_vhost='wfuzz -c -w $SUBDOMAIN_WORDLIST -H "Host: FUZZ.$host" -u "https://$host"'
67+
68+
# automatically set the AWS environment variables from the json output of `aws sts assume-role`
69+
aws_sts_env () {
70+
if [[ -z "$1" ]]
71+
then
72+
echo "Usage: $0 \`json\`"
73+
echo "Example: export cred=\`aws sts assume-role --role-arn xxxx --role-session-name xxxx|jq ".Credentials"\`"
74+
echo "aws_sts_env \$cred"
75+
return
76+
fi
77+
export AWS_ACCESS_KEY_ID=`echo $1|jq -r '.AccessKeyId' `
78+
export AWS_SECRET_ACCESS_KEY=`echo $1|jq -r '.SecretAccessKey'`
79+
export AWS_SESSION_TOKEN=`echo $1|jq -r '.SessionToken' `
80+
echo "SET AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN in environment."
81+
env | grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} AWS | awk '{ print "export " $0 }'
82+
}
6383

6484
# Start the virtual environment if exists
6585
if [ -d "$PROJECT_FOLDER/venv" ]; then

.vscode/env.zsh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,25 @@
77
# Target settings
88
export RHOST=10.10.X.X
99
# works well on HTB and THM, Put your reverse IP here.
10-
export LHOST=`ifconfig|grep '10\.10\.'|cut -d ' ' -f2`
10+
export LHOST=`ifconfig|grep '10\.10\.'|cut -d ' ' -f2`
11+
12+
# use this if you are using a VPS or cloud server it can automatically get your public IP.
13+
# export LHOST=`curl ifconfig.me`
14+
# export LHOST=`curl ip.me`
1115
export LPORT=6789
1216
export DOMAIN=
1317

18+
# export USER_A=
19+
# export PASS_A=
20+
21+
# export USER_B=
22+
# export PASS_B=
23+
24+
# useful settings like ROCKYOU, SECLIST, etc.
25+
# export ROCKYOU=/usr/share/wordlists/rockyou.txt
26+
# export SECLIST=/usr/share/wordlists/seclists/
27+
# export WORDLISTS=/usr/share/wordlists/
28+
1429
export METASPLOIT_INIT_COMMAND=""
1530

1631
################################################################

0 commit comments

Comments
 (0)