-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathgetlog
executable file
·36 lines (32 loc) · 1.31 KB
/
getlog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
################################################################################
# SALT - [S]teadfasterX [A]ll-in-one [L]G [T]ool
#
# Copyright (C): 2017-2023, steadfasterX <steadfastX|boun.cr>
#
# Log upload wrapper for SALT
#
################################################################################
VARS="${0%/*}/salt.vars"
source $VARS
FUNCS="${0%/*}/salt.func"
source $FUNCS
F_LOG "getlog script started"
cat $LOG | $FYAD --title="$YTITLE - DEBUGLOG" --width=1000 --height=800 --wrap --text-info --button="Upload/Paste this log":99 --button=Close:0
if [ $? -eq 99 ];then
for pastes in haste ix transfer; do
PASTEURL=$($APASTE -s -p $pastes $LOG | grep Link)
PASTEURL=${PASTEURL/Link: /}
echo "${PASTEURL}" | grep -q http
PASTEERR=$?
if [ $PASTEERR -eq 0 ];then
$FYAD --title="$YTITLE - DEBUGLOG" --width=800 --height=350 --image="$SICONS/ok_64x64.png" --text "\n\nLog uploaded successfully!\n\n" \
--form --columns=2 \
--field=" Copy the following Paste service link for sharing it":TXT "\n ${PASTEURL}"\
--button=Close
break
else
F_MSGE 800 "Error in module '$pastes' $PASTEURL while uploading logfile..\nClick EXIT for trying next paste service...\n\n"
fi
done
fi