我有一個應用程序從服務器上下載文件,以tcp數據包的形式接收文件,我想在服務器上找到文件的路徑。隨着wireshark我在第一個數據包中讀取一些信息,如日期,域名,文件名和路徑我讀path=/
,但它不是在domain.com/filename(404)。有什麼辦法可以獲得文件在服務器上的真實路徑嗎?從tcp數據包獲取文件路徑
編輯:
所有我發現,在第一分組可理解:
HTTP/1.1 200 OK
Date: Sat, 30 Aug 2014 14:35:55 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.3.24
Set-Cookie: frontend=m90hqgtsu70hk9pprd39sllqk4; expires=Sat, 30-Aug-2014 25:35:55 GMT; path=/; domain=www.exaple.com; HttpOnly
Content-Disposition: attachment; filename="xxx.y"
Content-Length: 46458848
Connection: close
Content-Type: application/octet-stream
請求:
GET /index.php/rest/server?method=download&sessionId=xxx&[email protected]&deviceToken=xxx&sku=filename&version=2
HTTP/1.1
Connection: Keep-Alive
Accept Encoding: gzip
Accept-Language: it-IT,en,*
User-Agent: Mozilla/5.0
Host: www.domain.com
您使用什麼協議下載文件?信息包實際上是什麼樣的?你說這個數據包有'domain','path'和'filename'組件,你試過簡單地把它們組合在一起嗎? – 2014-08-30 16:15:56
我沒有寫應用程序,所以我不知道它的工作原理。現在我會在這個可讀的包中讀到所有我讀到的問題。正如我所說,我試圖結合域,路徑和文件名,但它不存在(404)。 – Vitto 2014-08-30 16:25:12