clean up uplink
This commit is contained in:
parent
70b1446169
commit
461781e29c
3 changed files with 6 additions and 9 deletions
1
bin/random
Executable file
1
bin/random
Executable file
|
@ -0,0 +1 @@
|
||||||
|
sed "s/[^a-zA-Z0-9]//g" <<< $(openssl rand -base64 17)
|
12
bin/uplink
12
bin/uplink
|
@ -2,13 +2,9 @@
|
||||||
|
|
||||||
readonly remotePath='/data/coolify/applications/e0c4g84wsgk8ww48o804c0s4/files/i'
|
readonly remotePath='/data/coolify/applications/e0c4g84wsgk8ww48o804c0s4/files/i'
|
||||||
|
|
||||||
function upload_file_and_notify() {
|
|
||||||
rsync --archive --compress --progress --partial $target implant:$remotePath && notify-send "uplink: file uploaded: $target"; echo "https://pogge.rs/i/$filename" | xclip -selection clipboard || notify-send "uplink: error uploading file: $target"
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdir -p "$SCREENSHOT_FOLDER"
|
mkdir -p "$SCREENSHOT_FOLDER"
|
||||||
date_str=$(date +'%Y-%m-%d-%H_%M_%S')
|
|
||||||
filename="uplink-$date_str.png"
|
filename="$(random).png"
|
||||||
target="$SCREENSHOT_FOLDER/$filename"
|
target="$SCREENSHOT_FOLDER/$filename"
|
||||||
|
|
||||||
# This takes the screenshot :>
|
# This takes the screenshot :>
|
||||||
|
@ -16,7 +12,7 @@ spectacle -rb -o $target
|
||||||
|
|
||||||
if [ -s "$target" ]; then
|
if [ -s "$target" ]; then
|
||||||
notify-send "uplink: sending: $target"
|
notify-send "uplink: sending: $target"
|
||||||
upload_file_and_notify "$target"
|
rsync --archive --compress --progress --partial $target implant:$remotePath && notify-send "uplink: file uploaded: $target"; echo "https://pogge.rs/i/$filename" | xclip -selection clipboard || notify-send "uplink: error uploading file: $target"
|
||||||
else
|
else
|
||||||
notify-send "screenshot aborted, skipping sending"
|
notify-send "screenshot aborted, skipping sending"
|
||||||
f
|
fi
|
2
home
2
home
|
@ -1 +1 @@
|
||||||
Subproject commit 9dfa387b28a7acf4154c050f44c8b2af8e44f5e0
|
Subproject commit 7d799457cdb221d7d9ec5569707d19df4f23b95b
|
Loading…
Add table
Reference in a new issue