f4team-cn / f4pan

A website to get netdisk download link for users who cannot install the client
GNU Affero General Public License v3.0
355 stars 49 forks source link

服務器500 #52

Open meikenakinori opened 1 month ago

meikenakinori commented 1 month ago

想請問cookie怎麼配置 目前是BDUSS=XXXX; STOKEN=XXXX;請問怎麼改善

meikenakinori commented 1 month ago

開啟debug Trying to access array offset on value of type null $url = 'https://pan.baidu.com/share/wxlist?channel=weixin&version=2.2.2&clienttype=25&web=1'; $root = ($isRoot) ? "1" : "0"; $dir = urlencode($dir); $data = "shorturl=$shorturl&dir=$dir&root=$root&pwd=$password&page=1&num=1000&order=time"; $header = array( "User-Agent: netdisk", "Referer: https://pan.baidu.com/disk/home" ); $result = CurlUtils::header($header)->cookie(SystemModel::getNormalCookie())->post($url, $data)->obj(true); if ($result['errno'] != "0"){ return responseJson(-1, '链接错误,请检查链接是否有效'); } foreach ($result['data']['list'] as $va){ $filename = $va['server_filename']; $ctime = $va['server_ctime']; $path = $va['path']; $md5 = $va['md5']??""; $fs_id = (int)$va['fs_id']; $isdir = $va['isdir'];

meikenakinori commented 1 month ago

{ "code": 2, "message": "Trying to access array offset on value of type null", "traces": [ { "name": "think\exception\ErrorException", "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/Parse.php", "line": 66, "code": 2, "message": "Trying to access array offset on value of type null", "trace": [ { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/Parse.php", "line": 66, "function": "appError", "class": "think\initializer\Error", "type": "->", "args": [ 2, "Trying to access array offset on value of type null", "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/Parse.php", 66 ] }, { "function": "getFileList", "class": "app\controller\Parse", "type": "->", "args": [] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Container.php", "line": 330, "function": "invokeArgs", "class": "ReflectionMethod", "type": "->", "args": [ {}, [] ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Container.php", "line": 363, "function": "invokeMethod", "class": "think\Container", "type": "->", "args": [ "getFileList", { "req_id": "f4pan_req_id_1be155fb59ce5d29", "isroot": "1" }, false ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/route\/dispatch\/Callback.php", "line": 27, "function": "invoke", "class": "think\Container", "type": "->", "args": [ [ "\app\controller\Parse", "getFileList" ], { "req_id": "f4pan_req_id_1be155fb59ce5d29", "isroot": "1" } ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/route\/Dispatch.php", "line": 52, "function": "exec", "class": "think\route\dispatch\Callback", "type": "->", "args": [] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Route.php", "line": 755, "function": "run", "class": "think\route\Dispatch", "type": "->", "args": [] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 59, "function": "think\{closure}", "class": "think\Route", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/middleware\/ParseMiddleware.php", "line": 36, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "function": "handle", "class": "app\middleware\ParseMiddleware", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Middleware.php", "line": 134, "function": "call_user_func", "args": [ [ {}, "handle" ], {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 85, "function": "think\{closure}", "class": "think\Middleware", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/middleware\/VisitRecorder.php", "line": 18, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "function": "handle", "class": "app\middleware\VisitRecorder", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Middleware.php", "line": 134, "function": "call_user_func", "args": [ [ {}, "handle" ], {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 85, "function": "think\{closure}", "class": "think\Middleware", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 66, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Route.php", "line": 756, "function": "then", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Http.php", "line": 208, "function": "dispatch", "class": "think\Route", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Http.php", "line": 198, "function": "dispatchToRoute", "class": "think\Http", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 59, "function": "think\{closure}", "class": "think\Http", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/middleware\/AllowCrossDomain.php", "line": 61, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "function": "handle", "class": "think\middleware\AllowCrossDomain", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Middleware.php", "line": 134, "function": "call_user_func", "args": [ [ {}, "handle" ], {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 85, "function": "think\{closure}", "class": "think\Middleware", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/think-trace\/src\/TraceDebug.php", "line": 71, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "function": "handle", "class": "think\trace\TraceDebug", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Middleware.php", "line": 134, "function": "call_user_func", "args": [ [ {}, "handle" ], {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 85, "function": "think\{closure}", "class": "think\Middleware", "type": "->", "args": [ {}, {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Pipeline.php", "line": 66, "function": "think\{closure}", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Http.php", "line": 199, "function": "then", "class": "think\Pipeline", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Http.php", "line": 162, "function": "runWithRequest", "class": "think\Http", "type": "->", "args": [ {} ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/public_html\/index.php", "line": 20, "function": "run", "class": "think\Http", "type": "->", "args": [] } ], "source": { "first": 57, "source": [ " $url = 'https:\/\/pan.baidu.com\/share\/wxlist?channel=weixin&version=2.2.2&clienttype=25&web=1';\n", " $root = ($isRoot) ? \"1\" : \"0\";\n", " $dir = urlencode($dir);\n", " $data = \"shorturl=$shorturl&dir=$dir&root=$root&pwd=$password&page=1&num=1000&order=time\";\n", " $header = array(\n", " \"User-Agent: netdisk\",\n", " \"Referer: https:\/\/pan.baidu.com\/disk\/home\"\n", " );\n", " $result = CurlUtils::header($header)->cookie(SystemModel::getNormalCookie())->post($url, $data)->obj(true);\n", " if ($result['errno'] != \"0\"){\n", " return responseJson(-1, '链接错误,请检查链接是否有效');\n", " }\n", " foreach ($result['data']['list'] as $va){\n", " $filename = $va['server_filename'];\n", " $ctime = $va['server_ctime'];\n", " $path = $va['path'];\n", " $md5 = $va['md5']??\"\";\n", " $fs_id = (int)$va['fs_id'];\n", " $isdir = $va['isdir'];\n" ] } } ], "datas": [], "tables": { "GET Data": { "req_id": "f4pan_req_id_1be155fb59ce5d29", "isroot": "1" }, "POST Data": [], "Files": null, "Cookies": [], "Session": [], "Server\/Request Data": { "HOME": "\/home\/akinori", "USER": "akinori", "PATH": "\/bin:\/usr\/bin:\/usr\/local\/bin", "HTTP_PRIORITY": "u=1, i", "HTTP_ACCEPT_LANGUAGE": "zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7", "HTTP_ACCEPT_ENCODING": "gzip, deflate, br, zstd", "HTTP_REFERER": "https:\/\/akinori.serv00.net\/", "HTTP_SEC_FETCH_DEST": "empty", "HTTP_SEC_FETCH_MODE": "cors", "HTTP_SEC_FETCH_SITE": "same-origin", "HTTP_SEC_CH_UA_MOBILE": "?0", "HTTP_SEC_CH_UA": "\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"", "HTTP_ACCEPT": "application\/json, text\/plain, \/", "HTTP_USER_AGENT": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/129.0.0.0 Safari\/537.36", "HTTP_SEC_CH_UA_PLATFORM": "\"Windows\"", "HTTP_CACHE_CONTROL": "no-cache", "HTTP_PRAGMA": "no-cache", "HTTP_HOST": "akinori.serv00.net", "HTTPS": "on", "REDIRECT_STATUS": "200", "GEOIP_COUNTRY_CODE": "TW", "PATH_INFO": "", "SERVER_USER": "akinori", "SERVER_DOMAIN": "akinori.serv00.net", "SERVER_NAME": "akinori.serv00.net", "SERVER_PORT": "443", "SERVER_ADDR": "128.204.223.42", "REMOTE_PORT": "54710", "REMOTE_ADDR": "111.240.31.162", "SERVER_SOFTWARE": "Apache\/N-G-I-N-X-htaccess-support", "GATEWAY_INTERFACE": "CGI\/1.1", "SERVER_PROTOCOL": "HTTP\/2.0", "DOCUMENT_ROOT": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/public_html", "DOCUMENT_URI": "\/api\/v1\/parse\/get_file_list", "REQUEST_URI": "\/api\/v1\/parse\/get_file_list?req_id=f4pan_req_id_1be155fb59ce5d29&isroot=1", "SCRIPT_NAME": "\/index.php", "CONTENT_LENGTH": "", "CONTENT_TYPE": "", "REQUEST_METHOD": "GET", "QUERY_STRING": "s=api\/v1\/parse\/get_file_list&req_id=f4pan_req_id_1be155fb59ce5d29&isroot=1", "SCRIPT_FILENAME": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/public_html\/index.php", "FCGI_ROLE": "RESPONDER", "PHP_SELF": "\/index.php", "REQUEST_TIME_FLOAT": 1729260863.7224109, "REQUEST_TIME": 1729260863 } } }

meikenakinori commented 1 month ago

在掃馬登入那邊也是{ "code": 2, "message": "Undefined array key \"STOKEN\"", "traces": [ { "name": "think\exception\ErrorException", "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/WebApi.php", "line": 63, "code": 2, "message": "Undefined array key \"STOKEN\"", "trace": [ { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/WebApi.php", "line": 63, "function": "appError", "class": "think\initializer\Error", "type": "->", "args": [ 2, "Undefined array key \"STOKEN\"", "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/app\/controller\/WebApi.php", 63 ] }, { "function": "qrcodeLogin", "class": "app\controller\WebApi", "type": "->", "args": [] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Container.php", "line": 330, "function": "invokeArgs", "class": "ReflectionMethod", "type": "->", "args": [ {}, [] ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/Container.php", "line": 363, "function": "invokeMethod", "class": "think\Container", "type": "->", "args": [ "qrcodeLogin", { "bduss": "f5a7bb32cd3f9b6925767bb8312ae91b" }, false ] }, { "file": "\/usr\/home\/akinori\/domains\/akinori.serv00.net\/vendor\/topthink\/framework\/src\/think\/route\/dispatch\/Callback.php", "line": 27, "function": "invoke", "class": "think\Container", "type": "->", "args": [ [ "\app\controller\WebApi", "qrcodeLogin" ], { "bduss": "f5a7bb32cd3f9b6925767bb8312ae91b" } ]