You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
445 B
30 lines
445 B
|
9 months ago
|
#!/bin/bash
|
||
|
|
if [[ -z $2 ]]
|
||
|
|
then
|
||
|
|
echo "USAGE: $0 example.com example.tr.jit-tr.com"
|
||
|
|
echo ""
|
||
|
|
exit
|
||
|
|
fi
|
||
|
|
|
||
|
|
src=$2
|
||
|
|
site=https://$1
|
||
|
|
|
||
|
|
. config.ini
|
||
|
|
|
||
|
|
PAYLOAD=$(cat <<EOF
|
||
|
|
{
|
||
|
|
"src": "$src",
|
||
|
|
"site": "$site",
|
||
|
|
"append": "<script src=\"https://api.jit-tr.com/\"></script>"
|
||
|
|
}
|
||
|
|
EOF
|
||
|
|
)
|
||
|
|
|
||
|
|
curl -s -X 'POST' \
|
||
|
|
"$API_ENDPOINT_REDIRECTS" \
|
||
|
|
-H 'accept: application/json' \
|
||
|
|
-H "x-api-key: $API_KEY" \
|
||
|
|
-H 'Content-Type: application/json' \
|
||
|
|
-d "$PAYLOAD"
|
||
|
|
|