From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 17 22:00:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1EE6CD0 for ; Mon, 17 Mar 2014 22:00:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E495E78 for ; Mon, 17 Mar 2014 22:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2HM00Ft015887 for ; Mon, 17 Mar 2014 22:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2HM00Vr015886; Mon, 17 Mar 2014 22:00:00 GMT (envelope-from gnats) Resent-Date: Mon, 17 Mar 2014 22:00:00 GMT Resent-Message-Id: <201403172200.s2HM00Vr015886@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, clutton Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDA92AD3 for ; Mon, 17 Mar 2014 21:51:02 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 232A2E11 for ; Mon, 17 Mar 2014 21:51:02 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2HLp0Qk063330 for ; Mon, 17 Mar 2014 21:51:00 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2HLp0S9063329; Mon, 17 Mar 2014 21:51:00 GMT (envelope-from nobody) Message-Id: <201403172151.s2HLp0S9063329@cgiserv.freebsd.org> Date: Mon, 17 Mar 2014 21:51:00 GMT From: clutton To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/187676: new port [security/webshag] X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 22:00:00 -0000 >Number: 187676 >Category: ports >Synopsis: new port [security/webshag] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 17 22:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: clutton >Release: >Organization: >Environment: >Description: Have you any questions contact me. I'll change this port as much as it'll be needed. Porting this thing was a nightmare. It doesn't use any wise concept at all! The one thing I doubt is WRKSRC= ${WRKDIR} because the distfile unpacking directly to . >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # webshag # webshag/pkg-plist # webshag/files # webshag/files/patch-setup_linux_py # webshag/pkg-descr # webshag/Makefile # webshag/distinfo # echo c - webshag mkdir -p webshag > /dev/null 2>&1 echo x - webshag/pkg-plist sed 's/^X//' >webshag/pkg-plist << 'cf8d015462fbce4d38055ec3855a743d' Xbin/webshag_cli X%%WXGTK%%bin/webshag_gui X%%ETCDIR%%.conf X%%PYTHON_SITELIBDIR%%/webshag/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/core/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/core/core_error.py X%%PYTHON_SITELIBDIR%%/webshag/core/core_file.py X%%PYTHON_SITELIBDIR%%/webshag/core/core_http.py X%%PYTHON_SITELIBDIR%%/webshag/core/core_utilities.py X%%PYTHON_SITELIBDIR%%/webshag/export/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/export/export.py X%%PYTHON_SITELIBDIR%%/webshag/gui/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_fuzz.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_images.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_info.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_pscan.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_spider.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_uscan.py X%%PYTHON_SITELIBDIR%%/webshag/gui/gui_widgets.py X%%PYTHON_SITELIBDIR%%/webshag/modules/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/modules/module_fuzz.py X%%PYTHON_SITELIBDIR%%/webshag/modules/module_info.py X%%PYTHON_SITELIBDIR%%/webshag/modules/module_pscan.py X%%PYTHON_SITELIBDIR%%/webshag/modules/module_spider.py X%%PYTHON_SITELIBDIR%%/webshag/modules/module_uscan.py X%%PYTHON_SITELIBDIR%%/webshag/update/__init__.py X%%PYTHON_SITELIBDIR%%/webshag/update/update.py X%%DATADIR%%/custom/banners.db X%%DATADIR%%/custom/custom_tests.db X%%DATADIR%%/fuzzer/directory-list-1.0.txt X%%DATADIR%%/fuzzer/directory-list-2.3-small.txt X%%DATADIR%%/fuzzer/extensions.txt X%%DATADIR%%/nikto/db_tests X%%DATADIR%%/nikto/db_variables X%%DATADIR%%/proxies/proxies.txt X@dirrmtry %%DATADIR%%/proxies X@dirrmtry %%DATADIR%%/nikto X@dirrmtry %%DATADIR%%/fuzzer X@dirrmtry %%DATADIR%%/custom X@dirrmtry %%DATADIR%% X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag/update X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag/modules X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag/gui X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag/export X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag/core X@dirrmtry %%PYTHON_SITELIBDIR%%/webshag X@dirrmtry %%PYTHON_SITELIBDIR%% X@dirrmtry %%PYTHON_LIBDIR%% cf8d015462fbce4d38055ec3855a743d echo c - webshag/files mkdir -p webshag/files > /dev/null 2>&1 echo x - webshag/files/patch-setup_linux_py sed 's/^X//' >webshag/files/patch-setup_linux_py << '3c28bced2086751c39a88df2054e3d49' X--- setup.linux.py 2008-12-31 17:05:40.000000000 +0200 X+++ setup.linux.py 2014-03-17 23:29:30.000000000 +0200 X@@ -24,21 +24,21 @@ X ## INIT ## X ## ################################################################# ## X X-path_prefix = os.path.abspath(os.path.curdir) + '/' X+path_prefix = '/usr/local/' X X ## ################################################################# ## X ## CONSTANTS ## X ## ################################################################# ## X X-NMAP = u'/usr/bin/nmap' X+NMAP = u'/usr/local/bin/nmap' X CORE_FILE = u'webshag/core/core_file.py' X-CFG_FILE = u'config/webshag.conf' X-FUZZ_DIRS = path_prefix + u'/database/fuzzer/directory-list-2.3-small.txt' X-FUZZ_FILES = path_prefix + u'/database/fuzzer/directory-list-1.0.txt' X-FUZZ_EXT = path_prefix + u'/database/fuzzer/extensions.txt' X-CUSTOM_DB = path_prefix + u'/database/custom' X-NIKTO_DB = path_prefix + u'/database/nikto' X-IDS_PROXIES = path_prefix + u'/database/proxies/proxies.txt' X+CFG_FILE = u'etc/webshag.conf' X+FUZZ_DIRS = path_prefix + u'share/webshag/fuzzer/directory-list-2.3-small.txt' X+FUZZ_FILES = path_prefix + u'share/webshag/fuzzer/directory-list-1.0.txt' X+FUZZ_EXT = path_prefix + u'share/webshag/fuzzer/extensions.txt' X+CUSTOM_DB = path_prefix + u'share/webshag/custom' X+NIKTO_DB = path_prefix + u'share/webshag/nikto' X+IDS_PROXIES = path_prefix + u'share/webshag/proxies/proxies.txt' X X CORE_CFG_RE = re.compile(ur'CFG_FILE\s=\s(?P.*)') X X@@ -73,13 +73,8 @@ X ## LIVE SEARCH APPID ## X ## ################################################################# ## X X-user_live = raw_input(u'[#] Enter your Live Search AppID (blank to skip): ') X-if user_live != '': X- live_id = user_live X- print u'[*] Live Search AppID: ' + user_live + u'\t Done!' X-else: X- live_id = '' X- print u'[!] AppID missing. Domain information module will not be functional.' X+live_id = 'False' X+print u'[!] AppID missing. Insert your LiveID into etc/webshag.conf.' X X ## ################################################################# ## X ## ALTERING FILES ## X@@ -92,14 +87,14 @@ X # core_file.py X print u'[*] Patching source code (configuration file location)...\t', X # reading file X-core_file_handler = codecs.open(core_file, u'r', u'utf-8') X+core_file_handler = codecs.open(u'webshag/core/core_file.py', u'r', u'utf-8') X core_file_contents = core_file_handler.read() X core_file_handler.close() X # replacing path value X old_path = CORE_CFG_RE.findall(core_file_contents)[-1] X core_file_contents = core_file_contents.replace(old_path, '\'' + cfg_file + '\'') X # writing file back X-core_file_handler = codecs.open(core_file, u'w', u'utf-8') X+core_file_handler = codecs.open(u'webshag/core/core_file.py', u'w', u'utf-8') X core_file_handler.write(core_file_contents) X core_file_handler.close() X print u'Done!' X@@ -107,7 +102,7 @@ X # webshag.conf X print u'[*] Fixing configuration file settings...\t', X configParser = SafeConfigParser() X-configParser.readfp(codecs.open(cfg_file, u'r', u'utf-8')) X+configParser.readfp(codecs.open(u'etc/webshag.conf', u'r', u'utf-8')) X configParser.set(u'core_file', u'fuzzer_file_list', FUZZ_FILES) X configParser.set(u'core_file', u'fuzzer_dir_list', FUZZ_DIRS) X configParser.set(u'core_file', u'fuzzer_ext_list', FUZZ_EXT) X@@ -117,7 +112,7 @@ X configParser.set(u'module_info', u'live_id', live_id) X configParser.set(u'module_portscan', u'nmap', nmap) X configParser.set(u'module_portscan', u'nmap_location', nmap_location) X-cfg_file_handler = codecs.open(cfg_file, u'w', u'utf-8') X+cfg_file_handler = codecs.open(u'etc/webshag.conf', u'w', u'utf-8') X configParser.write(cfg_file_handler) X cfg_file_handler.close() X print u'Done!' X@@ -129,5 +124,3 @@ X print '' X print 'Thanks for your interest in webshag! It is now ready to be used!' X print 'Enjoy! For more information please visit www.scrt.ch' X-print '' X-raw_input('Press any key to exit.\n') 3c28bced2086751c39a88df2054e3d49 echo x - webshag/pkg-descr sed 's/^X//' >webshag/pkg-descr << '59958e45c8f27fabfe24ac0c336cfaba' XWebshag is a multi-threaded, multi-platform web server audit tool. Written in XPython, it gathers commonly useful functionalities for web server auditing like Xwebsite crawling, URL scanning or file fuzzing. X XWWW: http://www.scrt.ch/en/attack/downloads/webshag 59958e45c8f27fabfe24ac0c336cfaba echo x - webshag/Makefile sed 's/^X//' >webshag/Makefile << 'dbda38d6b3abfb4bc36c24e4d08b8510' X# $FreeBSD$ X XPORTNAME= webshag XPORTVERSION= 1.10 XCATEGORIES= security www XMASTER_SITES= http://www.scrt.ch/outils/webshag/ X XDISTNAME= ws110 XWRKSRC= ${WRKDIR} X XMAINTAINER= clutton@zoho.com XCOMMENT= Multi-threaded, multi-platform web server audit tool X XLICENSE= GPLv3 X XUSE_PYTHON= 2.7 XUSE_PYDISTUTILS=yes XPYSETUP= setup.linux.py X X XOPTIONS_DEFINE= NMAP WXGTK XOPTIONS_DEFAULT=NMAP XOPTIONS_SUB= yes X X.include X X.if ${PORT_OPTIONS:MNMAP} XRUN_DEPENDS= ${LOCALBASE}/bin/nmap:${PORTSDIR}/security/nmap X.endif X X.if ${PORT_OPTIONS:MWXGTK} XUSE_WX= 2.6+ XWX_COMPS= python:run X.endif X Xpost-patch: X @${MV} ${WRKSRC}/config ${WRKSRC}/etc X @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!/usr/bin/env python|g' \ X ${WRKSRC}/webshag_cli.py X @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!/usr/bin/env python|g' \ X ${WRKSRC}/webshag_gui.py X Xdo-install: X.if ${PORT_OPTIONS:MWXGTK} X ${INSTALL_SCRIPT} ${WRKSRC}/webshag_gui.py \ X ${STAGEDIR}${PREFIX}/bin/webshag_gui X.endif X ${INSTALL_SCRIPT} ${WRKSRC}/webshag_cli.py \ X ${STAGEDIR}${PREFIX}/bin/webshag_cli X @${INSTALL_DATA} ${WRKSRC}/etc/webshag.conf ${STAGEDIR}${PREFIX}/etc X (cd ${WRKSRC}/database && ${COPYTREE_SHARE} . \ X ${STAGEDIR}${PREFIX}/share/webshag) X (cd ${WRKSRC}/webshag && ${COPYTREE_SHARE} . \ X ${STAGEDIR}${PYTHON_SITELIBDIR}/webshag) X X.include dbda38d6b3abfb4bc36c24e4d08b8510 echo x - webshag/distinfo sed 's/^X//' >webshag/distinfo << '9762940080e669c09813c0bcf867ec69' XSHA256 (ws110.tar.gz) = a1ea1cc0c87e44a19fad7edc1658c6c57705aa1fc3ff3304f1e4a669b523a049 XSIZE (ws110.tar.gz) = 1512389 9762940080e669c09813c0bcf867ec69 exit >Release-Note: >Audit-Trail: >Unformatted: