Tero

send api cmd

Dec 30th, 2018
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. send_api_cmd() {
  2.     answer=$(curl -s -k \
  3.         --data-urlencode "user=$username" \
  4.         --data-urlencode "password=$password" \
  5.         --data-urlencode "cod=yes" \
  6.         --data-urlencode "cmd=$1" \
  7.         --data-urlencode "ab1=$2" \
  8.         --data-urlencode "cd2=$3" \
  9.         --data-urlencode "ef3=$4" \
  10.         https://$host:$port/api/)
  11.     return $answer
  12. }
Advertisement
Add Comment
Please, Sign In to add comment