Some shit.

This commit is contained in:
2025-01-01 16:46:38 +02:00
parent 5726dabf09
commit 98b37597e0

View File

@@ -68,41 +68,73 @@ function curlRequest {
if [[ "$DEBUG" == "off" ]]; then
response="$(curl_ff117 -s -L \
-c "$GRPOPPRO_COOKIE_FILE" \
-b "$GRPOPPRO_COOKIE_FILE" \
"$url" \
--compressed \
-X "$custom_method" \
-A "$USER_AGENT" \
-H "$custom_accept" \
-H "$ACCEPT_LANGUAGE" \
-H "$CONNECTION" \
-H "$UP_IN_REQ" \
"$@"
)"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
response="$(curl_ff117 -s -L \
-c"$GRPOPPRO_COOKIE_FILE" \
-b"$GRPOPPRO_COOKIE_FILE" \
"$url" \
--compressed \
-X "$custom_method" \
-A "$USER_AGENT" \
-H "$custom_accept" \
-H "$ACCEPT_LANGUAGE" \
-H "$CONNECTION" \
-H "$UP_IN_REQ" \
"$@"
)"
else
response="$(curl -s -L \
-c "$GRPOPPRO_COOKIE_FILE" \
-b "$GRPOPPRO_COOKIE_FILE" \
"$url" \
--compressed \
-X "$custom_method" \
-A "$USER_AGENT" \
-H "$custom_accept" \
-H "$ACCEPT_LANGUAGE" \
-H "$CONNECTION" \
-H "$UP_IN_REQ" \
"$@"
)"
fi
else
if [[ "$OSTYPE" == "linux-gnu" ]]; then
LOG_FILE="/tmp/grpoppro_curl_commands.log"
local curl_command=(
"curl_ff117"
"-s"
"-L"
"-c$GRPOPPRO_COOKIE_FILE"
"-b$GRPOPPRO_COOKIE_FILE"
"$url"
"-X"
"$custom_method"
"-H $custom_accept"
"$@"
)
else
LOG_FILE="$GRPOPPRO_DATA_DIR/grpoppro_curl_commands.log"
local curl_command=(
"curl"
"-s"
"-L"
"-c $GRPOPPRO_COOKIE_FILE"
"-b $GRPOPPRO_COOKIE_FILE"
"$url"
"--compressed"
"-X"
"$custom_method"
"-A $USER_AGENT"
"-H $custom_accept"
"-H $ACCEPT_LANGUAGE"
"-H $CONNECTION"
"-H $UP_IN_REQ"
"$@"
)
fi
local curl_command=(
"curl_ff117"
"-s"
"-L"
"-c$GRPOPPRO_COOKIE_FILE"
"-b$GRPOPPRO_COOKIE_FILE"
"$url"
"-X"
"$custom_method"
"-H $custom_accept"
"$@"
)
{
echo -e "<===========================\n"
echo "Called by: ${FUNCNAME[1]}"