kali新手入门教学(4)--w3af的安装&解决python-webkit无法安装的问题&kali添加ubantu的源

今天真是神奇的一天…机缘巧合…居然解决了w3af安装的问题,太开心了
久违的w3af
在这里插入图片描述念念不忘,必有回想,终于弄好了…这篇文章也是第三次修改了…

w3af最主要的安装问题就是python-webkit,网上方法很多,但都不可能解决,相信我,只有一个方法,换源,好多人用什么-y那都是扯,你不换源,这个包你都搜不到

但有一个方法是一直可行的,就是老版本kali
kali1.07
提取码:ukxk
进去了,直接输入w3af
不用安装那不香吗
在这里插入图片描述随便找个站点测试一下
在这里插入图片描述多舒服
其实差别不多,就是个别工具的差别,如果没啥特别要求的话,都用一下老的吧
新的确实不是很稳定,可能是我能力不足,不过还是要照顾一下新版的kali,下面内容就是介绍最新版本kali安装w3af

鉴于有些朋友对于安装过程还是有些疑惑…我今天就重新安装一次
刚刚下载完的全新kali,应该和各位朋友没什么差别

还是先介绍一下w3af
w3af是一个很不错的web审计和攻击应用,在老版的kali上是自带的,新版的kali需要下载
w3af项目的github的原址

下面开始繁杂的安装过程
首先,更新命令走一波

apt-get update
apt-get dist-upgrade
apt-get upgrade

在这里插入图片描述好家伙,先休息一下,让他自己更着吧

总算更新完了
下面开始干正事咯

如果没有git先安装个git

apt-get install git
git clone  https://github.com/andresriancho/w3af.git

比较慢,慢慢等啦
然后安装aptitude

apt-get install aptitude

这个地方我没报错,应该没啥问题

apt-get install -y python-pip

结果这个也没报错,我的天 。。我记得我第一次安装还报错了…
在这里插入图片描述
更新一下pip

pip install --upgrade pip

然后进入w3af

cd w3af
./w3af_console

满满的绿屏,缺少很多东西
在这里插入图片描述
按着提示执行,安装依赖

. /tmp/w3af_dependency_install.sh

安装的时候最好开个v,涉及到python包,有条件的话就一直开v

执行完再执行一次,看看还缺什么

./w3af_console

在这里插入图片描述
卧槽…直接好了吗…什么果
本来以为是作者修复了bug。没想到我换了个环境后又出问题了…
下面的可能是广大朋友可能遇到的环境…
如果没有就请跳过…
出现下面报错并且弹出来python2很快就…的朋友的原因就是setuptool的问题,
如果你的setuptool安装在python2下面,就会爆出这个错
在这里插入图片描述
移除 2.7环境下的setuptools

pip uninstall  setuptools

安装3.8环境下的setuptools

wget --no-check-certificate  https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26

tar -zxvf setuptools-19.6.tar.gz

cd setuptools-19.6

python3 setup.py build

python3 setup.py instal

然后再重新安装依赖

. /tmp/w3af_dependency_install.sh

然后就好了

./w3af_console

在这里插入图片描述
w3af_console是终端形式,下面我们来安装图形化界面形式

./w3af_gui

果然报错了
在这里插入图片描述
w3af比较人性化了…直接给出命令了,直接复制 就可以

sudo pip install xdot==0.6

emm看来问题还是出在python-webkit
找不到这个包
在这里插入图片描述
dpkg -i 安装的时候。一定要看清楚,保存的名字,有时候可能会下载多个.deb,就会在后面增加1什么的,一定要看保存的名字

wget http://ftp.br.debian.org/debian/pool/main/w/webkitgtk/libjavascriptcoregtk-1.0-0_2.4.11-3_amd64.deb
dpkg -i libjavascriptcoregtk-1.0-0_2.4.11-3_amd64.deb

在这里插入图片描述
可以看到,缺少libicu57,那么我们安装libicu57

wget http://ftp.de.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
dpkg -i  libicu57_57.1-6+deb9u4_amd64.deb

