-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Setup local dir with LHOST and RHOST | ||
|
||
if ! ifconfig tun0 &> /dev/null; then | ||
echo "ERROR: Please connect to the VPN" | ||
exit 1 | ||
fi | ||
|
||
if [ -f ".envrc" ]; then | ||
rm .envrc | ||
fi | ||
touch .envrc | ||
|
||
LHOST=$(ifconfig tun0 | grep 'inet ' | awk '{print $2}') | ||
echo "export LHOST=$LHOST" >> .envrc | ||
|
||
read -p "Enter last two octals of the remote IP address: " REMOTE_IP | ||
echo "export RHOST=192.168.$REMOTE_IP" >> .envrc | ||
|
||
direnv allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters