bash 使用 wget 从 anonfiles 获取文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22383686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 09:54:34  来源:igfitidea点击:

Get a file from anonfiles with wget

bash

提问by ERNAN Fabrice

I am looking for a solution to directly get a file hosted on https://anonfiles.com/

我正在寻找直接获取托管在https://anonfiles.com/上的文件的解决方案

Actually, I am trying to deposit a ZIP file (which is autorized) and get it via a simple wget(Linux) and via bitsadmin.exe(Windows) The transfer proceeds correctly, but my downloaded file size is only of 4k with the good name.

实际上,我正在尝试存入一个 ZIP 文件(已自动处理)并通过一个简单的wget(Linux) 和bitsadmin.exe(Windows)获取它传输正确进行,但我下载的文件大小仅为 4k,而且名称不错。

If I try to download this file via my browser all works perfectly.

如果我尝试通过浏览器下载此文件,则一切正常。

I specify that I am using the direct link which is like this https://cdn.anonfiles.com/abcefghijkl.zip

我指定我使用的是这样的直接链接 https://cdn.anonfiles.com/abcefghijkl.zip

Any idea ? May be it is not possible.

任何的想法 ?可能是不可能的。

采纳答案by Sérgio Carvalho

Anonfiles.com protects bandwidth stealing using the HTTP referer header. You need to pass a referer in the anonfiles.com domain. For example:

Anonfiles.com 使用 HTTP 引用标头保护带宽窃取。您需要在 anonfiles.com 域中传递引用。例如:

wget --referer=https://anonfiles.com/ https://cdn.anonfiles.com/1394726793646.jpg