Skip to content

Instantly share code, notes, and snippets.

@rohan-molloy
Created April 12, 2017 11:44
Show Gist options
  • Save rohan-molloy/458b225cefa76a014d27f0e40e7b5eb3 to your computer and use it in GitHub Desktop.
Save rohan-molloy/458b225cefa76a014d27f0e40e7b5eb3 to your computer and use it in GitHub Desktop.
#!/bin/sh
RESPONSE=`curl -s -X GET http://hi.link/api/webserver/SesTokInfo`
COOKIE=`echo "$RESPONSE"| grep SessionID=| cut -b 10-147`
TOKEN=`echo "$RESPONSE"| grep TokInfo| cut -b 10-41`
DATA="<request><PageIndex>1</PageIndex><ReadCount>3</ReadCount><BoxType>1</BoxType><SortType>0</SortType><Ascending>0</Ascending><UnreadPreferred>1</UnreadPreferred></request>"
curl -b $COOKIE -c $COOKIE -H "X-Requested-With: XMLHttpRequest" --data "$DATA" http://hi.link/api/sms/sms-list --header "__RequestVerificationToken: $TOKEN" --header "Content-Type:text/xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment