1 Star 0 Fork 0

tubutafeng/w3af

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
w3af_gui 2.85 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env python
from __future__ import print_function
import getopt
import sys
import os
import base64
# Perform the GTK UI dependency check, this will verify that the current system
# has all the modules required to run w3af (including the core dependencies)
from w3af.core.ui.gui.dependency_check.dependency_check import dependency_check
dependency_check()
import w3af.core.controllers.output_manager as om
USAGE_DOC = '''
w3af - Web Application Attack and Audit Framework
Usage:
./w3af_gui [OPTIONS]
Options:
-h or --help
Display this help message.
-n or --no-update
No update check will be made when starting. This option takes
precedence over the 'auto-update' setting in 'startup.conf' file.
-f or --force-update
An update check will be made when starting. This option takes
precedence over the 'auto-update' setting in 'startup.conf' file.
-p <profile> or --profile=<profile>
Run with the selected <profile>
For more info visit http://w3af.org/
'''
def _configure_output_manager():
"""
Make sure that the output manager is started before doing anything else,
since it is used by most w3af modules
"""
try:
om.manager.set_output_plugins(['console'])
except Exception as e:
print('Something went wrong, w3af failed to start the output manager.')
print('Exception: "%s"' % e)
sys.exit(-9)
def usage():
print(USAGE_DOC)
def main():
try:
long_options = ['help', 'no-update', 'force-update', 'profile=']
opts, _ = getopt.getopt(sys.argv[1:], "ehnfp:", long_options)
except getopt.GetoptError:
# print help information and exit:
usage()
return -3
profile = None
doupdate = None
for o, a in opts:
if o in ("-e"):
# easter egg
msg = 'R3JhY2lhcyBFdWdlIHBvciBiYW5jYXJtZSB0YW50YXMgaG9yYXMgZGUgZGV'\
'zYXJyb2xsbywgdGUgYW1vIGdvcmRhIQ=='
print(base64.b64decode(msg))
if o in ('-p', '--profile'):
# selected profile
profile = a
if o in ('-h', '--help'):
usage()
return 0
if o in ('-f', '--force-update'):
doupdate = True
elif o in ('-n', '--no-update'):
doupdate = False
# go with GTK, but first check about DISPLAY environment variable
if sys.platform != "win32":
display = os.getenv("DISPLAY")
if not display:
om.out.error("The DISPLAY environment variable is not set! You can"
" not use any graphical program without it...")
return -1
from w3af.core.ui.gui.main import main as gui_main
gui_main(profile, doupdate)
def _main():
_configure_output_manager()
sys.exit(main())
if __name__ == "__main__":
_main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tubutafeng/w3af.git
git@gitee.com:tubutafeng/w3af.git
tubutafeng
w3af
w3af
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385