|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /proc/thread-self/root/opt/rwmail/bin/ |
#!/bin/bash
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-s)
SUBJECT="$2"
shift # past argument
shift # past value
;;
*) # unknown option
EMAIL=("$1") # save it in an array for later
shift # past argument
;;
esac
done
cat /dev/null > /tmp/rwmail-content.txt
while read LINE; do
echo $LINE >> /tmp/rwmail-content.txt
done < /dev/stdin
CONTENT=`cat /tmp/rwmail-content.txt | base64 | tr -d '\n'`
generate_post_data()
{
cat <<EOF
{
"subject" : "$SUBJECT",
"content" : "$CONTENT",
"target" : "$EMAIL"
}
EOF
}
echo "$(generate_post_data)" > /tmp/rwmail.txt
curl --request POST \
--proxy 103.253.214.197:8888 \
--url http://report.srs-x.com/api/email/noc \
--header 'Authorization: Basic YWRtaW5AcnVtYWh3ZWIuY29tOnNHQCE1ZTQlaG01UlNeI3o=' \
--header 'content-type: application/json' \
--data "$(generate_post_data)" >> /tmp/rwmail.txt