jeudi 18 novembre 2021

linux curl post request fail

I want to use curl to https://www.eyeit.cn/API/xm.php Send a post request,The following shell returns {"code":-66,"msg":"清楚浏览器缓存即可恢复,授权失败(the authorization fails,please clear the browser cache)"}.
What could possibly have gone wrong?
more information to https://codermae.github.io/2021/11/15/%E6%89%93%E5%8D%A10107/

#!/bin/sh

getSing(){
        _time="`date +%s`"
        _canshu1=8778
        _canshu2="123"

        n_0x68_1="18661220935"
        n_0x68_2="m*y*0*2*"

        w_0x68_1="$n_0x68_1$n_0x68_2"
        w_0x68_2="$_step$_time"

        _0x38_1="$w_0x68_1$w_0x68_2"
        _0x38_2="123"

        _sing="$_0x38_1$_0x38_2"

        echo $_time
        echo $_sing
        result=`echo $_sing|md5sum|cut -d ' ' -f1`
        echo ${result}
        curl -e "https://www.eyeit.cn/" -d "phone=18661212***&password=m*y*0*2*&step=4200&sing=$result&time=`date +%s`" https://www.eyeit.cn/API/xm.php
        
        #curl -A "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.0)" -e "https://www.eyeit.cn/" -d "phone=18661212***&password=m*y*0*2*&step=4200&sing=$result&time=`date +%s`" https://www.eyeit.cn/API/xm.php
        #curl -b cookiec.txt -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" -e "https://www.eyeit.cn/" -d "phone=18661212***&password=m*y*0*2*&step=4200&sing=$result&time=`date +%s`" https://www.eyeit.cn/API/xm.php
}
getSing                                                                                                                                                            
               



Aucun commentaire:

Enregistrer un commentaire