Created
April 12, 2017 11:44
-
-
Save rohan-molloy/458b225cefa76a014d27f0e40e7b5eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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