再来安装libjavascripttcoregtk,这下就好啦

dpkg -i libjavascriptcoregtk-1.0-0_2.4.11-3_amd64.deb

再来安装python-supprot,这个应该不会报错

wget http://ftp.br.debian.org/debian/pool/main/p/python-support/python-support_1.0.15_all.deb
dpkg -i python-support_1.0.15_all.deb

接下来安装libwebkitgtk

wget http://ftp.br.debian.org/debian/pool/main/w/webkitgtk/libwebkitgtk-1.0-0_2.4.11-3_amd64.deb
dpkg -i libwebkitgtk-1.0-0_2.4.11-3_amd64.deb

报错了缺少两个包
在这里插入图片描述安装需要的两个包就行,但不知道为啥,我安装一个就行

apt-get install libegl1-mesa
dpkg -i libwebkitgtk-1.0-0_2.4.11-3_amd64.deb

在这里插入图片描述最后安装我们的webkit

wget http://ftp.br.debian.org/debian/pool/main/p/pywebkitgtk/python-webkit_1.1.8-3_amd64.deb
dpkg -i python-webkit_1.1.8-3_amd64.deb

报错,显示没有libpango1.0-0
在这里插入图片描述如果用apt-get install libpango1.0-0安装报错
在这里插入图片描述
所以这样安装

aptitude  install libpango1.0-0

不知道怎么回事…突然这个方法也不行了,我也换了很多源…ubantu的源也上了,也没解决了…算了我在研究一下 。。
过了几个月,果然有变化

ok,上次文章就是到这里结束了,大概过了2,3个月了
今天我要告诉大家的就是,怎么安装python-webkit

重点

今天突发奇想,能不能在ubantu上安装一个w3af
于是打开ubantu在这里插入图片描述(因为我安好了),惊不惊喜,意不意外
不过后来我还是没安好,因为这个ubantu版本有点老,python其他包不好安
既然ubantu可以搜到这个包,那么我们kali如果有这个的源,是不是也可以下载安装?
添加ubantu的源

#deb cdrom:[Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)]/ dists/precise/main/binary-i386/

#deb cdrom:[Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (20140807.1)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise universe
deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main

注释的部分我就不去掉了,偷个小懒哈哈

vim /etc/apt/sources.list

复制后放进去
更新源

apt-get update

会报错,因为我们没有ubantu的公钥,而且apt出于安全考虑禁用这些源
在这里插入图片描述那么我们就需要修改安全机制

vim /etc/apt/apt.conf.d/70debconf

加上这一句

Acquire::AllowInsecureRepositories true;

在这里插入图片描述如果上面提示缺少公钥

apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 1111111

把11111替换成上面现实的具体公钥
或者是下面这个

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1111

再更新
在这里插入图片描述可以看到获取到了相关源的内容,虽然还是会出现安全信息报错,不过不管他,获取到了就成功了
安装python-webkit

sudo apt-get -y install python-webkit --allow-unauthenticated

因为这个软件包来源于未受信任的源,所以加上最后–allow…
在这里插入图片描述安装好了,真香
可以运行啦,开心
在这里插入图片描述
have fun with your w3af

另外补充一下,如果您pip更新出现类似以下报错
pip更新Cannot fetch index base URL http://pypi.python.org/simple/
大概意思就是没有发现可以使用的pip更新包
使用下面命令就可以啦

pip install --index-url=https://pypi.python.org/simple/ --upgrade pip

再多说一句,如果看到运行waf_gui时候出现

Gtk-Message:Failed to load module "atk-bridge"

使用如下命令解决报错

apt-get install libatk-adaptor libgail-common

再送大家一个w3af桌面快捷方式
放到桌面目路即可,比如说我的就是/root/Desktop

[Desktop Entry]
Name=w3af
Encoding=UTF-8
Exec=/root/w3af/w3af_gui//修改成你的目录
Icon=kali-w3af
StartupNotify=false
Terminal=true
Type=Application
Categories=01-info-gathering;01-04-network-scanners;02-vulnerability-analysis;
X-Kali-Package=w3af
  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 31
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值