Centos系统安装masscan

Centos系统安装masscan

1、基础环境安装

yum update
yum -y install gcc gcc-c++
yum -y install gcc automake autoconf libtool make
yum -y install git
yum -y install flex 
yum -y install bison
yum -y install wget
yum -y install byacc
yum -y install clang
yum -y install libpcap-dev

2、masscan安装(源码)

1、进入opt目录
    cd /opt
    
2、下载源码
    git clone https://github.com/robertdavidgraham/masscan

3、进入masscan
    cd masscan

4、安装masscan
    make clean
    make
    make clean
    make install
    
5、设置环境变量

    打开:
    vim /etc/profile
    
    文件尾添加
    PATH=/opt/masscan/bin:$PATH
    export PATH
    
    重启配置文件:
    source /etc/profile
    
    如果重启后失效(直接执行这个应该也行,没试)
    cp masscan/bin/masscan /bin

3、安装libpcap

1、创建文件夹并进入:
    mkdir /opt/libpcap
    cd /opt/libpcap

2、下载源码并减压:
    wget -c http://www.tcpdump.org/release/libpcap-1.5.3.tar.gz
    tar -zxvf libpcap-1.5.3.tar.gz
    
3、进入文件:
    cd libpcap-1.5.3

4、安装:
    ./configure
    如果报错执行,不同的系统可能情况不一样,具体情况具体分析:
        ./configure --build=arm-linux
    make
    make install
    
5、没有生效解决办法:
    将libpcap.so.1所在的目录添加到文件/etc/ld.so.conf中
        vim /etc/ld.so.conf
        
    添加一行: 
        /usr/local/lib
    
    结果如下:
        include ld.so.conf.d/*.conf    # 原始内容
        /usr/local/lib                 # 新增内容
    
    保存退出:
        :wq
    
    然后执行:
        ldconfig

4、测试

终端输入 xxdscan 或 masscan,出现下面的情况安装成功:

[root@b8030df98be1 work]# masscan 或 xxdscan
usage:
masscan -p80,8000-8100 10.0.0.0/8 --rate=10000
 scan some web ports on 10.x.x.x at 10kpps
masscan --nmap
 list those options that are compatible with nmap
masscan -p80 10.0.0.0/8 --banners -oB <filename>
 save results of scan in binary format to <filename>
masscan --open --banners --readscan <filename> -oX <savefile>
 read binary scan results in <filename> and save them as xml in <savefile>
  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值