一些信息收集的shell脚本

一.搜索子域名的shell脚本

1.wget www.megacorpone.com #下载该网站的首页地址

2.grep "href"index.html #过滤超链接关键字

3.grep "href="index.html |grep

"\.megacorpone" | grep -v"www

\.megacorpone\.com | head

#过滤"hrep="字段在index.html文件中

通过这种逻辑的方式减少我们的数据,并在每次操作中按顺序进行较小的缩减

awk -F设置多个字符的分隔符,与cut不同,后者方式简单但只允许使用单字符分隔符

4.grep "href="index.html | grep

"\.megacorpone" | grep -v"www

\.megacorpong\.com" | awk -F "http"//" 'print $2' | cut -d"/" -f 1

5.grep -o'[^/]*\.megacorpone\.com'

index.html | sort -u > list.txt

#grep -o 逐行输出匹配的内容,支持正则表达式

6.for url in $(cat list.txt); do host $url; done

7.for url in $(cat list.txt); do host $url; done |"has address" |cut -d" " -f 4 |sort -u

二.嗅探并抓取网页快照shell脚本

1.Nmao -A -p 80 --open 10.11.1.0/24 -oGnmap-scan_10.11.1.1-254

2.Cat nmap-scan_10.11.1.1-254 | grep 80 | grep -v "Nmap" | awk '{print$2}'

3.for ip in $(cat nmap-scan_10.11.1.1-254 | grep 80 | grep -v "Nmap" | awk '{print$2}');do cutucapt --url=$ip --out=$ip.png;done

4.

#!bin/bash

echo "<html><body><br>" >web.html

is -| *.png | awk -F: '{print ¥1”:\n<br><img

src=\""$1""$2\" width=600><br>"}' >> web.html

echo"<body></html>" >>web.html

三.漏洞利用程序下载脚本

""shell

Searchsoloit 是一个针对ExploitDB的命令行搜索工具,他允许我们随时随地获取Exploit数据库的脱机副本

-w 返回https://www.exp;oit_db.com上的信息

-t 搜索漏洞利用标题

1.searchsploit afd windows -w -t

2.searchsploit afd windows -w -t | grep http | cut -f 2 -d "|"

3.for e in $(searchsploit afd windows -w -t | grep http | cut -f 2 -d "|"); do exp_name= $(echo $e | cut -d "/" -f 5) && wegt -q --no- check-certificate $url -O $exp_name;done

4.

#!bin/bash

for e in $(searchsploit adf windows -w -t |grep http | cut -f 2 -d "|")

do

 exp_name=$(echo $e | cut -d"/" -f 5)

 erl=$(echo $e | sed's/exploit/raw/')

 wegt -q --no-check-certificate $url -O$exp_name

 done

""

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值