1 Star 0 Fork 0

zhanghaochen/discover

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
multiTabs.sh 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
Lee Baird 提交于 2020-07-06 11:09 . Corrected label.
#!/bin/bash
f_runlocally
clear
f_banner
echo -e "${BLUE}Open multiple tabs in Firefox with:${NC}"
echo
echo "1. List"
echo "2. Directories from robots.txt."
echo "3. Previous menu"
echo
echo -n "Choice: "
read choice
case $choice in
1) f_location
echo -n "Use an https prefix? (y/N) "
read prefix
$web &
sleep 2
if [ -z $prefix ]; then
for i in $(cat $location); do
$web $i &
sleep 1
done
elif [ "$prefix" == "y" ]; then
for i in $(cat $location); do
$web https://$i &
sleep 1
done
else
f_error
fi
;;
2)
echo
echo $medium
echo
echo "Usage: target.com or target-IP"
echo
echo -n "Domain: "
read domain
# Check for no answer
if [[ -z $domain ]]; then
f_error
fi
wget -q $domain/robots.txt
# Check if the file is empty
if [ ! -s robots.txt ]; then
echo
echo -e "${RED}$medium${NC}"
echo
echo -e "${RED} *** No robots file discovered. ***${NC}"
echo
echo -e "${RED}$medium${NC}"
sleep 2
f_main
fi
grep 'Disallow' robots.txt | awk '{print $2}' > tmp
$web &
sleep 2
for i in $(cat tmp); do
$web http://$domain$i &
sleep 1
done
rm robots.txt
mv tmp $home/data/$domain-robots.txt
echo
echo $medium
echo
echo "***Scan complete.***"
echo
echo
echo -e "The new report is located at ${YELLOW}$home/data/$domain-robots.txt${NC}\n"
echo
echo
;;
3) f_main;;
*) f_error;;
esac
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhanghaochenFCB/discover.git
git@gitee.com:zhanghaochenFCB/discover.git
zhanghaochenFCB
discover
discover
master

搜索帮助