LInux下的下载工具介绍

安全工具 2017-11-12

我们经常会用到Linux服务器,在渗透测试中也经常需要下载一些东西到服务器或者本地,有小文件也有大文件,这里就给大家介绍几个Linux下的几个下载用的小工具。

重点介绍一下wget

这个工具是在linux下最常用的下载的工具,支持多种条件的下载。

普通下载

wget http://example.com/file.iso

指定保存文件名

wget ‐‐output-document=myname.iso http://example.com/file.iso

保存到指定目录

wget ‐‐directory-prefix=folder/subfolder http://example.com/file.iso

大文件断点续传

wget ‐‐continue http://example.com/big.file.iso

下载最新版本

wget ‐‐continue ‐‐timestamping http://wordpress.org/latest.zip

下载指定文件中的url列表

wget ‐‐input list-of-file-urls.txt

下载指定数字列表的多个文件

wget http://example.com/images/{1..20}.jpg

下载web页面的所有资源

wget ‐‐page-requisites ‐‐span-hosts ‐‐convert-links ‐‐adjust-extension http://example.com/dir/file

下载整个网站

下载所有lian接的页面和文件

wget ‐‐execute robots=off ‐‐recursive ‐‐no-parent ‐‐continue ‐‐no-clobber http://example.com/

下载指定后缀的文件

wget ‐‐level=1 ‐‐recursive ‐‐no-parent ‐‐accept mp3,MP3 http://example.com/mp3/

下载指定目录的所有图片

wget ‐‐directory-prefix=files/pictures ‐‐no-directories ‐‐recursive ‐‐no-clobber ‐‐accept jpg,gif,png,jpeghttp://example.com/images/

下载多个域名下的pdf文件

wget ‐‐mirror ‐‐domains=abc.com,files.abc.com,docs.abc.com ‐‐accept=pdf http://abc.com/

排除指定目录下载

wget ‐‐recursive ‐‐no-clobber ‐‐no-parent ‐‐exclude-directories /forums,/support http://example.com

绕过限制下载

指定user-agent

wget ‐‐refer=http://google.com ‐‐user-agent=”Mozilla/5.0 Firefox/4.0.1″ http://baidu.com

指定用户名密码

wget ‐‐http-user=labnol ‐‐http-password=hello123 http://example.com/secret/file.zip

post帐号密码并保存cookie

wget ‐‐cookies=on ‐‐save-cookies cookies.txt ‐‐keep-session-cookies ‐‐post-data 'user=labnol&password=123'http://example.com/login.php

使用cookie下载文件

wget ‐‐cookies=on ‐‐load-cookies cookies.txt ‐‐keep-session-cookies http://example.com/paywall

Axel

这个工具作为一个多线程的下载工具,对于大文件下载来说是非常好用的。

指定下载的线程数

axel.exe -n 30 http://www.test.com/bigfile.zip

切换下载显示模式

axel.exe -a http://www.test.com/bigfile.zip

默认满屏幕都是结果,使用-a参数后输出类似于wget

参数解释

axel.png

curl

这个作为一个强大的命令行版的浏览网页的工具,在下载文件这个功能上没有以上两个工具专业,他的强大之处需要去使用了才知道。

直接显示内容

curl http://www.test.com/test.txt

指定保存的名字

curl -o test.html http://www.test.com/test.txt

不指定自动保存为原文件的名字

curl -O http://www.test.com/test.txt

总结

这几个工具在linux下常用的工具,也有Windows版的,可以安装预感cygwin,然后从里面提取出来在Windows下使用。


本文由 信安之路 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处。

楼主残忍的关闭了评论