63 lines
1.6 KiB
Bash
Executable File
63 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
while read kos
|
|
do
|
|
[ "${#kos}" -le "1" ]&&break;
|
|
koss="$kos
|
|
$koss"
|
|
done
|
|
[ "$conntyp" = "POST" ]&&{
|
|
zj=$(echo "$koss"|awk '{IGNORECASE=1}/Content-Length:/{gsub("\r","",$2);print$2}')
|
|
[ "${zj:-88}" != "32" ]&&exit 0
|
|
read -N$zj hhhkkkk
|
|
|
|
ckuser=$(echo "$koss"|awk -F\| '{IGNORECASE=1}/Cookie:.*session=/{print $2}')
|
|
cksec=$(echo "$koss"|awk -F\| '{IGNORECASE=1}/Cookie:.*session=/{print $3}')
|
|
uspa=$(awk -F\| '$1=='\"${ckuser:-jjhjhj}\"'{printf $1$2 }' ${datapath}user)
|
|
yunse=$(echo -n "$uspa${dateddd:0:6}"|md5sum|tr -dc [0-9])
|
|
|
|
[ "$yunse" = "$cksec" ]||{
|
|
echo "HTTP/1.1 200 ok
|
|
Connection: close
|
|
Pragma: no-cache
|
|
Cache-Control: no-cache
|
|
Cache-Control: no-store
|
|
Cache-Control: private
|
|
Server: kos-1.0
|
|
Access-Control-Expose-Headers: ztm
|
|
ztm: noes
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/plain;charset=utf-8
|
|
"
|
|
exit 0
|
|
}
|
|
|
|
sqlstart="SELECT trade_status FROM kos.paylist WHERE out_trade_no = '$hhhkkkk'"
|
|
dada="$($MYSQLS -e "$sqlstart" 2>>/koss/data/qazxsw)"
|
|
|
|
[ "$dada" ]&&{
|
|
echo "HTTP/1.1 200 ok
|
|
Connection: close
|
|
Pragma: no-cache
|
|
Cache-Control: no-cache
|
|
Cache-Control: no-store
|
|
Cache-Control: private
|
|
Server: kos-1.0
|
|
Access-Control-Expose-Headers: ztm
|
|
ztm: $dada
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/plain;charset=utf-8
|
|
"
|
|
}||echo "HTTP/1.1 200 ok
|
|
Connection: close
|
|
Pragma: no-cache
|
|
Cache-Control: no-cache
|
|
Cache-Control: no-store
|
|
Cache-Control: private
|
|
Server: kos-1.0
|
|
Access-Control-Expose-Headers: ztm
|
|
ztm: ${ztm:-wait}
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/plain;charset=utf-8
|
|
|
|
订单号未查询到!"
|
|
} |