Skip to content

Commit

Permalink
https added to curl requests
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMalhadas committed Jul 25, 2023
1 parent 19787f8 commit 37b3e71
Show file tree
Hide file tree
Showing 50 changed files with 51 additions and 50 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## Features
- Thought to work only withtin your network, no external dependencies.
- Handles ranges and lists of arguments, where GUI can only handle a single IP.
- You can send info log messages to the device.

## Requirements
- Docker (optional)
Expand Down
2 changes: 1 addition & 1 deletion addDomainToWhiteList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for ((i = 0; i < ${#pairs_array[@]}; i++)); do
current_tunnel=$(echo "$current_pair" | cut -d ' ' -f 2)

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/addToWhitelist/domain' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"domainName\":\"$current_domain\",\"tunnelCode\":\"$current_tunnel\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/addToWhitelist/domain' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"domainName\":\"$current_domain\",\"tunnelCode\":\"$current_tunnel\"}' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion addIPToBlackList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ for ((i = 0; i < total_ips; i++)); do
current_ip=$(int_to_ip "$((network_int + i))")

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/addToBlacklist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"ip\":\"$current_ip\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/addToBlacklist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"ip\":\"$current_ip\"}' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion addIPToWhiteList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ for ((i = 0; i < total_ips; i++)); do
current_ip=$(int_to_ip "$((network_int + i))")

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/addToWhitelist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"ip\":\"$current_ip\",\"tunnelCode\":\"$country_code\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/addToWhitelist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"ip\":\"$current_ip\",\"tunnelCode\":\"$country_code\"}' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion addTunnels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for ((i = 0; i < ${#regions_countries_array[@]}; i++)); do
current_country=$(echo "$current_pair" | cut -d ' ' -f 2)

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/addTunnel' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"regionCode\":\"$current_region\",\"countryCode\":\"$current_country\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/addTunnel' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"regionCode\":\"$current_region\",\"countryCode\":\"$current_country\"}' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion deeperLog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/admin/deeperLog' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"level\":\"info\",\"message\":\"$mode\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/admin/deeperLog' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '{\"level\":\"info\",\"message\":\"$mode\"}' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion deleteDomainFromWhiteList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/deleteFromWhitelist/domain' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\""${domain_list// /\",\"}"\"]' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/deleteFromWhitelist/domain' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\""${domain_list// /\",\"}"\"]' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion deleteIPFromBlackList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for ((i = 0; i < total_ips; i++)); do
current_ip=$(int_to_ip "$((network_int + i))")

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/deleteFromBlacklist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\"$current_ip\"]' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/deleteFromBlacklist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\"$current_ip\"]' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion deleteIPFromWhiteList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for ((i = 0; i < total_ips; i++)); do
current_ip=$(int_to_ip "$((network_int + i))")

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/deleteFromWhitelist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\"$current_ip\"]' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/deleteFromWhitelist/ip' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\"$current_ip\"]' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion deleteTunnels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/deleteTunnels' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\""${country_list// /\",\"}"\"]' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/deleteTunnels' -X 'POST' -H 'Authorization: $bearer_token' --data-binary '[\""${country_list// /\",\"}"\"]' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion dynamic-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/dynamic-data' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/dynamic-data' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion enableWifi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/wifi/enable' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/wifi/enable' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion get-autoupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/system-info/get-autoupdate' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/system-info/get-autoupdate' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion get-latestversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/system-info/get-latestversion' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/system-info/get-latestversion' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getDeviceID.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/admin/getDeviceId' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/admin/getDeviceId' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getDpnMode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/getDpnMode' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/getDpnMode' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getHistory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/dailyTraffic/getHistory/$days' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/dailyTraffic/getHistory/$days' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getLicenceInfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/license/getLicenseInfo' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/license/getLicenseInfo' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getMode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/sharingSecurity/getMode' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/sharingSecurity/getMode' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getNftList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/betanet/getNftList' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/betanet/getNftList' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getRoutingBlacklist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/getRoutingBlacklist/domain?pageNo=1&pageSize=10000' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/getRoutingBlacklist/domain?pageNo=1&pageSize=10000' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getRoutingWhitelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/getRoutingWhitelist/domain?pageNo=1&pageSize=10000' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/getRoutingWhitelist/domain?pageNo=1&pageSize=10000' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getSharingConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/sharing/getSharingConfig' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/sharing/getSharingConfig' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getToken.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ FwIDAQAB
encrypted_pass=$(echo -n "${password}" | openssl rsautl -encrypt -pubin -inkey <(echo "$public_key") -oaep 2> /dev/null | base64 | tr -d '\n');

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/admin/login' -X 'POST' --data-binary '{\"username\":\"$username\",\"password\":\"$encrypted_pass\"}' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/admin/login' -X 'POST' --data-binary '{\"username\":\"$username\",\"password\":\"$encrypted_pass\"}' -H 'Content-Type: application/json'"

# Print the cURL command to the console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion getTrafficLimit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/sharing/getSharingConfig' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/sharing/getSharingConfig' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion hardware-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/system-info/hardware-info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/system-info/hardware-info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion inform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/inform' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/inform' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion liquid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/liquid' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/liquid' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion listTunnels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/smartRoute/listTunnels' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/smartRoute/listTunnels' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion network-address.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/system-info/network-address' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/system-info/network-address' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion queryRequired.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/license/queryRequired' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/license/queryRequired' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion reboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/admin/reboot' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/admin/reboot' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion self-statistics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/traffic/self-statistics' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/traffic/self-statistics' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
2 changes: 1 addition & 1 deletion session-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bearer_token=$(echo "$token_output" | grep -o '"token":"Bearer[^"]*' | cut -d '"
echo "Token: $bearer_token"

# Build the cURL request command
curl_command="curl 'http://34.34.34.34/api/system-info/session-info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"
curl_command="curl -k 'https://34.34.34.34/api/system-info/session-info' -X 'GET' -H 'Authorization: $bearer_token' -H 'Content-Type: application/json'"

# Print the cURL command to console
echo "Executing cURL command: $curl_command"
Expand Down
Loading

0 comments on commit 37b3e71

Please sign in to comment.