57 lines
1.4 KiB
Bash
Executable File
57 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
while read kos
|
|
do
|
|
[ "${#kos}" -le "1" ]&&break;
|
|
koss="$kos
|
|
$koss"
|
|
done
|
|
|
|
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
|
|
|
|
noes"
|
|
exit 0
|
|
}
|
|
|
|
sqlstart="SELECT id,uukey,yuhost,wxid,zfbid,yuname,kftime FROM kos.sfzf WHERE sfzf.ckuser = '${ckuser:-qazxsw90909mjh}'"
|
|
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: okay
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/plain;charset=utf-8
|
|
|
|
$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: okey
|
|
Content-Language:zh-CN,zh
|
|
Content-Type: text/plain;charset=utf-8
|
|
" |