Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- APIKEY='your-psp-api-key'
- KEYFILE='private-key-file.pem'
- REQ=$(curl -s http://dyndns.powerserverplus.net/${APIKEY}/update-request)
- echo ${REQ}
- REQUEST_ID=$(echo ${REQ} | sed -r 's/^.*"id":([0-9]+).*$/\1/')
- MESSAGE="request=${REQUEST_ID}"
- SIGNATURE=$(echo -n "${MESSAGE}" | openssl rsautl -inkey ${KEYFILE} -sign | base64 -w 0 | sed 's/+/%2B/g')
- UPDATE=$(curl -s http://dyndns.powerserverplus.net/${APIKEY}/update -d "${MESSAGE}&signature=${SIGNATURE}")
- echo ${UPDATE}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement