-
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
shump
committed
Apr 11, 2024
1 parent
9153175
commit 625822c
Showing
6 changed files
with
152 additions
and
82 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
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 +1,3 @@ | ||
paramiko>=2.10.1 | ||
requests | ||
markdown | ||
tkhtmlview |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
ORIGINAL_ICON="shellar.png" | ||
ICONSET_FOLDER="shellar.iconset" | ||
mkdir -p $ICONSET_FOLDER | ||
|
||
sips -Z 16 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_16x16.png | ||
sips -Z 32 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_32x32.png | ||
sips -Z 64 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_64x64.png | ||
sips -Z 128 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_128x128.png | ||
sips -Z 256 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_256x256.png | ||
sips -Z 512 $ORIGINAL_ICON --out $ICONSET_FOLDER/icon_512x512.png | ||
|
||
sips -Z 32 $ORIGINAL_ICON --out $ICONSET_FOLDER/[email protected] | ||
sips -Z 64 $ORIGINAL_ICON --out $ICONSET_FOLDER/[email protected] | ||
sips -Z 256 $ORIGINAL_ICON --out $ICONSET_FOLDER/[email protected] | ||
sips -Z 512 $ORIGINAL_ICON --out $ICONSET_FOLDER/[email protected] | ||
sips -Z 1024 $ORIGINAL_ICON --out $ICONSET_FOLDER/[email protected] | ||
|
||
iconutil -c icns $ICONSET_FOLDER | ||
|
||
rm -r $ICONSET_FOLDER |
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,3 +1,4 @@ | ||
#!/bin/bash | ||
date=$(date -u +"%Y%d%m%H%M") | ||
pyinstaller --name="shellar.io" --onefile --windowed --distpath="~/build/shellar.io.v$date/dist" --icon="../graSSHopper/icons/shellar.icns" main.py | ||
source venv/bin/activate | ||
pyinstaller --name="shellar" --onefile --windowed --hidden-import=requests --hidden-import=markdown --hidden-import=tkhtmlview --distpath="~/build/shellar.io.v$date/dist" --icon="../graSSHopper/icons/shellar.icns" main.py |
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,35 @@ | ||
#!/bin/bash | ||
clear | ||
setup_success=true | ||
|
||
if [ ! -f ~/.ssh/id_rsa ]; then | ||
echo "No SSH key found. Generating a new one..." | ||
if ! command -v ssh-keygen &> /dev/null; then | ||
echo "ssh-keygen not found. Please install it using your package manager." | ||
setup_success=false | ||
else | ||
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" | ||
fi | ||
fi | ||
|
||
if [ "$setup_success" = true ]; then | ||
echo "Trying to authenticate with the server using the SSH key..." | ||
ssh -o BatchMode=yes -o StrictHostKeyChecking=no "$1@$2" exit | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Authentication failed. Attempting to copy SSH key to the server..." | ||
if ! command -v ssh-copy-id &> /dev/null; then | ||
echo "ssh-copy-id not found. Please install it using your package manager." | ||
setup_success=false | ||
else | ||
ssh-copy-id "$1@$2" | ||
fi | ||
fi | ||
fi | ||
|
||
if [ "$setup_success" = true ]; then | ||
echo "Connecting to $2 as $1..." | ||
ssh "$1@$2" | ||
else | ||
echo "SSH setup failed. Please resolve the issues and try again." | ||
fi |