Originally always use Restclient-ui tool, is the graphical interface, the operation is very troublesome. Want to use Shell script batch call to execute use case, so find Restclient tool has no command line, the Internet search, sure enough. The download address is: Http://code.fosshub.com/WizToolsorg-RESTClient/downloads.
How to call it. Search for a moment, the original to do so, if the installation of Java.
Java-jar restclient-cli-3.1-jar-with-dependencies.jar-o $rcs _dir $rcq _file
(where $rcs_dir is the response file. RCS storage path, $rcq _file is the request file. rcq file. Request file. Rcq can be generated from the UI tool. )
The tool can be executed, and the use case script needs to view the response message. Find the. rcs file from just the response directory, find the response message structure, and find that there is a string of encrypted text between <body>. To decrypt.
What algorithm is used to encrypt it. To see the source Ah, ready to download the source to see how to encrypt, modify the source code to fix. Fortunately, the communication with colleagues, is not using what tools to encrypt. The discovery is indeed, is through the Base64 tool encryption. Then use Linux with the tool base64 decryption can be.
echo "$encrypted _body" | Base64-d
The decryption result can be obtained as above command.
The key point is already good, use the script to string up these points, fix.