function soushuupload() {
    filename="$1"
    [ "$2" ] && segsize="$2" || segsize=11451419
    # filename="bcost.rar"
    size=`ls -l "$filename" | awk '{ print $5 }'`
    # size="3265574912"
    ret=`curl "http://dl4.soushu1.com/rc_upload.php?action=super_upload&task=tk&name=$filename&type=&size=$size&modified=&93542" -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0' -H 'Accept: */*' -H 'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2' --compressed -H 'Connection: keep-alive' -H 'Referer: http://dl4.soushu1.com/index.php?action=h5upload&uid=16702&sign=91a85e9607b4470addb7197093311068' -H 'Cookie: phpdisk_zcore_v2_info=aad59WL1AkFSwVl9ThlcDowLvtT%2FPrNZavC0aFejfhq1sZOrDR9GzjGZQFSNhATdOoCyt%2F7KUtheJrxyM%2FiOuixVpdwYsP%2FJrjRS8PW25YtPSpPpekW6qhWthUIzFlEMDvbcVlo7MAz7hjee; PHPSESSID=6206a4d5781d364d47c4cb90c5cbc248'`
    token=`echo $ret | sed 's/,/\n/g' | grep "token" | sed 's/{"token":"//g;s/"//g'`
    result=`curl "http://dl4.soushu1.com/rc_upload.php?action=super_upload&task=up&token=$token&client=html5&uid=16702&folder_id=0&cate_id=0&name=$filename&size=$size&93826" -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0' -H 'Accept: */*' -H 'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2' --compressed -H 'Connection: keep-alive' -H 'Referer: http://dl4.soushu1.com/index.php?action=h5upload&uid=16702&sign=91a85e9607b4470addb7197093311068' -H 'Cookie: phpdisk_zcore_v2_info=aad59WL1AkFSwVl9ThlcDowLvtT%2FPrNZavC0aFejfhq1sZOrDR9GzjGZQFSNhATdOoCyt%2F7KUtheJrxyM%2FiOuixVpdwYsP%2FJrjRS8PW25YtPSpPpekW6qhWthUIzFlEMDvbcVlo7MAz7hjee; PHPSESSID=6206a4d5781d364d47c4cb90c5cbc248'`
    if [ `echo $result | grep -Ec [0-9]+` -gt 0 ]
    then
        pos=`echo $result | grep -Eo [0-9]+`
    fi
    echo "$filename current file posision: $pos"
    
    while [ "$pos" -lt "$size" ]
    do
        result=`head -c +$pos "$filename" | head -c $segsize | curl "http://dl4.soushu1.com/rc_upload.php?action=super_upload&task=up&token=$token&client=html5&uid=16702&folder_id=0&cate_id=0&name=$filename&size=$size" -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0' -H 'Accept: */*' -H 'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2' -H "Content-Type: text/plain" -H "Content-Range: bytes $pos-$((pos+segsize))/$size" -H 'Origin: http://dl4.soushu1.com' -H 'Connection: keep-alive' -H 'Referer: http://dl4.soushu1.com/index.php?action=h5upload&uid=16702&sign=91a85e9607b4470addb7197093311068' -H 'Cookie: phpdisk_zcore_v2_info=aad59WL1AkFSwVl9ThlcDowLvtT%2FPrNZavC0aFejfhq1sZOrDR9GzjGZQFSNhATdOoCyt%2F7KUtheJrxyM%2FiOuixVpdwYsP%2FJrjRS8PW25YtPSpPpekW6qhWthUIzFlEMDvbcVlo7MAz7hjee; PHPSESSID=6206a4d5781d364d47c4cb90c5cbc248' --data-binary  "@-"`
        # echo $result
        if [ `echo $result | grep -Ec [0-9]+` -gt 0 ]
        then
            pos=`echo $result | grep -Eo [0-9]+`
        fi
        echo "$filename current file posision: $pos"
    done
}

soushuupload "$1" "$2"
