--- zorp-3.3.6.orig/debian/zorp.postinst +++ zorp-3.3.6/debian/zorp.postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e if [ "$1" = "configure" ]; then if ! getent group zorp >/dev/null 2>&1; then addgroup --quiet --system zorp @@ -15,8 +15,8 @@ chown -R root:zorp /etc/zorp chmod 0750 /etc/zorp - mkdir -p /var/run/zorp || /bin/true - chown -R root.zorp /var/run/zorp + mkdir -p /var/run/zorp || true + chown -R root:zorp /var/run/zorp chmod 0770 /var/run/zorp fi --- zorp-3.3.6.orig/debian/libzorp.substvars +++ zorp-3.3.6/debian/libzorp.substvars @@ -0,0 +1,2 @@ +shlibs:Depends=libc6 (>= 2.3), libpython2.6 (>= 2.6) +misc:Depends= --- zorp-3.3.6.orig/debian/zorp-modules.postrm +++ zorp-3.3.6/debian/zorp-modules.postrm @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e #DEBHELPER# --- zorp-3.3.6.orig/debian/zorp-doc.doc-base.tutorial +++ zorp-3.3.6/debian/zorp-doc.doc-base.tutorial @@ -1,14 +1,15 @@ Document: zorp Title: Zorp Application Level firewall tutorial Author: Balazs Scheidler -Section: Apps/Net -Format: HTML -Index: /usr/share/doc/zorp-doc/html/tutorial/book1.html -Files: /usr/share/doc/zorp-doc/html/tutorial/book1.html Abstract: Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions are scriptable with the Python based configuration language. +Section: Network/Monitoring + +Format: HTML +Index: /usr/share/doc/zorp-doc/html/tutorial/book1.html +Files: /usr/share/doc/zorp-doc/html/tutorial/book1.html --- zorp-3.3.6.orig/debian/changelog +++ zorp-3.3.6/debian/changelog @@ -1,6 +1,399 @@ -zorp (3.3.6) zorp33gpl; urgency=low +zorp (3.3.6-1.1) unstable; urgency=low + + * Non-maintainer upload + * Add to libzorp0: "Replaces: "libzorp2; Breaks: libzorp2" to fix error + when upgrading from lenny (closes: #601991). Thanks to Marcos Marado + for the hint. + + -- Ralf Treinen Thu, 11 Nov 2010 15:28:28 +0100 + +zorp (3.3.6-1) unstable; urgency=low + + * New upstream version. + + -- SZALAY Attila Tue, 29 Jun 2010 17:18:42 +0200 + +zorp (3.0.8-0.5) unstable; urgency=high + + * Non-maintainer upload. + * Force using python2.4. Closes: #506700. + + -- Thomas Viehmann Sun, 23 Nov 2008 21:54:36 +0100 + +zorp (3.0.8-0.4) unstable; urgency=low + + * Non-maintainer upload. + * Use PyObject_Del instead of PyMem_DEL. (Closes: #469012). + * zorp suggests zorp-doc. (Closes: #392141). + * LSB formatted init script. (Closes: #469115). + + Thanks to Petter Reinholdtsen. + + -- Barry deFreese Mon, 03 Mar 2008 10:44:13 -0500 + +zorp (3.0.8-0.3) unstable; urgency=high + + * Non-maintainer upload. + * High-urgency upload for RC bugfix. + * debian/rules: Explicitly run aclocal-1.7 instead of aclocal (FTBFS with + aclocal-1.9). + * configure.in: Set datadir and libdir to ${prefix}/share and ${prefix}/lib. + This is fixed upstream in version 3.0.14b with more intrusive changes in + the build system. Note that ./configure --datadir and --libdir won't work. + Closes: #413933 + * Thanks to Nicolas Francois for the patch. + * Also fix the clean target to use make distclean, not just make + clean. + * The previous change requires setting ZORP_PACKAGE_LICENSE=gpl when + calling configure to avoid another FTBFS. + + -- Steve Langasek Sun, 18 Mar 2007 20:54:44 -0700 + +zorp (3.0.8-0.2) unstable; urgency=high + + * Non-maintainer upload to fix release critical bug. + * Downgrade Depends of zorp-modules on zorp to a Recommends; + remove cyclic dependency that broke purge (Closes: #389769). + + -- Thijs Kinkhorst Tue, 10 Oct 2006 15:58:17 +0200 + +zorp (3.0.8-0.1) unstable; urgency=low + + * Non-maintainer upload. + * Update package to the last python policy (Closes: 380994). + * Make the package binNMUable (use ${source:Version}). + + -- Pierre Habouzit Sun, 3 Sep 2006 23:40:28 +0200 + +zorp (3.0.8) unstable; urgency=low + + * New upstream version. + + -- SZALAY Attila Tue, 24 Jan 2006 19:35:29 +0000 + +zorp (3.0.5) unstable; urgency=low + + * New upstream version. + + -- SZALAY Attila Mon, 31 Oct 2005 16:07:32 +0000 + +zorp (2.0.9-10) unstable; urgency=high + + * Fixed FTBFS bug by Christian Hammers . Closes: #304666 + + -- SZALAY Attila Wed, 25 May 2005 19:42:51 +0200 + +zorp (2.0.9-9) unstable; urgency=low + + * Fixed invalid lvalue in test_registry. Closes: #290446 + + -- Magosányi Árpád (mag) Tue, 18 Jan 2005 10:17:54 +0000 + +zorp (2.0.9-8) unstable; urgency=low + + * tests are disabled for now. Closes: #280947 + + -- Magosányi Árpád (mag) Mon, 22 Nov 2004 21:53:00 +0100 + +zorp (2.0.9-6) unstable; urgency=low + + * makes tests runnable. Closes: #275978 + + -- Magosányi Árpád (mag) Sat, 30 Oct 2004 15:12:05 +0200 + +zorp (2.0.9-5) unstable; urgency=low + + * fixes python2.3 related crash. Closes: 262233 + * we now have tests + + -- Magosányi Árpád (mag) Mon, 13 Sep 2004 16:47:24 +0200 + +zorp (2.0.9-4) unstable; urgency=low + + * fixed libzorpll build-dependency + + -- Magosányi Árpád (mag) Sun, 25 Jul 2004 06:22:01 +0000 + +zorp (2.0.9-3) unstable; urgency=low + + * made libzorpll dependencies more explicit. Closes: #255734 + * fixed instances.conf manpage section + * dropped g++ dependency, which has been brought in because an autoconf + problem + * added zorp-config manpage to libzorp2 + + -- Magosányi Árpád (mag) Fri, 9 Jul 2004 06:27:28 +0000 + +zorp (2.0.9-2) unstable; urgency=low + + * Build with newer libzorpll + * Changelog and control are properly UTF-8 + + -- Magosányi Árpád (mag) Sun, 13 Jun 2004 23:17:34 +0200 + +zorp (2.0.9-1) unstable; urgency=low + + * Merged in upstream changes + + -- Magosányi Árpád (mag) Sat, 12 Jun 2004 01:04:49 +0200 + +zorp (2.0.8-3) unstable; urgency=low + + * Signedness bug. Closes: #177287 + * Fixed the init script. Closes: #240355 + * Fixed the uploader field in debian/control + + -- Magosányi Árpád (mag) Fri, 16 Apr 2004 14:51:33 +0000 + +zorp (2.0.8-2) unstable; urgency=low + + * New upstream version + * 2.0.2-2 closed some bugs. Closes: #220911 + * Build with the correct python version for python-extclass. (hopefully) Closes: #220916 + + -- Magosányi Árpád (mag) Fri, 12 Mar 2004 14:46:50 +0100 + +zorp (2.0.8-1) unstable; urgency=low + + * Unreleased + + -- Magosányi Árpád (mag) Wed, 10 Dec 2003 14:58:52 +0100 + +zorp (2.0.7-2) unstable; urgency=low + + * install instances.conf Closes: #220911 + * sets ulimit to 65532. Works around #221257 + + -- Magosányi Árpád (mag) Tue, 2 Dec 2003 12:18:12 +0100 + +zorp (2.0.7-1) unstable; urgency=low + + * new upstream version + * regenerate all generated files, brings in build dependency on autoconf + * rearranged some includes to make gcc happy + + -- Magosányi Árpád (mag) Wed, 5 Nov 2003 01:35:44 +0100 + +zorp (2.0.6.3-1-2) unstable; urgency=low + + * added /var/lib/zorp to zorp + * made shlib dependency computing simpler + * added lintian and linda override for etc/zorp permission + * some changes to the documentation + * libzorp2-de is libdevel now + * byte-compiling in postinst and removing .pyc, .pyo in prerm per python + policy + + -- Magosányi Árpád (mag) Sun, 26 Oct 2003 22:30:28 +0100 + +zorp (2.0.6.3-1-1) unstable; urgency=low + + * add myself to maintainers + * bumped up Standards-Version + * added manpage for zorp-config + * removed dot from end of short descriptions + * fixed build dependency to debhelper + * fixed (s)in copyright + * cleaning config.{log,status,cache} in cleanup + * other fixes to make lintian happier + + -- Magosányi Árpád (mag) Thu, 16 Oct 2003 00:21:00 +0200 + +zorp (2.0.6.3-1) zorp20gpl; urgency=low + + * New upstream version + + -- Balazs Scheidler Thu, 9 Oct 2003 10:27:24 +0200 + +zorp (2.0.6-1) zorp20gpl; urgency=low + + * New upstream version. + * Fix Build dependency. (libzorpll version): Closes: #213117 + + -- Szalay Attila Mon, 29 Sep 2003 16:31:41 +0200 + +zorp (2.0.5.13-2) zorp20gpl; urgency=low + + * Don't install deleted files. + + -- Szalay Attila Thu, 18 Sep 2003 10:34:21 +0200 + +zorp (2.0.5.13-1) zorp20gpl; urgency=low + + * New upstream version. + * Rearrange doc-base lines. Closes: #195208 + + -- Szalay Attila Thu, 18 Sep 2003 10:15:28 +0200 + +zorp (2.0.5.12-1) zorp20gpl; urgency=low * New upstream version. - -- BalaBit Development Team Tue, 29 Jun 2010 19:14:51 +0200 + -- Szalay Attila Wed, 17 Sep 2003 15:09:29 +0200 + +zorp (2.0.5.10-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Thu, 21 Aug 2003 11:36:17 +0200 + +zorp (2.0.5.9-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Tue, 19 Aug 2003 15:22:52 +0200 + +zorp (2.0.5.8-1) zorp20gpl; urgency=low + + * New upstream version + + -- SZALAY Attila Sat, 16 Aug 2003 01:30:30 +0200 + +zorp (2.0.5.7-1) zorp20gpl; urgency=low + + * New upstream version. + + -- SZALAY Attila Sat, 16 Aug 2003 00:51:21 +0200 + +zorp (2.0.5.6-1) zorp20gpl; urgency=low + + * New upstream version. + + -- SZALAY Attila Fri, 15 Aug 2003 23:06:53 +0200 + +zorp (2.0.5.5-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Fri, 15 Aug 2003 17:08:16 +0200 + +zorp (2.0.5.1-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Fri, 1 Aug 2003 17:42:45 +0200 + +zorp (2.0.5-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Thu, 31 Jul 2003 19:26:55 +0200 + +zorp (2.0.4.16-2) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Tue, 29 Jul 2003 17:55:15 +0200 + +zorp (2.0.4.10-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Mon, 14 Jul 2003 16:04:29 +0200 + +zorp (2.0.4.2-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Mon, 23 Jun 2003 18:18:30 +0200 + +zorp (2.0.4-1) zorp20gpl; urgency=low + + * New upstream version. + + -- Szalay Attila Mon, 16 Jun 2003 14:56:11 +0200 + +zorp (2.0.3.10-1) zorp20gpl; urgency=low + + * New upstream version. + + -- SZALAY Attila Mon, 2 Jun 2003 15:08:53 +0200 + +zorp (2.0.3.9-1) zorp20gpl; urgency=low + + * New upstream version. + + -- SZALAY Attila Thu, 29 May 2003 16:02:52 +0200 + +zorp (2.0.3.4-1) zorp20gpl; urgency=low + + * New upstream version. + * Recompile with openssl 0.9.7 Closes: #187790 + * Remove dead include in Authentication + (it's only in commercial version) Closes: #187550 + + -- SZALAY Attila Tue, 27 May 2003 23:08:21 +0200 + +zorp (2.0.2.12-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Sat, 26 Apr 2003 16:50:36 +0200 + +zorp (2.0.2-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Thu, 6 Mar 2003 21:30:51 +0100 + +zorp (2.0.0-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Tue, 28 Jan 2003 19:32:36 +0100 + +zorp (2.0rc3-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Mon, 27 Jan 2003 12:03:34 +0100 + +zorp (2.0rc2-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Tue, 21 Jan 2003 16:02:20 +0100 + +zorp (2.0pre28-2) unstable; urgency=low + + * Build-depend on libcap-dev. Closes: #171382 + * Untar html documentation, and register it in doc-base. + It's happend in 2.0pre28-1, but I forgot to write. Closes: #170265 + * Fix doc-base template. Closes: #171026 + + -- SZALAY Attila Tue, 3 Dec 2002 06:06:08 +0100 + +zorp (2.0pre28-1) unstable; urgency=low + + * News upstream version. + + -- Szalay Attila Thu, 28 Nov 2002 16:34:07 +0100 + +zorp (2.0pre26-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Mon, 25 Nov 2002 19:10:32 +0100 + +zorp (2.0pre25-1) unstable; urgency=low + + * New upstream version. + + -- Szalay Attila Tue, 19 Nov 2002 16:48:55 +0100 + +zorp (2.0pre21-1) unstable; urgency=low + + * New upstream version. + + -- SZALAY Attila Sat, 2 Nov 2002 00:20:16 +0100 + +zorp (2.0pre1-1) unstable; urgency=low + + * New upstream version. + + -- SZALAY Attila Sun, 27 Oct 2002 09:23:58 +0100 + +zorp (1.5.2-1) unstable; urgency=low + + * Initial release + -- Szalay Attila Sat, 17 Aug 2002 14:13:14 +0200 --- zorp-3.3.6.orig/debian/libzorp-dev.debhelper.log +++ zorp-3.3.6/debian/libzorp-dev.debhelper.log @@ -0,0 +1,15 @@ +dh_installdirs +dh_movefiles +dh_installdocs +dh_installchangelogs +dh_link +dh_strip +dh_compress +dh_fixperms +dh_makeshlibs +dh_pysupport +dh_installdeb +dh_shlibdeps +dh_gencontrol +dh_md5sums +dh_builddeb --- zorp-3.3.6.orig/debian/libzorp0.files +++ zorp-3.3.6/debian/libzorp0.files @@ -0,0 +1,2 @@ +usr/lib/libzorp.so.* +usr/lib/libzorpproxy.so.* --- zorp-3.3.6.orig/debian/rules +++ zorp-3.3.6/debian/rules @@ -6,7 +6,6 @@ #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=3 DDEBUG=`if (echo $(DEB_BUILD_OPTIONS) | grep -q debug) then \ echo "--enable-debug"; \ @@ -23,7 +22,7 @@ build-stamp: dh_testdir - CFLAGS=$(DTEST) ./configure \ + ZORP_PACKAGE_LICENSE="gpl" CFLAGS=$(DTEST) ./configure \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ @@ -43,15 +42,11 @@ debfiles-stamp: echo -n "" > debian/zorp-modules.files - echo -n "" > debian/zorp-modules.conffiles for i in `cat module.list` x; do \ if test "$$i" != "x"; then \ if test -r modules/$$i/debian/zorp-pro-modules.files; then \ cat modules/$$i/debian/zorp-pro-modules.files >> debian/zorp-modules.files; \ fi; \ - if test -r modules/$$i/debian/zorp-pro-modules.conffiles; then \ - cat modules/$$i/debian/zorp-pro-modules.conffiles >> debian/zorp-modules.conffiles; \ - fi; \ fi; \ done; touch debfiles-stamp @@ -62,9 +57,13 @@ rm -f build-stamp rm -f modules/config-stamp rm -f debfiles-stamp + -rm debian/zorp-modules.files + -rm debian/zorp-modules.conffiles + + -rm config.log # Add here commands to clean up after the build process. - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean @@ -80,36 +79,22 @@ dh_movefiles mkdir -p `pwd`/debian/zorp-tests/usr/share/zorp/testdb cp -r tests/functional/* `pwd`/debian/zorp-tests/usr/share/zorp/testdb/ - (cd pylib/kznf && python2.4 setup.py install --prefix ../../debian/python-kzorp/usr) + (cd pylib/kznf && python setup.py install --prefix ../../debian/python-kzorp/usr) # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. -# dh_testversion -i dh_testdir -i dh_testroot -i -# dh_installdebconf -i dh_installdocs -i -# dh_installexamples -i -# dh_installmenu -i -# dh_installemacsen -i -# dh_installpam -i -# dh_installinit -i --package=zorp -# dh_installcron -i -# dh_installmanpages -# dh_installinfo -i dh_installchangelogs -i -#-k NEWS dh_link -i - dh_strip -i + dh_lintian -i dh_compress -i dh_fixperms -i - # You may want to make some executables suid here. - dh_suidregister -i -# dh_makeshlibs -i + dh_pysupport -i /usr/share/zorp dh_installdeb -i -# dh_perl -i dh_shlibdeps -i dh_gencontrol -i dh_md5sums -i @@ -117,35 +102,32 @@ # Build architecture-dependent files here. binary-arch: build install -# dh_testversion -a dh_testdir -a dh_testroot -a -# dh_installdebconf -a -# dh_installdocs --package=zorp-doc -# dh_installexamples -a -# dh_installmenu -a -# dh_installemacsen -a -# dh_installpam -a + dh_installdocs -a + rm debian/zorp/usr/share/doc/zorp/INSTALL dh_installinit --package=zorp -# dh_installcron -a - dh_installmanpages --package=zorp zorp.8 zorpctl.8 instances.conf.5 -# dh_installinfo -a + dh_installman --package=zorp doc/man/zorp.8 doc/man/zorpctl.8 doc/man/instances.conf.5 + dh_installman --package=libzorp0-dev doc/man/zorp-config.1 + dh_installchangelogs -a -#-k NEWS dh_link -a + dh_lintian -a dh_strip -a dh_compress -a dh_fixperms -a - chmod 700 `pwd`/debian/zorp/etc/zorp # You may want to make some executables suid here. -# dh_suidregister -a -# dh_makeshlibs -a + chmod 700 `pwd`/debian/zorp/etc/zorp + dh_makeshlibs -n + dh_makeshlibs -plibzorp0 -V + dh_pysupport -a /usr/share/zorp + dh_pysupport -p zorp-modules dh_installdeb -a -# dh_perl -a - dh_shlibdeps -a -l`pwd`/debian/zorp-lib/usr/lib:`pwd`/debian/zorp/usr/lib + dh_shlibdeps -a -Llibzorp0 -l`pwd`/debian/libzorp0/usr/lib dh_gencontrol -a dh_md5sums -a dh_builddeb -a + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install --- zorp-3.3.6.orig/debian/libzorp-dev.substvars +++ zorp-3.3.6/debian/libzorp-dev.substvars @@ -0,0 +1 @@ +misc:Depends= --- zorp-3.3.6.orig/debian/zorp.lintian-overrides +++ zorp-3.3.6/debian/zorp.lintian-overrides @@ -0,0 +1 @@ +zorp: non-standard-dir-perm etc/zorp/ 0700 != 0755 --- zorp-3.3.6.orig/debian/zorp.files +++ zorp-3.3.6/debian/zorp.files @@ -26,7 +26,5 @@ usr/share/zorp/pylib/Zorp/Zorp.py usr/share/zorp/pylib/Zorp/KZorp.py usr/share/zorp/pylib/Zorp/__init__.py -usr/lib/libzorp.so.* -usr/lib/libzorpproxy.so.* usr/lib/zorp/zorp usr/share/zorp/policy.boot --- zorp-3.3.6.orig/debian/libzorp2.debhelper.log +++ zorp-3.3.6/debian/libzorp2.debhelper.log @@ -0,0 +1,3 @@ +dh_makeshlibs +dh_makeshlibs +dh_makeshlibs --- zorp-3.3.6.orig/debian/copyright +++ zorp-3.3.6/debian/copyright @@ -1,11 +1,28 @@ -This program downloaded from BalaBit CVS directly so it's -may be newer than any public site. You may download this program from http://www.balabit.hu/downloads/zorp/ -Upstream Author(s): Scheidler Balzs +Upstream Author: Balázs Scheidler, Attila Szalay and more... -Copyright: GNU/GPL + permission to use OpenSSL +Copyright: 2000-2010 BalaBit IT Kft. -The full text of the GPL is available at /usr/share/common-licenses/GPL-2 + +This program is licensed under GNU/GPL with a special exception to link +with OpenSSL. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License with +the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; +if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth +Floor, Boston, MA 02110-1301, USA. + +The Debian packaging is (C) 2010, SZALAY Attila and +is licensed under the GPL, see above. --- zorp-3.3.6.orig/debian/README.Debian +++ zorp-3.3.6/debian/README.Debian @@ -0,0 +1,10 @@ +Zorp for DEBIAN +--------------- + +I know that the documentation is very poor, +we are working on it. + +If you have question with Zorp firewall and not +the Debianization, please use +http://lists.balabit.hu/mailman/listinfo/zorp mail +list. --- zorp-3.3.6.orig/debian/libzorp0-dev.files +++ zorp-3.3.6/debian/libzorp0-dev.files @@ -0,0 +1,4 @@ +usr/include/zorp +usr/bin/zorp-config +usr/lib/libzorp.so +usr/lib/libzorp.la --- zorp-3.3.6.orig/debian/compat +++ zorp-3.3.6/debian/compat @@ -0,0 +1 @@ +5 --- zorp-3.3.6.orig/debian/zorp-doc.doc-base.reference +++ zorp-3.3.6/debian/zorp-doc.doc-base.reference @@ -1,14 +1,15 @@ Document: zorp Title: Zorp Application Level firewall Reference Guide Author: Balazs Scheidler -Section: Apps/Net -Format: HTML -Index: /usr/share/doc/zorp-doc/html/zorp-reference/book1.html -Files: /usr/share/doc/zorp-doc/html/zorp-reference/book1.html Abstract: Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions are scriptable with the Python based configuration language. +Section: Network/Monitoring + +Format: HTML +Index: /usr/share/doc/zorp-doc/html/zorp-reference/book1.html +Files: /usr/share/doc/zorp-doc/html/zorp-reference/book1.html --- zorp-3.3.6.orig/debian/instances.conf +++ zorp-3.3.6/debian/instances.conf @@ -0,0 +1,12 @@ +############################################################################ +# +# This file lists the Zorp instances you want to run. +# +# The instance name and arguments _must_ be separated by spaces instead +# of tabs! Otherwise zorpctl will stop working. + +# This is a commented out example only! You should configure your own rules. + +#instance arguments +#zorp_http --verbose=5 --policy /etc/zorp/policy-http.py +#zorp_plug --policy /etc/zorp/policy-plug.py --- zorp-3.3.6.orig/debian/zorp.init +++ zorp-3.3.6/debian/zorp.init @@ -1,4 +1,11 @@ #! /bin/sh +### BEGIN INIT INFO +# Provides: zorp +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. --- zorp-3.3.6.orig/debian/control +++ zorp-3.3.6/debian/control @@ -2,13 +2,14 @@ Section: net Priority: optional Maintainer: SZALAY Attila -Standards-Version: 3.5.6 -Build-Depends: python-dev (>= 2.4), libssl-dev (>= 0.9.7), libglib2.0-dev (>= 2.2.1), libzorpll-dev (>= 3.3.0.0), debhelper, libcap-dev, python-dns, gperf +Standards-Version: 3.9.0 +Build-Depends: python-dev (>= 2.4), libssl-dev (>= 0.9.7), libglib2.0-dev (>= 2.2.1), libzorpll-dev (>= 3.3.0.0), debhelper (>= 6.0.7~), libcap-dev, python-support (>= 0.4), gperf Package: zorp Section: net Architecture: any -Depends: ${shlibs:Depends}, zorp-modules (= ${Source-Version}) +Depends: ${shlibs:Depends}, zorp-modules (= ${binary:Version}), adduser, ${misc:Depends} +Suggests: zorp-doc Description: An advanced protocol analyzing firewall Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, @@ -27,22 +28,24 @@ real life situations we saturated a 10MBit internet link with 500 parallel sessions. -Package: zorp-dev -Section: devel +Package: libzorp0-dev +Section: libdevel Architecture: any -Depends: python-dev (>= 1.5.2), zorp (= ${Source-Version}), libzorpll-dev -Description: Development files needed to compile Zorp modules. +Depends: python-dev (>= 2.4), libzorpll-dev, libzorp0 (= ${binary:Version}), ${misc:Depends} +Conflicts: zorp-dev +Description: Development files needed to compile Zorp modules Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions are scriptable with the Python based configuration language. . - Development files needed to compile Zorp modules. + These are the files you need to compile a zorp module. Package: zorp-modules Section: net Architecture: any -Depends: ${shlibs:Depends}, zorp (= ${Source-Version}) +Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Recommends: zorp (= ${binary:Version}) Description: Default proxy modules for Zorp Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, @@ -55,33 +58,36 @@ Package: zorp-doc Section: doc Architecture: all -Description: Zorp documentation. +Depends: ${misc:Depends} +Description: Zorp documentation Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions . Zorp documentation and examples. -Package: zorp-tests -Section: doc -Architecture: all -Description: Zorp functional testcases. + +Package: libzorp0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: zorp-dev +Replaces: libzorp2 +Breaks: libzorp2 +Description: The runtime library of Zorp Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions . - Zorp functional testcases. + The library needed to run zorp. Package: python-kzorp Architecture: all -Depends: ${python:Depends} -Replaces: python-kzorp -Provides: python-kzorp, virtual-python-kzorp -Conflicts: python-kzorp, virtual-python-kzorp +Section: python +Depends: ${python:Depends}, ${misc:Depends} Description: Python bindings for kzorp. Zorp is a new generation firewall. It is essentially a transparent proxy firewall, with strict protocol analyzing proxies, a modular architecture, and fine-grained control over the mediated traffic. Configuration decisions . General python bindings for kzorp. - --- zorp-3.3.6.orig/debian/libzorp.debhelper.log +++ zorp-3.3.6/debian/libzorp.debhelper.log @@ -0,0 +1,15 @@ +dh_installdirs +dh_movefiles +dh_installdocs +dh_installchangelogs +dh_link +dh_strip +dh_compress +dh_fixperms +dh_makeshlibs +dh_pysupport +dh_installdeb +dh_shlibdeps +dh_gencontrol +dh_md5sums +dh_builddeb --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/README.txt +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/README.txt @@ -0,0 +1,3 @@ + +This directory contains the Testcase Database suitable for ZTS (Zorp Test +System) for processing. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/info @@ -0,0 +1 @@ +Base-Class: TelnetProxyStrict --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/info @@ -0,0 +1 @@ +Tags: attr --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/cases/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/cases/timeout.tests @@ -0,0 +1,43 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + self.option["*"] = TELNET_OPT_ACCEPT + self.negotiation["1"] = 2 + self.negotiation["3"] = TELNET_NEG_NONE + self.timeout = 3000 +EndPolicy + +IAC=255 +SE=240 +SB=250 +WILL=251 +WONT=252 +DO=253 +DONT=254 + +SEND=1 +IS=0 +INFO=2 + +VAR=0 +VALUE=1 +ESC=2 +USERVAR=3 + +C2P: IAC +A=time.sleep(6) +C2P: 3 "Negy" +P2S: Disconnect +. + +C2P: IAC 3 "Negy" +P2S: IAC 3 "Negy" +S2P: IAC +A=time.sleep(6) +S2P: 3 "Ot" +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/attr/cases/testcases @@ -0,0 +1,109 @@ + +#### StartPolicy ############################################################### + +StartPolicy + def config(self): + TelnetProxyStrict.config(self) + self.option[TELNET_ENVIRONMENT, TELNET_SB_IS] = (TELNET_OPT_POLICY, self.rewriteVar) + self.timeout = 120000 + def rewriteVar(self, option, name, value): + if self.current_var_name == "DISPLAY": + self.current_var_value = "rewritten:0" + return TELNET_OPT_ACCEPT +EndPolicy + +IAC=255 +SE=240 +SB=250 +WILL=251 +WONT=252 +DO=253 +DONT=254 + +EOR=239 + +SEND=1 +IS=0 +INFO=2 + +VAR=0 +VALUE=1 +ESC=2 +USERVAR=3 + +# policy rewrite +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: IAC SB 39 SEND VAR "DISPLAY" IAC SE +P2S: IAC SB 39 SEND VAR "DISPLAY" IAC SE +S2P: IAC SB 39 IS VAR "DISPLAY" VALUE "durin:0" IAC SE +P2C: IAC SB 39 IS VAR "DISPLAY" VALUE "rewritten:0" IAC SE +. + +# big data chunk +C2P: IAC DO 25 +P2S: IAC DO 25 +S2P: IAC WILL 25 +P2C: IAC WILL 25 +C2P: IAC WILL 25 +P2S: IAC WILL 25 +S2P: IAC DO 25 +P2C: IAC DO 25 +C2P: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" IAC EOR +P2S: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" IAC EOR +. + +# policy rewrite - on block boundary +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" IAC SB 39 SEND VAR "DISPLAY" IAC SE +P2S: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" IAC SB 39 SEND VAR "DISPLAY" IAC SE +S2P: "lecso" +P2C: "lecso" +. + +StartPolicy + def config(self): + TelnetProxyStrict.config(self) + self.timeout = 2000 +EndPolicy + +# policy rewrite +C2P: IAC DO 39 +P2S: IAC DO 39 +A= time.sleep(3) +S2P: IAC WILL 39 +###. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/func/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/func/cases/testcases @@ -0,0 +1,397 @@ + +#### StartPolicy ############################################################### + +StartPolicy + def config(self): + TelnetProxyStrict.config(self) +EndPolicy + +#Option negotiation testing +# - in which states are options allowed to pass +# +#Suboption negotiation testing +# - null suboption sequence +# - too long suboption sequence +# - suboption sequence for not accepted option +# +#Policy logic testing +# - DENY, ACCEPT, ABORT +# - POLICY + +IAC=255 +SE=240 +SB=250 +WILL=251 +WONT=252 +DO=253 +DONT=254 + +SEND=1 +IS=0 +INFO=2 + +VAR=0 +VALUE=1 +ESC=2 +USERVAR=3 + +# ------------------ +# general checks +# ------------------ + +# escaped bytes + +C2P: "alma" IAC IAC DO 1 "korte" +P2S: "alma" IAC IAC DO 1 "korte" +S2P: "korte" IAC IAC WILL 1 "korte" +P2C: "korte" IAC IAC WILL 1 "korte" +C2P: "alma" IAC SB 1 "a" IAC SE "korte" +P2S: "alma" "korte" +S2P: "alma" IAC SB 1 "a" IAC SE "korte" +P2C: "alma" "korte" +. +# ------------------ +# overflow checks +# ------------------ + +# too long suboption negotiation +C2P: IAC DO 1 +P2S: IAC DO 1 +S2P: IAC WILL 1 +P2C: IAC WILL 1 +C2P: "alma" IAC SB 1 "a"x8192 IAC SE "korte" +P2S: "alma" +P2C: Disconnect +. +# ------------------ +# options +# ------------------ + +C2P: "alma" IAC 1 "korte" +P2S: "alma" "korte" +. +#C2P: IAC DO 1 +#P2S: IAC DO 1 +#S2P: IAC WILL 1 +#P2C: IAC WILL 1 +#C2P: "alma" IAC SB 1 "aa" IAC SE "korte" +#P2S: "alma" IAC SB 1 "aa" IAC SE "korte" +# +#C2P: IAC DO 1 +#P2S: IAC DO 1 +#S2P: IAC WONT 1 +#P2C: IAC WONT 1 +#C2P: "alma" IAC SB 1 "aa" IAC SE "korte" +#P2S: "alma" "korte" +# +#C2P: IAC DO 1 +#P2S: IAC DO 1 +#C2P: "alma" IAC SB 1 "aa" IAC SE "korte" +#P2S: "alma" "korte" + +# ------------------ +# suboption negotiation +# ------------------ + +# new environment option +# ------------------ +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "alma" IAC SB 39 SEND VAR "USER" VAR "ACCT" IAC SE "korte" +P2S: "alma" IAC SB 39 SEND VAR "USER" VAR "ACCT" IAC SE "korte" +S2P: "korte" IAC SB 39 IS VAR "USER" VALUE "joe" VAR "ACCT" VALUE "kernel" IAC SE "alma" +P2C: "korte" IAC SB 39 IS VAR "USER" VALUE "joe" VAR "ACCT" VALUE "kernel" IAC SE "alma" +. +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "alma" IAC SB 39 8 VAR "USER" VAR "ACCT" IAC SE "korte" +P2S: "alma" "korte" +. +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "alma" IAC SB 39 IS VAR "USER" VALUE "joe" IAC SE "korte" +P2S: "alma" "korte" +. +# which side may send IS or SEND +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "alma" IAC SB 39 IS VAR "USER" VALUE "joe" IAC SE "korte" +P2S: "alma" "korte" +S2P: "alma" IAC SB 39 SEND IAC SE "korte" +P2C: "alma" "korte" +. +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: "alma" IAC SB 39 SEND VAR "USER" VAR "ACCT" IAC SE "korte" +P2S: "alma" IAC SB 39 SEND VAR "USER" VAR "ACCT" IAC SE "korte" +S2P: "alma" IAC SB 39 IS VAR "USER" VALUE "joe" VALUE "err" IAC SE "korte" +P2C: "alma" IAC SB 39 IS VAR "USER" VALUE "joe" IAC SE "korte" +. +# terminal type option +# ------------------ +C2P: IAC WILL 24 +P2S: IAC WILL 24 +S2P: IAC DO 24 +P2C: IAC DO 24 +S2P: "alma" IAC SB 24 SEND IAC SE "korte" +P2C: "alma" IAC SB 24 SEND IAC SE "korte" +C2P: "alma" IAC SB 24 IS "xterm" IAC SE "korte" +P2S: "alma" IAC SB 24 IS "xterm" IAC SE "korte" +. +C2P: IAC WILL 24 +P2S: IAC WILL 24 +S2P: IAC DO 24 +P2C: IAC DO 24 +S2P: "alma" IAC SB 24 8 IAC SE "korte" +P2C: "alma" "korte" +. +C2P: IAC WILL 24 +P2S: IAC WILL 24 +S2P: IAC DO 24 +P2C: IAC DO 24 +S2P: "alma" IAC SB 24 SEND IAC SE "korte" +P2C: "alma" IAC SB 24 SEND IAC SE "korte" +C2P: "alma" IAC SB 24 IS "//" IAC SE "korte" +P2S: "alma" "korte" +. +# which side may send IS or SEND +C2P: IAC WILL 24 +P2S: IAC WILL 24 +S2P: IAC DO 24 +P2C: IAC DO 24 +S2P: "alma" IAC SB 24 IS "xterm" IAC SE "korte" +P2C: "alma" "korte" +C2P: "alma" IAC SB 24 SEND IAC SE "korte" +P2S: "alma" "korte" +. +C2P: IAC WILL 24 +P2S: IAC WILL 24 +S2P: IAC DO 24 +P2C: IAC DO 24 +S2P: "alma" IAC SB 24 SEND IAC SE "korte" +P2C: "alma" IAC SB 24 SEND IAC SE "korte" +C2P: "alma" IAC SB 24 IS IAC SE "korte" +P2S: "alma" IAC SB 24 IS IAC SE "korte" +. +# terminal speed +# ------------------ +C2P: IAC WILL 32 +P2S: IAC WILL 32 +S2P: IAC DO 32 +P2C: IAC DO 32 +S2P: "alma" IAC SB 32 SEND IAC SE "korte" +P2C: "alma" IAC SB 32 SEND IAC SE "korte" +C2P: "alma" IAC SB 32 IS "1200,1200" IAC SE "korte" +P2S: "alma" IAC SB 32 IS "1200,1200" IAC SE "korte" +. +C2P: IAC WILL 32 +P2S: IAC WILL 32 +S2P: IAC DO 32 +P2C: IAC DO 32 +S2P: "alma" IAC SB 32 8 IAC SE "korte" +P2C: "alma" "korte" +. +C2P: IAC WILL 32 +P2S: IAC WILL 32 +S2P: IAC DO 32 +P2C: IAC DO 32 +S2P: "alma" IAC SB 32 SEND IAC SE "korte" +P2C: "alma" IAC SB 32 SEND IAC SE "korte" +C2P: "alma" IAC SB 32 IS "aa" IAC SE "korte" +P2S: "alma" "korte" +. +# which side may send IS or SEND +C2P: IAC WILL 32 +P2S: IAC WILL 32 +S2P: IAC DO 32 +P2C: IAC DO 32 +S2P: "alma" IAC SB 32 IS "1300,1300" IAC SE "korte" +P2C: "alma" "korte" +C2P: "alma" IAC SB 32 SEND IAC SE "korte" +P2S: "alma" "korte" +. +C2P: IAC WILL 32 +P2S: IAC WILL 32 +S2P: IAC DO 32 +P2C: IAC DO 32 +S2P: "alma" IAC SB 32 SEND IAC SE "korte" +P2C: "alma" IAC SB 32 SEND IAC SE "korte" +C2P: "alma" IAC SB 32 IS IAC SE "korte" +P2S: "alma" IAC SB 32 IS IAC SE "korte" +. +# X display location +# ------------------ +C2P: IAC WILL 35 +P2S: IAC WILL 35 +S2P: IAC DO 35 +P2C: IAC DO 35 +S2P: "alma" IAC SB 35 SEND IAC SE "korte" +P2C: "alma" IAC SB 35 SEND IAC SE "korte" +C2P: "alma" IAC SB 35 IS "thorin:0" IAC SE "korte" +P2S: "alma" IAC SB 35 IS "thorin:0" IAC SE "korte" +. +C2P: IAC WILL 35 +P2S: IAC WILL 35 +S2P: IAC DO 35 +P2C: IAC DO 35 +S2P: "alma" IAC SB 32 8 IAC SE "korte" +P2C: "alma" "korte" +. +C2P: IAC WILL 35 +P2S: IAC WILL 35 +S2P: IAC DO 35 +P2C: IAC DO 35 +S2P: "alma" IAC SB 35 SEND IAC SE "korte" +P2C: "alma" IAC SB 35 SEND IAC SE "korte" +C2P: "alma" IAC SB 35 IS "!dead" IAC SE "korte" +P2S: "alma" "korte" +. +# which side may send IS or SEND +C2P: IAC WILL 35 +P2S: IAC WILL 35 +S2P: IAC DO 35 +P2C: IAC DO 35 +S2P: "alma" IAC SB 35 IS "thorin:0" IAC SE "korte" +P2C: "alma" "korte" +C2P: "alma" IAC SB 35 SEND IAC SE "korte" +P2S: "alma" "korte" +. +C2P: IAC WILL 35 +P2S: IAC WILL 35 +S2P: IAC DO 35 +P2C: IAC DO 35 +S2P: "alma" IAC SB 35 SEND IAC SE "korte" +P2C: "alma" IAC SB 35 SEND IAC SE "korte" +C2P: "alma" IAC SB 35 IS IAC SE "korte" +P2S: "alma" IAC SB 35 IS IAC SE "korte" +. +# NAWS +# ------------------ +C2P: IAC WILL 31 +P2S: IAC WILL 31 +S2P: IAC DO 31 +P2C: IAC DO 31 +C2P: "alma" IAC SB 31 00 80 00 25 IAC SE "korte" +P2S: "alma" IAC SB 31 00 80 00 25 IAC SE "korte" +. +C2P: IAC WILL 31 +P2S: IAC WILL 31 +S2P: IAC DO 31 +P2C: IAC DO 31 +C2P: "alma" IAC SB 31 00 255 255 00 25 IAC SE "korte" +P2S: "alma" IAC SB 31 00 255 255 00 25 IAC SE "korte" +. +C2P: IAC WILL 31 +P2S: IAC WILL 31 +S2P: IAC DO 31 +P2C: IAC DO 31 +C2P: "alma" IAC SB 31 12 34 IAC SE "korte" +P2S: "alma" "korte" +. +# which side may send IS or SEND +C2P: IAC WILL 31 +P2S: IAC WILL 31 +S2P: IAC DO 31 +P2C: IAC DO 31 +S2P: "alma" IAC SB 31 00 80 00 25 IAC SE "korte" +P2C: "alma" "korte" +. +# ------------------ +# policy +# ------------------ +# these testcases should be run using the following policy +# class MyTelnetProxy(TelnetProxy): + +#### StartPolicy ############################################################### + +StartPolicy + def config(self): + self.option[TELNET_ENVIRONMENT, TELNET_SB_IS] = (TELNET_OPT_POLICY, self.rewriteVar) + self.option[TELNET_ENVIRONMENT, TELNET_SB_SEND] = TELNET_OPT_ACCEPT + self.option[TELNET_TERMINAL_TYPE] = TELNET_OPT_ABORT + self.option[TELNET_TERMINAL_SPEED] = TELNET_OPT_DROP + self.option[TELNET_ENVIRONMENT] = TELNET_OPT_ACCEPT + self.option["101"] = TELNET_OPT_ACCEPT + self.option["101", "*"] = TELNET_OPT_DROP + self.option["101", "1"] = TELNET_OPT_ACCEPT + self.option["101", "2"] = TELNET_OPT_ABORT + self.option["102"] = TELNET_OPT_REJECT + + def rewriteVar(self, option, name, value): + if name == "DISPLAY": + self.current_var_value = "rewritten:0" + return TELNET_OPT_ACCEPT +EndPolicy + +# policy accept +C2P: IAC DO 101 +P2S: IAC DO 101 +S2P: IAC WILL 101 +P2C: IAC WILL 101 +C2P: "korte" IAC SB 101 1 "Nessa" IAC SE "alma" +P2S: "korte" IAC SB 101 1 "Nessa" IAC SE "alma" +S2P: "korte" IAC SB 101 1 "Nienna" IAC SE "alma" +P2C: "korte" IAC SB 101 1 "Nienna" IAC SE "alma" +#policy SB DENY +C2P: "korte" IAC SB 101 "Nessa" IAC SE "alma" +P2S: "korte" "alma" +S2P: "korte" IAC SB 101 "Nienna" IAC SE "alma" +P2C: "korte" "alma" +. +#policy SB REJECT +C2P: IAC DO 102 +P2C: IAC WONT 102 +P2S: IAC DONT 102 +S2P: IAC WILL 102 +P2S: IAC DONT 102 +P2C: IAC WONT 102 +. +# policy deny +C2P: IAC WILL 32 +S2P: IAC DO 32 +. +# policy abort (these should abort the session) +C2P: IAC WILL 24 +P2C: Disconnect +. +S2P: IAC WILL 24 +P2S: Disconnect +. +C2P: IAC WONT 24 +P2C: Disconnect +. +S2P: IAC WONT 24 +P2S: Disconnect +. +C2P: IAC DO 24 +P2C: Disconnect +. +S2P: IAC DO 24 +P2S: Disconnect +. +C2P: IAC DONT 24 +P2C: Disconnect +. +S2P: IAC DONT 24 +P2S: Disconnect +. +# policy rewrite +C2P: IAC DO 39 +P2S: IAC DO 39 +S2P: IAC WILL 39 +P2C: IAC WILL 39 +C2P: IAC SB 39 SEND VAR "DISPLAY" IAC SE +P2S: IAC SB 39 SEND VAR "DISPLAY" IAC SE +S2P: IAC SB 39 IS VAR "DISPLAY" VALUE "durin:0" IAC SE +P2C: IAC SB 39 IS VAR "DISPLAY" VALUE "rewritten:0" IAC SE +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/commands/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/commands/info @@ -0,0 +1,2 @@ +Tags: negotiation +Min-Version: 3.0 --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/telnet/commands/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/telnet/commands/cases/testcases @@ -0,0 +1,77 @@ + +#### StartPolicy ############################################################### + +StartPolicy + def config(self): + self.option["*"] = TELNET_OPT_ACCEPT + self.negotiation["1"] = 2 + self.negotiation["3"] = TELNET_NEG_NONE +EndPolicy + +IAC=255 +SE=240 +SB=250 +WILL=251 +WONT=252 +DO=253 +DONT=254 + +SEND=1 +IS=0 +INFO=2 + +VAR=0 +VALUE=1 +ESC=2 +USERVAR=3 + +# Check command 1 /only accept if option 2 negotated / +C2P: IAC WILL 2 +P2S: IAC WILL 2 +S2P: IAC DO 2 +P2C: IAC DO 2 +C2P: IAC 1 "Egy" +P2S: IAC 1 "Egy" +. + +C2P: IAC WILL 1 +P2S: IAC WILL 1 +S2P: IAC DO 1 +P2C: IAC DO 1 +C2P: IAC 1 "Ketto" +P2S: "Ketto" +. + +C2P: IAC WILL 3 +P2S: IAC WILL 3 +S2P: IAC DO 3 +P2C: IAC DO 3 +C2P: IAC 1 "Harom" +P2S: "Harom" +. + +# Check command 3. / It's must accept without negotiation / +C2P: IAC 3 "Negy" +P2S: IAC 3 "Negy" +S2P: IAC 3 "Ot" +P2C: IAC 3 "Ot" +. + +# Check command 3 / It's accept, when option 3 negotiated / +C2P: IAC WILL 4 +P2S: IAC WILL 4 +S2P: IAC DO 4 +P2C: IAC DO 4 +C2P: IAC 4 "Hat" +P2S: IAC 4 "Hat" +S2P: IAC 4 "Het" +P2C: "Het" +. + +C2P: IAC WILL 5 +P2S: IAC WILL 5 +S2P: IAC DO 5 +P2C: IAC DO 5 +C2P: IAC 4 "Nyolc" +P2S: "Nyolc" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/info @@ -0,0 +1,3 @@ +Description: HTTP test suite +Min-Version: 0.6 +Base-Class: HttpProxy --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/timeout.tests @@ -0,0 +1,35 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout = 3000 +EndPolicy + + +C2P: "GET /foo.html HTTP/1.1\r\n" +A=time.sleep(6) +C2P: "Host: www\r\n\ +\r\n" +P2C: "HTTP/1." $VER " 500" $NIHIL "\n" +P2C: Disconnect +. + + +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 7\r\n\ +\r\n" +A=time.sleep(6) +S2P: "aaaaa\r\n" +P2C: "HTTP/1." $VER " 500" $NIHIL "\n" +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/use_canonical.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/use_canonical.tests @@ -0,0 +1,64 @@ +StartGlobalInfo + Tags bug7318 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.use_canonicalized_urls = TRUE + self.transparent_mode = FALSE + self.parent_proxy = '1' + self.request["POST"] = (HTTP_REQ_POLICY, self.filterURL) + + def filterURL(self, method, url, version): + self.request_url = 'http://owa.domain.int/exch%61nge/' + return HTTP_REQ_ACCEPT +EndPolicy + +C2P: "GET http://www.kakukk.bu/valami%2ecgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +P2S: "GET http://www.kakukk.bu/valami.cgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +. + +C2P: "POST http://www.kakukk.bu/valami%2ecgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +P2S: "POST http://owa.domain.int/exchange/ HTTP/1.0\r\n\ +Host: owa.domain.int\r\n\ +\r\n" +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.use_canonicalized_urls = FALSE + self.transparent_mode = FALSE + self.parent_proxy = '1' + self.request["POST"] = (HTTP_REQ_POLICY, self.filterURL) + + def filterURL(self, method, url, version): + self.request_url = 'http://owa.domain.int/exch%61nge/' + return HTTP_REQ_ACCEPT +EndPolicy + + +C2P: "GET http://www.kakukk.bu/valami%2ecgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +P2S: "GET http://www.kakukk.bu/valami%2ecgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +. + +C2P: "POST http://www.kakukk.bu/valami%2ecgi HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +P2S: "POST http://owa.domain.int/exch%61nge/ HTTP/1.0\r\n\ +Host: owa.domain.int\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-unicode-url.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-unicode-url.tests @@ -0,0 +1,25 @@ +StartGlobalInfo + Tags unicode +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.permit_unicode_url = TRUE +EndPolicy + +C2P: "GET /var/www/inde%u0078.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +\r\n\ +123456789012" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/rejected-methods.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/rejected-methods.tests @@ -0,0 +1,21 @@ +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request["PUT"] = (HTTP_REQ_REJECT,) + self.request["GET"] = (HTTP_REQ_ABORT,) +EndPolicy + +C2P: "PUT /foo.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2C: "HTTP/1." $VER " 500" $NIHIL "\n" +. + +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2C: "HTTP/1." $VER " 500" $NIHIL "\n" +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/accepted-methods.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/accepted-methods.tests @@ -0,0 +1,260 @@ + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request["*"] = (HTTP_REQ_ACCEPT,) +EndPolicy + + +C2P: "OPTIONS /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "OPTIONS /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "GET /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "GET /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "HEAD /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "HEAD /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +# The response to a HEAD command *NEVER* contains an entity +# Bug #4060 +C2P: "HEAD /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "HEAD /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 1000\r\n\ +\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 1000\r\n\ +\r\n" +. + +C2P: "POST /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "POST /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "PUT /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "PUT /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "DELETE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "DELETE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +#C2P: "TRACE /index.html HTTP/1.1\r\n\ +#Host: www.foo.bar\r\n\ +#\r\n" +#P2S: "TRACE /index.html HTTP/1.1\r\n\ +#Host: www.foo.bar\r\n\ +#\r\n" +#. + +# TRACE request / entity doesn't present in request +#C2P: "TRACE /index.html HTTP/1.1\r\n\ +#Host: www.foo.bar\r\n\ +#Content-length: 13\r\n\ +#\r\n\ +#entitas teste" +#P2C: "TRACE /index.html HTTP/1.1\r\n\ +#Host: www.foo.bar\r\n\ +#Content-length: 13\r\n\ +#\r\n\" +#. + +C2P: "PATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "PATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "LINK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "LINK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "UNLINK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "UNLINK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "PROPFIND /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "PROPFIND /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "PROPPATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "PROPPATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "MKCOL /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "MKCOL /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "COPY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "COPY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "MOVE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "MOVE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "NOTIFY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "NOTIFY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "POLL /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "POLL /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "SEARCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "SEARCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "SUBSCRIBE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "SUBSCRIBE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "UNSUBSCRIBE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "UNSUBSCRIBE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "LOCK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "LOCK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "UNLOCK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "UNLOCK /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "BCOPY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "BCOPY /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "BDELETE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "BDELETE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "BMOVE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "BMOVE /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "BPROPFIND /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "BPROPFIND /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "BPROPPATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +P2S: "BPROPPATCH /index.html HTTP/1.1\r\n\ +Host: www.foo.bar\r\n\ +\r\n" +. + +C2P: "CONNECT www.foo.bar:443 HTTP/1.1\r\n\ +Host: www.foo.bar:443\r\n\ +\r\n" +P2C: "HTTP/1.0 200 Connection established\r\n\r\n" +. + + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/use_default_port.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/use_default_port.tests @@ -0,0 +1,107 @@ +StartGlobalInfo + Tags bug6315 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = TRUE + self.target_port_range = '108' + def setServerAddress(self, host, port): + if host == 'www.kakukk.bu' and port == 80: + return HttpProxy.setServerAddress(self, host, port) + proxyLog(self, CORE_DEBUG, 0, "incorrect server address; host='%s', port='%d'", (host, port)) + return None +EndPolicy + +C2P: "GET / HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = TRUE + self.use_default_port_in_transparent_mode = FALSE + self.target_port_range = '8080' + + def setServerAddress(self, host, port): + if host == 'www.kakukk.bu' and port == 8080: + return HttpProxy.setServerAddress(self, host, port) + proxyLog(self, CORE_DEBUG, 0, "incorrect server address; host='%s', port='%d'", (host, port)) + return None +EndPolicy + +C2P: "GET / HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +. + + +C2P: "GET / HTTP/1.0\r\n\ +Host: www.kakukk.bu:80\r\n\ +\r\n" +P2C: "HTTP/1.0 502 Error encountered\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +\n" $NIHIL "\n\n" +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = TRUE + self.parent_proxy = '1' + self.parent_proxy_port = 3128 + self.permit_proxy_requests = TRUE + + def setServerAddress(self, host, port): + if host == '1' and port == 3128: + return HttpProxy.setServerAddress(self, host, port) + proxyLog(self, CORE_DEBUG, 0, "incorrect server address; host='%s', port='%d'", (host, port)) + return None +EndPolicy + +C2P: "GET http://www.kakukk.bu:8080/ HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +P2S: "GET http://www.kakukk.bu:8080/ HTTP/1.0\r\n\ +Host: www.kakukk.bu:8080\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-invalid-hex-escape.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-invalid-hex-escape.tests @@ -0,0 +1,24 @@ +StartGlobalInfo + Tags qqq +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.permit_invalid_hex_escape = TRUE +EndPolicy + +C2P: "GET /web/v2/portal.nsf/kapcsolatok_hu?OpenView&ExpandView&Count=500%1%20x HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /web/v2/portal.nsf/kapcsolatok_hu?OpenView&ExpandView&Count=500%1%20x HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +\r\n\ +123456789012" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-both-conn-hdrs.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/permit-both-conn-hdrs.tests @@ -0,0 +1,97 @@ + +StartGlobalInfo + Tags bug4072 bug4250 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.permit_both_connection_headers = TRUE + self.permit_proxy_requests = TRUE +EndPolicy + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +. + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +Proxy-Connection: close\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +. + +C2P: "GET http://www.net.org/var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: close\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +Proxy-Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +. + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +Proxy-Connection: close\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Proxy-Connection: close\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: keep-alive\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/rewrite_url.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/rewrite_url.tests @@ -0,0 +1,29 @@ +StartGlobalInfo + Tags halaszg +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.max_url_length = 200 + self.parent_proxy = "172.16.80.1" + self.parent_proxy_port = 8080 + self.permit_proxy_requests = TRUE + self.rewrite_host_header = TRUE + self.request["GET"] = (HTTP_REQ_POLICY, self.filterURL) + self.transparent_mode = FALSE + def filterURL(self, method, url, version): + self.request_url = 'http://owa.domain.int/exchange/' + return HTTP_REQ_ACCEPT +EndPolicy + +C2P: "GET http://www.kakukk.bu/ HTTP/1.0\r\n\ +Host: www.kakukk.bu\r\n\ +\r\n" +P2S: "GET http://owa.domain.int/exchange/ HTTP/1.0\r\n\ +Host: owa.domain.int\r\n\ +\r\n" +. + + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/mime-type.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/mime-type.tests @@ -0,0 +1,61 @@ + +StartGlobalInfo + Tags bug4602 + Min-Version 3.0 +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request["POST"] = (HTTP_REQ_POLICY, self.checkMimeType) + self.response["POST", "404"] = (HTTP_RSP_POLICY, self.checkMimeTypeResp) + + def checkMimeType(self, method, url, version): + if self.request_mime_type != "ezegymimetipus": + return HTTP_REQ_REJECT + return HTTP_REQ_ACCEPT + + def checkMimeTypeResp(self, method, url, version, response): + if self.response_mime_type != "ezegymimetipus2": + return HTTP_RSP_REJECT + return HTTP_RSP_ACCEPT +EndPolicy + +QUOTE=chr(34) + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus; charset=" %QUOTE "utf8" %QUOTE "\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus; charset=" %QUOTE "utf8" %QUOTE "\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus2; charset=" %QUOTE "iso-8859-2" %QUOTE "\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus2; charset=" %QUOTE "iso-8859-2" %QUOTE "\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus; charset=" %QUOTE "utf8" %QUOTE "\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus; charset=" %QUOTE "utf8" %QUOTE "\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezmasmimetipus; charset=" %QUOTE "iso-8859-2" %QUOTE "\r\n\ +Content-Length: 6\r\n\ +\r\n\ +qwerty" +P2C: "HTTP/1.0 500 Error encountered\r\nConnection: close\r\n" $NIHIL "\n\n" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/policy-calls.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/policy-calls.tests @@ -0,0 +1,70 @@ + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request["GET"] = (HTTP_REQ_POLICY, self.filterURL) + def filterURL(self, method, url, version): + import re + log("http.message", 7, "url:%s" % url,) + if re.match(".*hubbabubba.*", url) != None: + self.request_url = "http://www.index.hu/index.html" + return HTTP_REQ_ACCEPT + +EndPolicy + + +C2P: "GET /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /index.html HTTP/1.1\r\n\ +Host: www.index.hu\r\n\ +\r\n" +. + +C2P: "GET /var/www/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +. + +# Keep-alive connection +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 35\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345elsofelesleg, sok-sok felesleg" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 35\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345elsofelesleg, sok-sok felesleg" + +C2P: "GET /var/www/index2.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index2.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 38\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345masodikfelesleg, sok-sok felesleg" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 38\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345masodikfelesleg, sok-sok felesleg" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/header-manip.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/policy/dynamic/header-manip.tests @@ -0,0 +1,181 @@ +StartGlobalInfo + Tags bug5559 + Min-Version 3.0 +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request["POST"] = (HTTP_REQ_POLICY, self.checkRequestHeaderManip) + self.response["POST", '404'] = (HTTP_REQ_POLICY, self.checkResponseHeaderManip) + self.strict_header_checking = FALSE + + def checkRequestHeaderManip(self, method, url, version): + if self.getRequestHeader('Content-Type') == 'ezegymimetipus01': + self.setRequestHeader('Content-Type', 'ezegymimetipus02') + return HTTP_REQ_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus03': + self.setRequestHeader('Kutykurutty', 'ezegymimetipus04') + return HTTP_REQ_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus05': + self.setResponseHeader('Content-Type', 'ezegymimetipus06') + return HTTP_REQ_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus07': + self.setRequestHeader('Content-Type', 'ezegymimetipus08') + return HTTP_REQ_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus13': + return HTTP_REQ_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus15': + return HTTP_REQ_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus07': + return HTTP_REQ_ACCEPT + return HTTP_REQ_REJECT + + def checkResponseHeaderManip(self, method, url, version, response): + if self.getResponseHeader('Content-Type') == 'ezegymimetipus09': + self.setResponseHeader('Content-Type', 'ezegymimetipus10') + return HTTP_RSP_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus11': + self.setResponseHeader('Kutyimutyi', 'ezegymimetipus12') + return HTTP_RSP_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus13': + self.setRequestHeader('Content-Type', 'ezegymimetipus14') + return HTTP_RSP_ACCEPT + elif self.getRequestHeader('Content-Type') == 'ezegymimetipus15': + self.setResponseHeader('Content-Type', 'ezegymimetipus16') + return HTTP_RSP_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus05': + return HTTP_RSP_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus07': + return HTTP_RSP_ACCEPT + elif self.getResponseHeader('Content-Type') == 'ezegymimetipus17': + return HTTP_RSP_ACCEPT + return HTTP_RSP_REJECT + +EndPolicy + +QUOTE=chr(34) + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus01\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus02\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus09\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus10\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus03\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus03\r\n\ +Kutykurutty: ezegymimetipus04\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus11\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus11\r\n\ +Content-Length: 5\r\n\ +Kutyimutyi: ezegymimetipus12\r\n\ +\r\n\ +12345" +. + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus05\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus05\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus05\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus05\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus07\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus07\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus07\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus07\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus13\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus13\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus13\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus13\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + +C2P: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus15\r\n\ +\r\n" +P2S: "POST /var/wwwhubbabubba/index3.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Type: ezegymimetipus15\r\n\ +\r\n" +S2P: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus17\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 404 OK\r\n\ +Content-Type: ezegymimetipus16\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/zero-sized-post.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/zero-sized-post.tests @@ -0,0 +1,54 @@ +StartGlobalInfo + Tags bug11057 +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request_stack["POST"] = (HTTP_STK_DATA, "/bin/cat") + self.request["PUT"] = (HTTP_REQ_ACCEPT) +EndPolicy + +# handle zero sized POST requests properly (stacking is requested) +C2P: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 0\r\n\ +\r\n" +P2S: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 0\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +. + +# handle zero sized PUT requests properly (stacking is not requested) +C2P: "PUT /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 0\r\n\ +\r\n" +P2S: "PUT /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 0\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/body-length-limit.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/body-length-limit.tests @@ -0,0 +1,95 @@ +StartGlobalInfo + Tags limits +EndGlobalInfo + + +# "Max length" scenarios +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.max_body_length = 10 + self.max_chunk_length = 8 +EndPolicy + +# explicit length + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +. + +# chunked length + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +4\r\n\ +1234\r\n\ +8\r\n\ +56789012\r\n\ +0\r\n\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +4\r\n\ +1234\r\n\ +6\r\n\ +567890\r\n\ +0\r\n\r\n" +. + +# no length + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +\r\n\ +123456789012" +P2C: "HTTP/1.0 200 OK\r\n\ +\r\n\ +1234567890" +. + +# max_chunk_length + +C2P: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 6\r\n\ +\r\n\ +haliho" +P2S: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 6\r\n\ +\r\n\ +haliho" +S2P: "HTTP/1.1 200 OK\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" + +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/negative-content-length.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/negative-content-length.tests @@ -0,0 +1,27 @@ +StartGlobalInfo + Tags bug8820 +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) +EndPolicy + +# fix length -> chunked conversion +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: -2\r\n\ +\r\n\ +1234567890" +S2P: Disconnect +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/no-content-length-hint.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/no-content-length-hint.tests @@ -0,0 +1,195 @@ +StartGlobalInfo + Tags bug18612 +EndGlobalInfo + +StartPolicy + def config(self): + self.response_stack["*"] = (HTTP_STK_DATA, "read;/bin/echo -en '0 RESULT\\\\nn[1]Handshake-Id\\\\nn0\\\\nn[2]Status\\\\nnOK\\\\nn\\\\nn0 SETVERDICT\\\\nn[8]Description\\\\nnAccepted\\\\nn[3]Details\\\\nnn/a\\\\nn[8]Verdict\\\\nnZ_ACCEPT\\\\nn\\\\nn'>&3; read alma <&3; /bin/echo -en '124'") + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# close, HTTP/1.0 + +C2P: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\r\n" + + +P2S: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\r\n" + + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" + + +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +124" +. + +# close, HTTP/1.1 + +C2P: "GET /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: close\r\n\r\n" + + +P2S: "GET /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: close\r\n\r\n" + + +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" + + +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +3\r\n\ +124\r\n\ +0\r\n\ +\r\n" +. + +# keepalive + GET, HTTP/1.0 + +C2P: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\r\n" + + +P2S: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\r\n" + + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" + +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +124" +. + +# keepalive + GET, HTTP/1.1 + +C2P: "GET /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\r\n" + + +P2S: "GET /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\r\n" + + +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" + + +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: keep-alive\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +3\r\n\ +124\r\n\ +0\r\n\ +\r\n" +. + +StartPolicy + def config(self): + self.request_stack["*"] = (HTTP_STK_DATA, "read;/bin/echo -en '0 RESULT\\\\nn[1]Handshake-Id\\\\nn0\\\\nn[2]Status\\\\nnOK\\\\nn\\\\nn0 SETVERDICT\\\\nn[8]Description\\\\nnAccepted\\\\nn[3]Details\\\\nnn/a\\\\nn[8]Verdict\\\\nnZ_ACCEPT\\\\nn\\\\nn'>&3; read alma <&3; /bin/echo -en '124'") + HttpProxy.config(self) + self.timeout_request=30000 + self.request["*"] = (HTTP_REQ_ACCEPT,) +EndPolicy + +# keepalive + PUT, HTTP/1.0 + +C2P: "PUT /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Content-Length: 6\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +123456" + + + +P2S: "PUT /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +3\r\n\ +124\r\n\ +0\r\n\ +\r\n" + + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" + +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +. + +# keepalive + PUT, HTTP/1.1 + +C2P: "PUT /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Content-Length: 6\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +123456" + + +P2S: "PUT /accept.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +3\r\n\ +124\r\n\ +0\r\n\ +\r\n" + + +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" + +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/upload-error-page.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/upload-error-page.tests @@ -0,0 +1,32 @@ +StartGlobalInfo + Tags bug8533 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request_stack["POST"] = (HTTP_STK_DATA, "/bin/cat >/dev/null; /bin/echo -en '0 SETVERDICT\\\\nn[]Verdict\\\\nnZ_REJECT\\\\nn[]Description\\\\nn Nem nyert\\\\nn\\\\nn'>&3; read alma <&3") + self.request_stack["HEAD"] = (HTTP_STK_DATA, "/bin/cat >/dev/null; /bin/echo -en '0 SETVERDICT\\\\nn[]Verdict\\\\nnZ_REJECT\\\\nn[]Description\\\\nn Nem nyert\\\\nn\\\\nn'>&3; read alma <&3") +EndPolicy + + +# When uploading is rejected send an errorpage to the client +C2P: "POST /var/www/eicar.com HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 68\r\n\ +\r\n\ +X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + +C2P: "HEAD /var/www/eicar.com HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 68\r\n\ +\r\n\ +X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" +P2C: "HTTP/1.0 500 Error encountered\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/chunked-encoding.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/chunked-encoding.tests @@ -0,0 +1,91 @@ +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +#SaSa test. +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: deflate, gzip, chunked, identity, trailers\r\n\ +Host: www.net.org\r\n\ +Connection: close\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: deflate, gzip, chunked, identity, trailers\r\n\ +Host: www.net.org\r\n\ +Connection: close\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +0\r\n\ +\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +0\r\n\ +\r\n" +. +# Chunked transfer coding +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: chunked\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: chunked\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +7\r\n\ +chunked\r\n\ +0\r\n\ +\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +7\r\n\ +chunked\r\n\ +0\r\n\ +\r\n" +. + +# ignored Content-Length +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: chunked\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +TE: chunked\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +Content-Length: 12\r\n\ +\r\n\ +4\r\n\ +1234\r\n\ +8\r\n\ +56789012\r\n\ +0\r\n\ +\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +4\r\n\ +1234\r\n\ +8\r\n\ +56789012\r\n\ +0\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/mime-stacked-content-length.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/mime-stacked-content-length.tests @@ -0,0 +1,58 @@ +StartGlobalInfo + Tags bug9529 + Min-Version 3.0 +EndGlobalInfo + +# FIXME: We need a testcase when http send a content length hint and receiving it back +# +#StartPolicy +# def config(self): +# HttpProxy.config(self) +# self.timeout_request=30000 +# self.response_stack["GET"] = (HTTP_STK_MIME, "/bin/cat >/dev/null; /bin/echo -en '0 SETCONTENTHINT\\\\nn[]Content-Length\\\\nn61\\\\nn\\\\nnSETVERDICT\\\\nn[]Verdict\\\\nnZ_ACCEPT\\\\nn\\\\nn'>&3; read alma <&3; /bin/echo -en 'Content-Type: text/plain\\\\rr\\\\nnContent-Length: 12\\\\rr\\\\nn\\\\rr\\\\nn123456789012'") +#EndPolicy +# +# +#C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +#Host: www.net.org\r\n\ +#\r\n" +#P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +#Host: www.net.org\r\n\ +#\r\n" +#S2P: "HTTP/1.1 200 OK\r\n\ +#Content-Type: text/plain\r\n\ +#Content-Length: 12\r\n\ +#\r\n\ +#123456789012" +#P2C: "HTTP/1.1 200 OK\r\n\ +#Content-Type: text/plain\r\n\ +#Content-Length: 12\r\n\ +#\r\n\ +#123456789012" +#. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.response_stack["*"] = (HTTP_STK_MIME, "/bin/cat >/dev/null; /bin/echo -en '0 SETCONTENTHINT\\\\nn[]Content-Length\\\\nn61\\\\nn\\\\nnSETVERDICT\\\\nn[]Verdict\\\\nnZ_ACCEPT\\\\nn\\\\nn'>&3; read alma <&3; /bin/echo -en 'Content-Type: text/plain\\\\rr\\\\nnContent-Length: 122\\\\rr\\\\nn\\\\rr\\\\nn123456789012'") +EndPolicy + + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Content-Length: 122\r\n\ +\r\n\ +123456789012345678901234567890123456789012345678901234567890\r\n\ +123456789012345678901234567890123456789012345678901234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Type: text/plain\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/chunked-conversion.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/chunked-conversion.tests @@ -0,0 +1,99 @@ +StartGlobalInfo + Tags bug6233 +EndGlobalInfo + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.request_stack["POST"] = (HTTP_STK_DATA, "/bin/cat") + self.response_stack["POST"] = (HTTP_STK_DATA, "/bin/cat") +EndPolicy + +# fix length -> chunked conversion +C2P: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 6\r\n\ +\r\n\ +haliho" +P2S: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +6\r\n\ +haliho\r\n\ +0\r\n\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n\r\n" +. + +# chunked -> chunked +C2P: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +6\r\n\ +haliho\r\n\ +0\r\n\r\n" +P2S: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +6\r\n\ +haliho\r\n\ +0\r\n\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Transfer-Encoding: chunked\r\n\ +Connection: close\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Transfer-Encoding: chunked\r\n\ +Connection: close\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n\r\n" +. + +# EOF terminated -> chunked +C2P: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +6\r\n\ +haliho\r\n\ +0\r\n\r\n" +P2S: "POST /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +6\r\n\ +haliho\r\n\ +0\r\n\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +1234567890" +S2P: Disconnect +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/http-1.1-0.9-fallback-chunking.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/http-1.1-0.9-fallback-chunking.tests @@ -0,0 +1,33 @@ + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.require_host_header = FALSE + self.permit_http09_responses = TRUE + # no real stacking, but let the traffic through an external program + self.response_stack["*"] = (HTTP_STK_DATA, "/bin/cat") +EndPolicy + +StartInfo + Tags bug4567 + Min-Version 3.0 +EndInfo + + +#HTTP 1.1 request and HTTP 0.9 response +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "This is a simple, but long response without headers. The proxy should not add chunking here.\r\n\ +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n" +P2C: "This is a simple, but long response without headers. The proxy should not add chunking here.\r\n\ +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n" +S2P: Disconnect +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/info @@ -0,0 +1 @@ +Tags: transfer --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/bug14351.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/transfer/bug14351.tests @@ -0,0 +1,59 @@ +StartGlobalInfo + Tags bug14351 +EndGlobalInfo + +StartPolicy + def config(self): + self.request_stack["*"] = (HTTP_STK_DATA, "/bin/echo -en '0 SETVERDICT\\\\nn[]Verdict\\\\nnZ_ACCEPT\\\\nn\\\\nn'>&3; read alma <&3; /bin/echo -en '123456789012'") + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + + +C2P: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\ +Content-Length: 12\r\n\ +\r\n\ +123456789012" + +P2S: "GET /accept.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\nc\r\n123456789012\r\n0\r\n\r\n" + + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" + + +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + +StartPolicy + def config(self): + self.request_stack["*"] = (HTTP_STK_DATA, "/bin/echo -en '0 SETVERDICT\\\\nn[]Verdict\\\\nnZ_REJECT\\\\nn\\\\nn'>&3; read alma <&3") + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + +C2P: "GET /reject.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\ +Content-Length: 6\r\n\ +\r\n\ +reject\n" + +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/changing-host-headers.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/changing-host-headers.tests @@ -0,0 +1,88 @@ + +StartGlobalInfo + Tags bug6177 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.connected = 0 + + def connectServer(self): + if not self.connected: + self.connected = 1 + return HttpProxy.connectServer(self) +EndPolicy + +#simple HTTP/0.9 request and response +C2P: "GET /foo.html HTTP/1.0\r\n\ +Host: picurka.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.0\r\n\ +Host: picurka.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +1234567890" +C2P: "GET /foo.html HTTP/1.0\r\n\ +Host: picurka2.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.0\r\n\ +Host: picurka2.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = 0 + self.connected = 0 + + def connectServer(self): + if not self.connected: + self.connected = 1 + return HttpProxy.connectServer(self) +EndPolicy + +#simple HTTP/0.9 request and response +C2P: "GET http://picurka.hu/foo.html HTTP/1.0\r\n\ +Host: picurka.hu\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.0\r\n\ +Host: picurka.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 10\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +1234567890" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 10\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n\ +1234567890" +C2P: "GET http://picurka2.hu/foo.html HTTP/1.0\r\n\ +Host: picurka2.hu\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +P2C: "HTTP/1.0 502 Error encountered\r\n\ +Proxy-Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +\n" $NIHIL "\n\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/smuggle.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/smuggle.tests @@ -0,0 +1,40 @@ +StartGlobalInfo + Tags bug7034 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# some duplicated headers are elminated +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Host: www2\r\n\ +Accept: 1\r\n\ +Accept: 2\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Accept: 1\r\n\ +Accept: 2\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Content-Length: 15\r\n\ +Age: 1\r\n\ +Age: 2\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Age: 1\r\n\ +Age: 2\r\n\ +\r\n\ +12345" +S2P: Disconnect +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/inband-auth.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/inband-auth.tests @@ -0,0 +1,75 @@ +StartGlobalInfo + Tags bug7646 +EndGlobalInfo + + +StartPolicy + from Zorp.AuthDB import AbstractAuthenticationBackend + + class SimpleAuth(AbstractAuthenticationBackend): + def getMethods(self, session_id, entity): + from Zorp.AuthDB import Z_AUTH_METHODS + return (Z_AUTH_METHODS, [('Method', 'PASSWD.internal:11:0:Password authentication')]) + + def setMethod(self, session_id, method): + from Zorp.AuthDB import Z_AUTH_REQUEST + return (Z_AUTH_REQUEST, []) + + def converse(self, session_id, credentials): + from Zorp.AuthDB import Z_AUTH_ACCEPT + return (Z_AUTH_ACCEPT, [('Group', 'aaa'), ('Group', 'bbb')]) + + auth_provider = SimpleAuth() + + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.auth = self.auth_provider + + def userAuthenticated(self, entity, groups, auth_info): + if 'aaa' not in groups or 'bbb' not in groups: + raise AuthException, 'nincs meg az aaa/bbb csoport' + +EndPolicy + +QUOTE = chr(34) + + +C2P: "GET / HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" + +P2C: "HTTP/1.0 401 Authentication is required.\r\n\ +Connection: close\r\n\ +WWW-Authenticate: Basic realm=" %QUOTE "Zorp HTTP auth" %QUOTE "\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +" $NIHIL "\n" +. + +C2P: "GET / HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Authorization: Basic Y2ljYTptYWNza2E=\r\n\ +\r\n" + +P2S: "GET / HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" + +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +abcdef\r\n" + +S2P: Disconnect + +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +abcdef\r\n" + +P2C: Disconnect + +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/strict-header-check.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/strict-header-check.tests @@ -0,0 +1,103 @@ +StartGlobalInfo + Tags bug11836 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.strict_header_checking=TRUE +EndPolicy + +# Invalid character +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: invalid character: ? * .\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +. + + +# Unknown header +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +UnknownHeader: pointless value\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +. + + +# Value too long +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: \ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +012345679012345\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +. + + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.strict_header_checking=FALSE +EndPolicy + +# Invalid character +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: invalid character: ? * .\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: invalid character: ? * .\r\n\ +\r\n" +. + + +# Unknown header +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +UnknownHeader: pointless value\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +UnknownHeader: pointless value\r\n\ +\r\n" +. + + +# Value too long +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: \ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +012345679012345\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: \ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\ +012345679012345\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/host-header.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/host-header.tests @@ -0,0 +1,26 @@ +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# Host field scenarios +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.%.org\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: \r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Allow: GET, HEAD\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered" $NIHIL "\n" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/basic.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/basic.tests @@ -0,0 +1,316 @@ + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + +QUOTE = chr(34) + +# Valid scenario with authenticate +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +Allow: GET, HEAD\r\n\ +Accept: text/plain; text/html\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 14\r\n\ +Content-Range: bytes 21010-47021/47022\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +From: webmaster@w3.org\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Pragma: no-cache\r\n\ +Referer: http://www.w3.org/hypertext/DataSources/Overview.html\r\n\ +User-Agent: CERN-LineMode/2.15 libwww/2.17b3\r\n\ +\r\n\ +request entity" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Connection: keep-alive\r\n\ +Allow: GET, HEAD\r\n\ +Accept: text/plain; text/html\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 14\r\n\ +Content-Range: bytes 21010-47021/47022\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +From: webmaster@w3.org\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Pragma: no-cache\r\n\ +Referer: http://www.w3.org/hypertext/DataSources/Overview.html\r\n\ +User-Agent: CERN-LineMode/2.15 libwww/2.17b3\r\n\ +\r\n\ +request entity" +S2P: "HTTP/1.1 401 Authorization Required\r\n\ +WWW-Authenticate: Basic realm=" %QUOTE "egy realm" %QUOTE "\r\n\ +Content-Length: 20\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +Please authenticate!" +P2C: "HTTP/1.1 401 Authorization Required\r\n\ +WWW-Authenticate: Basic realm=" %QUOTE "egy realm" %QUOTE "\r\n\ +Content-Length: 20\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +Please authenticate!" +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Allow: GET, HEAD\r\n\ +Authorization: Basic 889t98hgetuogihtg948hg49hpg\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 14\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:22:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +From: webmaster@w3.org\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Pragma: no-cache\r\n\ +Referer: http://www.w3.org/hypertext/DataSources/Overview.html\r\n\ +User-Agent: CERN-LineMode/2.15 libwww/2.17b3\r\n\ +\r\n\ +request entity" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Allow: GET, HEAD\r\n\ +Authorization: Basic 889t98hgetuogihtg948hg49hpg\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 14\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:22:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +From: webmaster@w3.org\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Pragma: no-cache\r\n\ +Referer: http://www.w3.org/hypertext/DataSources/Overview.html\r\n\ +User-Agent: CERN-LineMode/2.15 libwww/2.17b3\r\n\ +\r\n\ +request entity" +S2P: "HTTP/1.1 200 OK\r\n\ +Allow: GET, HEAD\r\n\ +Connection: keep-alive\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 15\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Location: http://www.net.org/hypertext/WWW/NewLocation.html\r\n\ +Pragma: no-cache\r\n\ +Server: CERN/3.0 libwww/2.17\r\n\ +WWW-Authenticate: Basic realm=" %QUOTE "egy realm" %QUOTE "\r\n\ +\r\n\ +response entity" +P2C: "HTTP/1.1 200 OK\r\n\ +Allow: GET, HEAD\r\n\ +Connection: keep-alive\r\n\ +Content-Encoding: x-gzip\r\n\ +Content-Length: 15\r\n\ +Content-Type: text/html\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\ +Location: http://www.net.org/hypertext/WWW/NewLocation.html\r\n\ +Pragma: no-cache\r\n\ +Server: CERN/3.0 libwww/2.17\r\n\ +WWW-Authenticate: Basic realm=" %QUOTE "egy realm" %QUOTE "\r\n\ +\r\n\ +response entity" +. + +#Content codings +C2P: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Content-Encoding: x-compress\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Content-Encoding: x-compress\r\n\ +\r\n" +. + +C2P: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Accept-Encoding: identity\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Accept-Encoding: identity\r\n\ +\r\n" +. + +C2P: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Content-Type: text\r\n\ +Content-Encoding: X-gZip\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Content-Type: text\r\n\ +Content-Encoding: X-gZip\r\n\ +\r\n" +. + +# Content charset, language and type +C2P: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Accept-Charset: iso-8859-5, unicode-1-1\r\n\ +Accept-Language: da, en\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +Accept-Charset: iso-8859-5, unicode-1-1\r\n\ +Accept-Language: da, en\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +Content-Length: 4\r\n\ +Content-Language: en\r\n\ +\r\n\ +abcd" +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +Content-Length: 4\r\n\ +Content-Language: en\r\n\ +\r\n\ +abcd" +. + +# Invalid version +C2P: "GET /var/www/index.html HTTP/1.qwer\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n\ +Connection: close\r\n\ +Content-Type: text/html\r\n\ +" $NIHIL "\n" +. + +# HTTP/0.9 / Simple request +C2P: "GET /pub/var/index.html\r\n" +P2C: "\n\ +" $NIHILA "\ +'Host:' header is required, and HTTP/0.9 can't transfer headers.\ +" $NIHILB "\n" +. + +# Invalid HTTP messages / missing null line +# +#C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#Contetnt-Length: 12\r\n\ +#Location: http://www.w3.org/hypertext/WWW/NewLocation.html\r\n" +#P2C: "HTTP/1.0 500 Error encountered" $NIHIL "\n" +#. + +# Request header field in a response +#C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#Content-Length: 12\r\n\ +#\r\n\ +#entitas test" +# +#P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#Content-Length: 12\r\n\ +#\r\n\ +#entitas test" +# +#S2P: "HTTP/1.0 200 OK\r\n\ +#Allow: GET, HEAD\r\n\ +#Content-Length: 19\r\n\ +#Location: http://www.w3.org/hypertext/WWW/NewLocation.html\r\n\ +#From: webmaster@w3.org\r\n\ +#Connection: close\r\n\ +#\r\n\ +#masik entitas teste" +# +#P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "" +#. +# +# Response header field in a request +#C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#Location: http://www.w3.org/hypertext/WWW/NewLocation.html\r\n\ +#Content-Length: 12\r\n\ +#\r\n\ +#entitas test" +#P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +#. + +# URI variation +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +. + +C2P: "GET http://www.balabit.hu/ HTTP/1.1\r\n\ +Host: www.balabit.hu\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered" $NIHIL "\n" +. + +C2P: "GET http://www.balabit.hu/ HTTP/1.0\r\n\ +Host: www.balabit.hu\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered" $NIHIL "\n" +. + +#C2P: "GET http://www.balabit.hu\r\n" +#P2C: "\n\ +#\n\ +#Invalid request\n\ +#\n\ +#\n\ +#

Your browser sent a request this gateway didn't understand.

\n\ +#" $NIHIL "\n" +#. + + +# Text search +C2P: "GET /var/www/index.html?abc HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html?abc HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 3\r\n\ +Connection: close\r\n\ +\r\n\ +abc" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 3\r\n\ +Connection: close\r\n\ +\r\n\ +abc" +. + + +#C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#\r\n\ +#entitas test\r\n" +# +#P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#\r\n\ +#entitas test" +#. + + +# POST request / Content-length is mandatory +#C2P: "POST /pub/var/index.html HTTP/1.0\r\n\ +#Host: www.w3.org\r\n\ +#\r\n\ +#abc" +#P2C: "HTTP/1.0 400 Error encountered\r\n" $NIHIL "\n" +#. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/content-length.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/content-length.tests @@ -0,0 +1,107 @@ +StartGlobalInfo + Tags content-length +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# Content length scenarios +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 0\r\n\ +\r\n\ +entitas test\" + +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 0\r\n\ +\r\n" + +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 19\r\n\ +Connection: close\r\n\ +\r\n\ +masik entitas teste" + +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 19\r\n\ +Connection: close\r\n\ +\r\n\ +masik entitas teste" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 12\r\n\ +\r\n\ +entitas test\r\n\ +Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n\ +From: webmaster@w3.org\r\n\ +If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT\r\n\ +Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\r\n\" + +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 12\r\n\ +\r\n\ +entitas test" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 1024\r\n\ +\r\n"\ + "%s"x512 +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: 1024\r\n\ +\r\n"\ + "%s"x512 +. + +C2P: "GET /var/www/index3.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index3.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345 a tobbi csak felesleg" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Content-Length: bubba\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + +StartInfo + Tags bug6533 +EndInfo + +C2P: "GET /var/www/index3.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index3.html HTTP/1.0\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.0 302 OK\r\n\ +Content-Length: 0\r\n\ +\r\n" +P2C: "HTTP/1.0 302 OK\r\n\ +Content-Length: 0\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/keep-persistent.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/keep-persistent.tests @@ -0,0 +1,93 @@ + +StartGlobalInfo + Tags keep-persistent +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.keep_persistent = TRUE +EndPolicy + +# persistent request, non-persistent response, client side remains +# persistent +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +S2P: Disconnect +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +. + +# persistent request, non-persistent response without content-length +# proxy changes to chunked encoding +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: keep-alive\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +5\r\n\ +12345\r\n" +S2P: Disconnect +P2C: "0\r\n\r\n" +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +. + +# persistent request, non-persistent response without content-length +# proxy cannot change to chunked encoding as the client only supports +# HTTP/1.0 +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +S2P: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/headers.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/headers.tests @@ -0,0 +1,38 @@ +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.strict_header_checking=TRUE +EndPolicy + + +# Header and value rules +#nincs-space-a-kettospont-es-az-ertek-kozott +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via:ertek\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: ertek\r\n\ +\r\n" +. + +#space-van-a-nev-es-a-kettospont-kozott +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via :ertek\r\n\ +\r\n" +P2S: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +Via: ertek\r\n\ +\r\n" +. + +C2P: "GET /pub/var/index.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +tspecial()%van: ertek\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n" $NIHIL "\n" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/no-entity.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/no-entity.tests @@ -0,0 +1,168 @@ +StartGlobalInfo + Tags suppress-data +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# * anything that comes back with 204, 304 never has a data block even if it +# has a Content-Length header + +# * anything that comes back with 205, does not have a data body unless +# explicitly specified via a Content-Length or Content-Transfer-Encoding +# headers + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 204 No Content\r\n\ +Connection: close\r\n\ +\r\n\ +ez mar nem lehet itt!" +P2C: "HTTP/1.1 204 No Content\r\n\ +Connection: close\r\n\ +\r\n" +. + +# HEAD request / entity doesn't present in response +C2P: "HEAD /pub/var/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "HEAD /pub/var/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +entitas teste" +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +\r\n" +. + +# HEAD request / entity doesn't present in response even if it has a content-length header +C2P: "HEAD /pub/var/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "HEAD /pub/var/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Content-Length: 10\r\n\ +\r\n\ +entitas teste" +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +Content-Length: 10\r\n\ +\r\n" +. + +# HTTP response with 304 code may not present +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 304 Not Modified\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Etag: gonkyyy;1234\r\n\ +Content-Location: index.html\r\n\ +Vary: negotiate, accept, accept-language\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Connection: close\r\n\ +\r\n\ +ez sem lesz itt!" +P2C: "HTTP/1.1 304 Not Modified\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Etag: gonkyyy;1234\r\n\ +Content-Location: index.html\r\n\ +Vary: negotiate, accept, accept-language\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Connection: close\r\n\ +\r\n" +. + +# HTTP response with 304 code may not present +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 304 Not Modified\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Etag: gonkyyy;1234\r\n\ +Content-Location: index.html\r\n\ +Vary: negotiate, accept, accept-language\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Content-Length: 16\r\n\ +Connection: close\r\n\ +\r\n\ +ez sem lesz itt!" +P2C: "HTTP/1.1 304 Not Modified\r\n\ +Date: Tue, 15 Nov 1994 08:12:31 GMT\r\n\ +Etag: gonkyyy;1234\r\n\ +Content-Location: index.html\r\n\ +Vary: negotiate, accept, accept-language\r\n\ +Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n\ +Content-Length: 16\r\n\ +Connection: close\r\n\ +\r\n" +. + +StartInfo + Tags bug9500 +EndInfo + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 205 Reset content\r\n\ +Connection: close\r\n\ +Content-Length: 77\r\n\ +\r\n\ +ez itt van annak ellenere, hogy defaultbol a 205-nel nem lehet itt adatresz!" +P2C: "HTTP/1.1 205 Reset content\r\n\ +Connection: close\r\n\ +Content-Length: 77\r\n\ +\r\n\ +ez itt van annak ellenere, hogy defaultbol a 205-nel nem lehet itt adatresz!" +. + +StartInfo + Tags bug9500 +EndInfo + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.w3.org\r\n\ +\r\n" +S2P: "HTTP/1.1 205 Reset content\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +15\r\n\ +ez mar nem lehet itt!\r\n\ +0\r\n\r\n" +P2C: "HTTP/1.1 205 Reset content\r\n\ +Connection: close\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +15\r\n\ +ez mar nem lehet itt!\r\n\ +0\r\n\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/bug13705.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/bug13705.tests @@ -0,0 +1,74 @@ +StartGlobalInfo + Tags bug13705 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + +# In case of version 1.0 Zorp should translate +# unknown Connection header to Connection: close +C2P: "GET /1.0.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: almafa\r\n\ +\r\n" +P2S: "GET /1.0.html HTTP/1.0\r\n\ +Host: test1\r\n\ +Connection: close\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + +# In case of version 1.1 Zorp should (in this version) +# change unknown Connection header to Connection: keep-alive +# Client side +C2P: "GET /1.0.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: almafa\r\n\ +\r\n" +P2S: "GET /1.0.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. +# Server side. +C2P: "GET /1.0.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /1.0.html HTTP/1.1\r\n\ +Host: test1\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: almafa\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/limit-checks.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/limit-checks.tests @@ -0,0 +1,59 @@ + +# "Max length" scenarios +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.max_line_length = 40 + self.max_hostname_length = 12 + self.max_url_length = 20 + self.max_header_lines = 3 +EndPolicy + + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.network.org\r\n\ +\r\n" +P2C: "HTTP" $NIHIL "\n" +. + +C2P: "GET /index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 7\r\n\ +Content-Language: barmi1barmi2barmi3barmi4\r\n\ +\r\n\ +content" +P2C: "HTTP" $NIHIL "\n" +. + +C2P: "GET /index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +Content-Length: 7\r\n\ +Content-MD5: Q2hlY2sgSW50Z==\r\n\ +Content-Language: barmi1barmi2\r\n\ +\r\n\ +content" +P2C: "HTTP" $NIHIL "\n" +. + +C2P: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OKezitttobbmintharminckarakterlesz\r\n\ +Connection: close\r\n\ +\r\n\ +entitas nagyon" +P2C: Disconnect +. + + +# max_url_length +C2P: "GET /var/abcdef/ghijklmnop/qrstuvwxyz/index.html HTTP/1.1\r\n\ +Host: www.net.org\r\n\ +\r\n\" +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/small-web-latency.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/small-web-latency.tests @@ -0,0 +1,34 @@ +StartGlobalInfo + Tags D-01817 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) +EndPolicy + + +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 7\r\n\ +\r\n\ +a" +A=time.sleep(5) +S2P: "a" +A=time.sleep(5) +S2P: "a" +A=time.sleep(5) +S2P: "a" +A=time.sleep(5) +S2P: "a\r\n" + +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 7\r\n\ +\r\n\ +aaaaa\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/short-status-line.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/short-status-line.tests @@ -0,0 +1,24 @@ +StartGlobalInfo + Tags bug8292 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.require_host_header = FALSE + self.permit_http09_responses = TRUE +EndPolicy + + +#simple HTTP/0.9 request and response +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "ent" +S2P: Disconnect +P2C: "ent" +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/http-0.9.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/http-0.9.tests @@ -0,0 +1,65 @@ +## +# Test HTTP/0.9 fallback when client requests HTTP/0.9 +# Tests: bug 3320 +# + +StartGlobalInfo + Tags bug3320 http09 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.require_host_header = FALSE + self.permit_http09_responses = TRUE +EndPolicy + +#simple HTTP/0.9 request and response +C2P: "GET /foo.html\r\n" +P2S: "GET /foo.html\r\n" +S2P: "entity body\r\n" +P2C: "entity body\r\n" +S2P: Disconnect +P2C: Disconnect +. + +#HTTP 1.0 request and HTTP 0.9 response +C2P: "GET /foo.html HTTP/1.0\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.0\r\n\ +Host: www\r\n\ +\r\n" +S2P: "This is a simple response without headers.\r\n" +P2C: "This is a simple response without headers.\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.require_host_header = FALSE + self.permit_http09_responses = TRUE + self.keep_persistent = TRUE +EndPolicy + +StartInfo + Tags bug9360 +EndInfo + +C2P: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /foo.html HTTP/1.1\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "This is a simple response without headers.\r\n" +P2C: "This is a simple response without headers.\r\n" +S2P: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/persistent-mode.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/persistent-mode.tests @@ -0,0 +1,137 @@ +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +# 1.0 request, no connection header -> non-persistent +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +S2P: Disconnect +P2C: Disconnect +. + +# 1.0 request, 1.0 response; connection header present -> persistent +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: close\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: close\r\n\ +\r\n" +S2P: Disconnect +P2C: Disconnect +. + +# 1.0 request with connection keep-alive +# 1.1 response without header; -> non-persistent, with an explicit Connection header added +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +S2P: Disconnect +P2C: Disconnect +. + +StartInfo + Tags bug4096 +EndInfo + +# 4096 +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +\r\n\ +entitas resze\r\n\ +\r\n" +S2P: Disconnect +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +entitas resze\r\n\ +\r\n" +P2C: Disconnect +. + +StartInfo + Tags bug6444 +EndInfo + +# HTTP/1.1 reconnect when the server drops connection while we are waiting +# for the client +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 17\r\n\ +\r\n\ +entitas resze\r\n\ +\r\n" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 17\r\n\ +\r\n\ +entitas resze\r\n\ +\r\n" +C2P: "GET / HTTP/1.1\r\n" +A=time.sleep(1) +S2P: Disconnect +C2P: "Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/proto-upgrade.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/proto-upgrade.tests @@ -0,0 +1,31 @@ +StartGlobalInfo + Tags bug9423 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.keep_persistent=TRUE +EndPolicy + + +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +S2P: Disconnect +P2C: "HTTP/1.1 200 OK\r\n\ +Connection: keep-alive\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +5\r\n\ +12345\r\n\ +0\r\n\r\n" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/url-encoding.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/url-encoding.tests @@ -0,0 +1,65 @@ +StartGlobalInfo + Tags urlrewrite +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 +EndPolicy + + +C2P: "GET /pub/var/index%s%s.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2C: "HTTP/1.0 500 Error encountered" $NIHIL "\n" +. + +C2P: "GET /pub/var/index%ab.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +P2S: "GET /pub/var/index%AB.html HTTP/1.0\r\n\ +Host: www.w3.org\r\n\ +\r\n" +. + +C2P: "GET /dict_search.php?L=ENG%3AHUN%3AEngHunDict&O=HUN&flash=&E=1&sid=39d326b3ed5258dfc0e695d6af882aae&in_form=1&W=provide&M=2&P=0&C=0&A=0&T=1&F=0 HTTP/1.0\r\n\ +Host: szotar.sztaki.hu\r\n\ +\r\n" +P2S: "GET /dict_search.php?L=ENG%3AHUN%3AEngHunDict&O=HUN&flash=&E=1&sid=39d326b3ed5258dfc0e695d6af882aae&in_form=1&W=provide&M=2&P=0&C=0&A=0&T=1&F=0 HTTP/1.0\r\n\ +Host: szotar.sztaki.hu\r\n\ +\r\n" +. + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.permit_unicode_url = TRUE + self.transparent_mode = FALSE + self.parent_proxy="some" +EndPolicy + +C2P: "GET http://%73%61:%70%61%73%73@a.b/%63 HTTP/1.0\r\n\ +Host: a.b\r\n\ +\r\n" +P2S: "GET http://sa:pass@a.b/c HTTP/1.0\r\n\ +Host: a.b\r\n\ +\r\n" +. + +C2P: "GET http://latin2.hu/k%e9r%e9s.php?b%e9la HTTP/1.0\r\n\ +Host: latin2.hu\r\n\ +\r\n" +P2S: "GET http://latin2.hu/k%E9r%E9s.php?b%E9la HTTP/1.0\r\n\ +Host: latin2.hu\r\n\ +\r\n" +. + +C2P: "GET http://utf8.hu/k%u00e9r%u01e9s.php HTTP/1.0\r\n\ +Host: utf8.hu\r\n\ +\r\n" +P2S: "GET http://utf8.hu/k%E9r%u01E9s.php HTTP/1.0\r\n\ +Host: utf8.hu\r\n\ +\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/rerequest.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/rerequest.tests @@ -0,0 +1,135 @@ + +StartGlobalInfo + Tags bug9808 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.rerequest_attempts = 3 + self.timeout_response = 3000 +EndPolicy + +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +A=time.sleep(5) +S2P: Disconnect +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + +C2P: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +P2S: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +A=time.sleep(5) +S2P: Disconnect +P2S: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + +C2P: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +P2S: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +C2P: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +P2S: "GET / HTTP/1.1\r\n\ +Host: www\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. + + +StartInfo + Tags qqq +EndInfo + +C2P: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Transfer-Encoding: chunked\r\n\ +\r\n\ +a\r\n\ +1234567890\r\n\ +0\r\n\r\n" +P2S: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +A=time.sleep(5) +S2P: Disconnect +P2S: "POST / HTTP/1.1\r\n\ +Host: www\r\n\ +Content-Length: 10\r\n\ +\r\n\ +1234567890" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: close\r\n\ +\r\n\ +12345" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/parent-proxy.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/parent-proxy.tests @@ -0,0 +1,81 @@ + +StartGlobalInfo + Tags bug5144 + Min-Version 3.0 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.parent_proxy = '1' +EndPolicy + +# 5144 +# 1.0 request, 1.0 response; Proxy-Connection header present -> persistent +##INFO## +##Tags: bug5144 +## +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET http://www/ HTTP/1.0\r\n\ +Host: www\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: close\r\n\ +\r\n" +P2S: "GET http://www/ HTTP/1.0\r\n\ +Host: www\r\n\ +Proxy-Connection: close\r\n\ +\r\n" +S2P: Disconnect +P2C: Disconnect +. + + +# 5144 +# 1.0 request, 1.0 response; Connection header present -> persistent +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: keep-alive\r\n\ +\r\n" +P2S: "GET http://www/ HTTP/1.0\r\n\ +Host: www\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +C2P: "GET / HTTP/1.0\r\n\ +Host: www\r\n\ +Connection: close\r\n\ +\r\n" +P2S: "GET http://www/ HTTP/1.0\r\n\ +Host: www\r\n\ +Proxy-Connection: close\r\n\ +\r\n" +S2P: Disconnect +P2C: Disconnect +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/host-rewrite.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/host-rewrite.tests @@ -0,0 +1,46 @@ + +StartGlobalInfo + Tags bug5144 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = FALSE + self.default_port = server_port + self.target_port_range = "80-2000" +EndPolicy + +C2P: "GET http://" %ZTS_SERVER_IP "/var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP "\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + +C2P: "GET http://" %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "/var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +\r\n\ +12345" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/connection-rewrite.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/connection-rewrite.tests @@ -0,0 +1,36 @@ + +StartGlobalInfo + Tags bug4141 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = FALSE + self.default_port = server_port + self.target_port_range = "80-2000" +EndPolicy + + + +# bugfix 4141 +C2P: "GET http://" %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "/var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n" +P2S: "GET /var/www/index.html HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Connection: keep-alive\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 200 OK\r\n\ +Content-Length: 5\r\n\ +Proxy-Connection: keep-alive\r\n\ +\r\n\ +12345" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/ftp-over-http.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/ftp-over-http.tests @@ -0,0 +1,206 @@ +StartGlobalInfo + Tags ftpoverhttp bug5126 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = FALSE + self.default_port = server_port + self.permit_ftp_over_http = TRUE + self.target_port_range = "21" +EndPolicy + + +# Simple directoty list. +C2P: "GET ftp://ftp.szerver.hu/ HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2S: "TYPE A\r\n" +S2P: "200 Representation type is ASCII\r\n" +P2S: "PASV\r\n" +PORT=1290 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2S: "LIST\r\n" +S2P: "150 Data Follow\r\n" +S2P: Accept +dS2P: "-rw-r--r-- 1 root root 11 Jan 14 14:09 README\r\n\ +-rw-r--r-- 1 root root 270 Mar 15 2001 makendx.pl\r\n\ +drwxr-xr-x 11 root root 87132 Jul 3 2002 rfc\r\n\ +drwxr-xr-x 2 sasa sasa 297 Jul 9 2004 sasa\r\n\ +drwxr-xr-x 2 root root 82 Nov 4 2003 solaris\r\n" +dS2P: Disconnect +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Type: text/html\r\n\ +Proxy-Connection: close\r\n\ +\r\n" $NIHIL "" +. + +# Simple file download +C2P: "GET ftp://ftp.szerver.hu/something.txt HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +Connection: keep-alive\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /something.txt\r\n" +S2P: "550 sdgfdgd: No such file or directory\r\n" +#P2S: "CWD /\r\n" +#S2P: "250 Requested file action okay, completed\r\n" +P2S: "TYPE I\r\n" +S2P: "200 Representation type is Binary\r\n" +P2S: "PASV\r\n" +PORT=1291 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2S: "RETR something.txt\r\n" +S2P: "150 Data Follow\r\n" +S2P: Accept +dS2P: "En vagyok a file." +dS2P: Disconnect +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Type: application/octet-stream\r\n\ +Proxy-Connection: close\r\n\ +\r\n\ +En vagyok a file." +. + +# Directory list for non existance directory +C2P: "GET ftp://ftp.szerver.hu/nonexists/ HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /nonexists\r\n" +#FIXMEE ??? +S2P: "550 nonexists.txt: Not a directory\r\n" +#S2P: "550 nonexists: No such file or directory\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\nProxy-Connection: close\r\nContent-Type: text/html\r\n\r\n" $NIHIL "\n" +. + +# Download non-existing file. +C2P: "GET ftp://ftp.szerver.hu/nonexists.txt HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /nonexists.txt\r\n" +S2P: "550 nonexists.txt: Not a directory\r\n" +P2S: "TYPE I\r\n" +S2P: "200 Representation type is Binary\r\n" +P2S: "PASV\r\n" +PORT=1293 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,13)\r\n" +P2S: "RETR nonexists.txt\r\n" +S2P: "550 nonexists.txt: No such file or directory\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\nProxy-Connection: close\r\nContent-Type: text/html\r\n\r\n" $NIHIL "\n" +. + +# Download file from sub directory. +C2P: "GET ftp://ftp.szerver.hu/almafa/korte HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /almafa/korte\r\n" +S2P: "550 /almafa/korte: Not a directory\r\n" +P2S: "CWD /almafa\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2S: "TYPE I\r\n" +S2P: "200 Representation type is Binary\r\n" +P2S: "PASV\r\n" +PORT=1294 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,14)\r\n" +P2S: "RETR korte\r\n" +S2P: "150 Data Follow\r\n" +S2P: Accept +dS2P: "En vagyok a korte." +dS2P: Disconnect +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Type: application/octet-stream\r\n\ +Proxy-Connection: close\r\n\ +\r\n\ +En vagyok a korte." +. + +StartInfo + Tags bug9787 +EndInfo + +# Download file from subdirectory, server uses 125 status to confirm data channel. +C2P: "GET ftp://ftp.szerver.hu/almafa/korte HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /almafa/korte\r\n" +S2P: "550 /almafa/korte: Not a directory\r\n" +P2S: "CWD /almafa\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2S: "TYPE I\r\n" +S2P: "200 Representation type is Binary\r\n" +P2S: "PASV\r\n" +PORT=1294 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,14)\r\n" +P2S: "RETR korte\r\n" +S2P: "125 Data Follow\r\n" +S2P: Accept +dS2P: "En vagyok a korte." +dS2P: Disconnect +P2C: "HTTP/1.0 200 OK\r\n\ +Content-Type: application/octet-stream\r\n\ +Proxy-Connection: close\r\n\ +\r\n\ +En vagyok a korte." +. + +# Download non-existing file from non-existing directory. +C2P: "GET ftp://ftp.szerver.hu/nihil/nonexists.txt HTTP/1.1\r\n\ +Host: ftp.szerver.hu\r\n\ +\r\n" +S2P: "220 Szia\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS ftp@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2S: "CWD /nihil/nonexists.txt\r\n" +S2P: "550 /nihil/nonexists.txt: No such file or directory\r\n" +P2S: "CWD /nihil\r\n" +S2P: "550 /nihil: No such file or directory\r\n" +P2C: "HTTP/1.0 500 Error encountered\r\n\ +Proxy-Connection: close\r\n\ +Content-Type: text/html\r\n\ +\r\n" $NIHIL "\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/authenticated-proxy-connect.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/authenticated-proxy-connect.tests @@ -0,0 +1,64 @@ +StartGlobalInfo + Tags bug5763 + Min-Version 3.0 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.parent_proxy = '1' + self.transparent_mode = FALSE + self.request["CONNECT"] = (HTTP_REQ_ACCEPT,) + self.target_port_range = "80-2000" +EndPolicy + +C2P: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +P2S: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +S2P: "HTTP/1.1 200 Connection established\r\n\ +\r\n" +P2C: "HTTP/1.1 200 Connection established\r\n\ +\r\n" +C2P: "blablabla" +S2P: "bliblibli" +P2C: "bliblibli" +P2S: "blablabla" +. + +C2P: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +P2S: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +S2P: "HTTP/1.1 407 Authentication required\r\n\ +\r\n\ +12345" +P2C: "HTTP/1.1 407 Authentication required\r\n\ +Proxy-Connection: close\r\n\ +\r\n\ +12345" +. + +C2P: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +Proxy-Authenticate: Basic 889t98hgetuogihtg948hg49hpg\r\n\ +\r\n" +P2S: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +Proxy-Authenticate: Basic 889t98hgetuogihtg948hg49hpg\r\n\ +\r\n" +S2P: "HTTP/1.1 200 Connection established\r\n\ +\r\n" +P2C: "HTTP/1.1 200 Connection established\r\n\ +\r\n" +C2P: "blablabla" +S2P: "bliblibli" +P2C: "bliblibli" +P2S: "blablabla" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/authenticated-connect.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/authenticated-connect.tests @@ -0,0 +1,30 @@ +StartGlobalInfo + Tags bug5356 + Min-Version 3.0 +EndGlobalInfo + +StartPolicy + def config(self): + from Zorp.AuthDB import AbstractAuthenticationBackend + + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = FALSE + self.request["CONNECT"] = (HTTP_REQ_ACCEPT,) + self.target_port_range = "80-2000" + # always fails + self.auth = AbstractAuthenticationBackend() +EndPolicy + +QUOTE = chr(34) + +C2P: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +P2C: "HTTP/1.0 407 Authentication is required.\r\n\ +Proxy-Connection: close\r\n\ +Proxy-Authenticate: Basic realm=" %QUOTE "Zorp HTTP auth" %QUOTE "\r\n\ +Content-Type: text/html\r\n\ +\r\n\ +" $NIHIL "\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/info @@ -0,0 +1 @@ +Tags: nontransparent --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/direct-connect.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/http/protocol/non-transparent/direct-connect.tests @@ -0,0 +1,23 @@ +StartGlobalInfo + Tags bug5763 +EndGlobalInfo + +StartPolicy + def config(self): + HttpProxy.config(self) + self.timeout_request=30000 + self.transparent_mode = FALSE + self.request["CONNECT"] = (HTTP_REQ_ACCEPT,) + self.target_port_range = "80-2000" +EndPolicy + +C2P: "CONNECT " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT " HTTP/1.1\r\n\ +Host: " %ZTS_SERVER_IP ":" %ZTS_SERVER_PORT "\r\n\ +\r\n" +P2C: "HTTP/1.0 200 Connection established\r\n\ +\r\n" +C2P: "blablabla" +S2P: "bliblibli" +P2C: "bliblibli" +P2S: "blablabla" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/info @@ -0,0 +1,2 @@ +Base-Class: FtpProxyRW + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/attr/cases/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/attr/cases/timeout.tests @@ -0,0 +1,28 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.timeout = 3000 + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220" +A=time.sleep(6) +S2P: " Szia\r\n" +#P2C: "220 Szia\r\n" +P2C: Disconnect +. + +S2P: "220 Szia\r\n" +P2C: "220 Szia\r\n" +C2P: "USER" +A=time.sleep(6) +C2P: " ftp\r\n" +#P2S: "USER ftp\r\n" +P2C: "500 Connection timed out\r\n" +P2C: Disconnect + +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/attr/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/attr/cases/testcases @@ -0,0 +1,470 @@ + +# This testcase does not work, because it refers to self.client_data which +# does not exist. +#StartPolicy +# def config(self): +# self.permit_unknown_command = TRUE +# self.request["PROBA"] = (FTP_REQ_POLICY, self.proba) +# self.request["*"] = (FTP_REQ_ACCEPT) +# self.response["*","*"] = (FTP_RSP_ACCEPT) +# # because the proxy does not like invalid ports by default +# # and the testsystem initiates connections from ports != 20 +# self.strict_port_checking = FALSE +# def proba(self,command): +# (tmp,NULL) = split(str(self.client_data),':') +# self.request_parameter = tmp[8:] +# return FTP_REQ_ACCEPT +#EndPolicy +# +#S2P: "220 kesz\r\n" +#P2C: "220 kesz\r\n" +#C2P: "USER user\r\n" +#P2S: "USER user\r\n" +#S2P: "230 logged in\r\n" +#P2C: "230 logged in\r\n" +# +#CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +#C2P: Listen 1280 +#C2P: "PORT " %CLIENT_COMMAIP ",5,0\r\n" +#P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +#S2P: "200 \r\n" +#P2C: "200 \r\n" +#C2P: "RETR utvonal\r\n" +#P2S: "RETR utvonal\r\n" +#S2P: "150 \r\n" +#P2C: "150 \r\n" +#FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +#FW_PORT = PORT1*256 + PORT2 +#S2P: Connect FW_IP FW_PORT +#C2P: Accept +#C2P: "PROBA\r\n" +#P2S: "PROBA " %ZTS_CLIENT_IP "\r\n" +#. +# +# This testcase does not work, because it refers to self.server_data which +# does not exist. +#StartPolicy +# def config(self): +# self.permit_unknown_command = TRUE +# self.request["PROBA"] = (FTP_REQ_POLICY, self.proba) +# self.response["*","*"] = (FTP_RSP_ACCEPT) +# self.request["*"] = (FTP_REQ_ACCEPT) +# self.strict_port_checking = FALSE +# +# def proba(self,command): +# (tmp,NULL) = split(str(self.server_data),':') +# self.request_parameter = tmp[8:] +# return FTP_REQ_ACCEPT +#EndPolicy +# +#S2P: "220 kesz\r\n" +#P2C: "220 kesz\r\n" +#C2P: "USER user\r\n" +#P2S: "USER user\r\n" +#S2P: "230 logged in\r\n" +#P2C: "230 logged in\r\n" +# +#C2P: "PASV\r\n" +#P2S: "PASV\r\n" +#SERVER_COMMAIP = string.replace(ZTS_SERVER_IP,".",",") +#S2P: Listen 1280 +#S2P: "227 (" %SERVER_COMMAIP ",5,0)\r\n" +#P2C: "227 (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +#FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +#FW_PORT = PORT1*256 + PORT2 +#C2P: "RETR utvonal\r\n" +#P2S: "RETR utvonal\r\n" +#S2P: "150 \r\n" +#P2C: "150 \r\n" +#C2P: Connect FW_IP FW_PORT +#S2P: Accept +#C2P: "PROBA\r\n" +#P2S: "PROBA " %ZTS_SERVER_IP "\r\n" +#. + +StartPolicy + def config(self): + self.data_port_min = 40500 + self.data_port_max = 40500 + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1280 +C2P: "PORT " %CLIENT_COMMAIP ",5,0\r\n" +#158*256+52=40500 +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 ",158,52\r\n" +. + +#data mode +#already tested in testcases.txt + +# This testcase does not work, because it refers to self.fw_server_data which +# does not exist. +#StartPolicy +# def config(self): +# self.permit_unknown_command = TRUE +# self.request["PROBA"] = (FTP_REQ_POLICY, self.proba) +# self.response["*","*"] = (FTP_RSP_ACCEPT) +# self.request["*"] = (FTP_REQ_ACCEPT) +# self.strict_port_checking = FALSE +# +# def proba(self,command): +# (tmp,NULL) = split(str(self.fw_server_data),':') +# self.request_parameter = tmp[8:] +# return FTP_REQ_ACCEPT +#EndPolicy +# +#S2P: "220 kesz\r\n" +#P2C: "220 kesz\r\n" +#C2P: "USER user\r\n" +#P2S: "USER user\r\n" +#S2P: "230 logged in\r\n" +#P2C: "230 logged in\r\n" +# +#CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +#C2P: Listen 1280 +#C2P: "PORT " %CLIENT_COMMAIP ",5,0\r\n" +#P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +#S2P: "200 \r\n" +#P2C: "200 \r\n" +#C2P: "RETR utvonal\r\n" +#P2S: "RETR utvonal\r\n" +#S2P: "150 \r\n" +#P2C: "150 \r\n" +#FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +#FW_PORT = PORT1*256 + PORT2 +#S2P: Connect FW_IP FW_PORT +#C2P: Accept +#C2P: "PROBA\r\n" +#P2S: "PROBA " %FW_IP "\r\n" +#. + +# This testcase does not work, because it refers to self.fw_client_data which +# does not exist. +#StartPolicy +# def config(self): +# self.permit_unknown_command = TRUE +# self.request["PROBA"] = (FTP_REQ_POLICY, self.proba) +# self.response["*","*"] = (FTP_RSP_ACCEPT) +# self.request["*"] = (FTP_REQ_ACCEPT) +# self.strict_port_checking = FALSE +# +# def proba(self,command): +# (tmp,NULL) = split(str(self.fw_client_data),':') +# self.request_parameter = tmp[8:] +# return FTP_REQ_ACCEPT +#EndPolicy +# +#S2P: "220 kesz\r\n" +#P2C: "220 kesz\r\n" +#C2P: "USER user\r\n" +#P2S: "USER user\r\n" +#S2P: "230 logged in\r\n" +#P2C: "230 logged in\r\n" +# +#C2P: "PASV\r\n" +#P2S: "PASV\r\n" +#SERVER_COMMAIP = string.replace(ZTS_SERVER_IP,".",",") +#S2P: Listen 1280 +#S2P: "227 (" %SERVER_COMMAIP ",5,0)\r\n" +#P2C: "227 (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +#FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +#FW_PORT = PORT1*256 + PORT2 +#C2P: "RETR utvonal\r\n" +#P2S: "RETR utvonal\r\n" +#S2P: "150 \r\n" +#P2C: "150 \r\n" +#C2P: Connect FW_IP FW_PORT +#S2P: Accept +#C2P: "PROBA\r\n" +#P2S: "PROBA " %FW_IP "\r\n" +#. + +StartPolicy + def config(self): + self.max_line_length = 20 + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "123 56789012345678901\r\n" +P2S: Disconnect +. + +S2P: "123 567890123456789\r\n" +P2S: Disconnect +. + +S2P: "123 56789012345678\r\n" +P2C: "123 56789012345678\r\n" +. + +StartPolicy + def config(self): + self.transparent_mode = FALSE + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.max_hostname_length = 10 + self.strict_port_checking = FALSE +EndPolicy + +P2C: "220-Welcome in Zorp FTP proxy authentication module!\r\n\ +220-Please authenticate yourself!\r\n\ +220-Authentication form:\r\n\ +220- USER @\r\n\ +220- PASS \r\n\ +220 \r\n" + +C2P: "USER ftp@123456.8.0\r\n" +P2C: "331 Username and host okay, send your password.\r\n" +. + +P2C: "220-Welcome in Zorp FTP proxy authentication module!\r\n\ +220-Please authenticate yourself!\r\n\ +220-Authentication form:\r\n\ +220- USER @\r\n\ +220- PASS \r\n\ +220 \r\n" + +C2P: "USER ftp@123456.8.01\r\n" +P2C: "501 Hostname too long.\r\n" +. + +StartPolicy + def config(self): + self.permit_unknown_command = FALSE + self.max_username_length = 5 + self.max_password_length = 5 + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.request["PROBA"] = (FTP_REQ_POLICY, self.proba) + self.request["PROBA2"] = (FTP_REQ_POLICY, self.proba2) + self.strict_port_checking = FALSE + def proba(self,command): + self.request_parameter = self.password + return FTP_REQ_ACCEPT + def proba2(self,command): + self.request_parameter = self.username + return FTP_REQ_ACCEPT +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER 12345\r\n" +P2S: "USER 12345\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER 123456\r\n" +P2C: "501 Username too long.\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER 12345\r\n" +P2S: "USER 12345\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS 67890\r\n" +P2S: "PASS 67890\r\n" +S2P: "230 Access granted\r\n" +P2C: "230 Access granted\r\n" +C2P: "PROBA\r\n" +P2S: "PROBA 67890\r\n" +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "PROBA2\r\n" +P2S: "PROBA2 12345\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER 12345\r\n" +P2S: "USER 12345\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS 123456\r\n" +P2C: "501 Password too long.\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "\r\n" +P2C: Disconnect +P2S: Disconnect +. + +StartPolicy + def config(self): + self.permit_empty_command = TRUE + self.permit_unknown_command = TRUE + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "\r\n" +C2P: "\r\n" +C2P: "USER valami\r\n" +P2S: "USER valami\r\n" +. + +StartPolicy + def config(self): + self.permit_unknown_command = TRUE + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.request["USER"] = (FTP_REQ_POLICY, self.proba) + self.strict_port_checking = FALSE + def proba(self,command): + if self.request_parameter == "valami": + self.request_parameter = "barmi" + else: + self.request_parameter = "akarmi" + return FTP_REQ_ACCEPT +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER valami\r\n" +P2S: "USER barmi\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER proba\r\n" +P2S: "USER akarmi\r\n" +. + +StartPolicy + def config(self): + self.permit_unknown_command = TRUE + self.response["*","*"] = (FTP_RSP_POLICY, self.proba) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE + def proba(self,command,answer): + if self.response_status == "345": + self.response_status = "567" + elif self.response_status == "346": + self.response_status = "123" + return FTP_RSP_ACCEPT +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER proba\r\n" +P2S: "USER proba\r\n" +S2P: "345 valami szoveg\r\n" +P2C: "567 valami szoveg\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER proba\r\n" +P2S: "USER proba\r\n" +S2P: "346 valami szoveg\r\n" +P2C: "123 valami szoveg\r\n" +. + +StartPolicy + def config(self): + self.permit_unknown_command = TRUE + self.response["*","*"] = (FTP_RSP_POLICY, self.proba) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE + def proba(self,command,answer): + if self.response_parameter == "proba": + self.response_parameter = "nem proba" + else: + self.response_parameter = "megis proba" + return FTP_RSP_ACCEPT +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 megis proba\r\n" +C2P: "USER proba\r\n" +P2S: "USER proba\r\n" +S2P: "345 proba\r\n" +P2C: "345 nem proba\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 megis proba\r\n" +C2P: "USER proba\r\n" +P2S: "USER proba\r\n" +S2P: "346 valami szoveg\r\n" +P2C: "346 megis proba\r\n" +. + +StartPolicy + def config(self): + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.response_strip_msg = TRUE + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 \r\n" +C2P: "USER proba\r\n" +P2S: "USER proba\r\n" +S2P: "345 proba\r\n" +P2C: "345 \r\n" +. + +StartPolicy + def config(self): + self.transparent_mode = FALSE + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.target_port_range = str(server_port) + self.strict_port_checking = FALSE +EndPolicy + +P2C: "220-Welcome in Zorp FTP proxy authentication module!\r\n\ +220-Please authenticate yourself!\r\n\ +220-Authentication form:\r\n\ +220- USER @\r\n\ +220- PASS \r\n\ +220 \r\n" + +C2P: "USER ftp@" %ZTS_SERVER_IP "\r\n" +P2C: "331 Username and host okay, send your password.\r\n" +C2P: "PASS jelszo\r\n" +S2P: "220 Ok\r\n" +P2S: "USER ftp\r\n" +S2P: "331 send password\r\n" +P2S: "PASS jelszo\r\n" +S2P: "230 Access granted\r\n" +P2C: "230 Access granted\r\n" +. + +StartPolicy + def config(self): + self.timeout = 2000 + self.response["*","*"] = (FTP_RSP_ACCEPT) + self.request["*"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 ready\r\n" +P2C: "220 ready\r\n" +A=time.sleep(3) +P2C: "500 Connection timed out\r\n" +P2S: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug11370.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug11370.tests @@ -0,0 +1,36 @@ +StartGlobalInfo + Tags bug11370 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,21\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1301 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: Disconnect +P2C: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +dP2C: Disconnect +S2P: "226-Ok\r\n226 Vege\r\n" +P2C: "226-Ok\r\n226 Vege\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12342.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12342.tests @@ -0,0 +1,19 @@ +StartGlobalInfo + Tags bug12342 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +C2P: "PORT\r\n" +P2C: "500 Error parsing PORT parameters\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug11316.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug11316.tests @@ -0,0 +1,19 @@ +StartGlobalInfo + Tags bug11316 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220-first\r\n220-second\r\n221-third\r\n2200 fourth\r\n221-fifth\r\nsixth\r\n seventh\r\n220 eighth\r\n" +P2C: "220-first\r\n220-second\r\n" $x "220 eighth\r\n" +#P2C: "220-first\r\n220-second\r\n" "220-221-third\r\n" "220-2200 fourth\r\n" "220-221-fifth\r\n" "220-sixth\r\n" "220- seventh\r\n" "220 eighth\r\n" + +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/other.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/other.tests @@ -0,0 +1,193 @@ +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.transparent_mode = FALSE + self.strict_port_checking = FALSE +EndPolicy + +#Bug 2986 +#Accept all (unknown) command in preconnect state +P2C: "220-Welcome in Zorp FTP proxy authentication module!\r\n\ +220-Please authenticate yourself!\r\n\ +220-Authentication form:\r\n\ +220- USER @\r\n\ +220- PASS \r\n\ +220 \r\n" +C2P: "AUTH SASL\r\n" +P2C: "500 " $NIHIL "\r\n" +C2P: "USER user@remotesite\r\n" +P2C: "331 Username and host okay, send your password.\r\n" +. + +#testing FTP_DATA_PASSIVE and FTP_DATA_ACTIVE + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.data_mode = FTP_DATA_PASSIVE + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1300 +C2P: "PORT " %CLIENT_COMMAIP ",5,20\r\n" +P2S: "PASV\r\n" +PORT = 1289 +SERVER_COMMAIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_COMMAIP ",5,9)\r\n" +P2C: "200 " $NIHIL "\r\n" +C2P: "LIST\r\n" +P2S: "LIST\r\n" +S2P: "150 Data Follow\r\n" +S2P: Accept +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.data_mode = FTP_DATA_ACTIVE + self.strict_port_checking = FALSE +EndPolicy + +StartInfo +Tags qwer +EndInfo + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "PASV\r\n" +P2S: "PORT " $CIP1 "," $CIP2 "," $CIP3 "," $CIP4 "," $CPORT1 "," $CPORT2 "\r\n" +S2P: "200 Ok\r\n" +P2C: "227 Entering Passive mode (" $SIP1 "," $SIP2 "," $SIP3 "," $SIP4 "," $SPORT1 "," $SPORT2 ").\r\n" +C2P: "RETR barmi\r\n" +P2S: "RETR barmi\r\n" +S2P: "150 Data follow\r\n" +TMP_CLIENT_IP = str(CIP1)+'.'+str(CIP2)+'.'+str(CIP3)+'.'+str(CIP4) +CLIENT_PORT = CPORT1*256+CPORT2 +S2P: Connect TMP_CLIENT_IP CLIENT_PORT +TMP_SERVER_IP = str(SIP1)+'.'+str(SIP2)+'.'+str(SIP3)+'.'+str(SIP4) +SERVER_PORT = SPORT1*256+SPORT2 +C2P: Connect TMP_SERVER_IP SERVER_PORT +dS2P: "barmi\r\n" +P2C: "150 Data follow\r\n" +dP2C: "barmi\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +# testing aborted and reinitiated transfer +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,21\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1301 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150 Data Follow\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226 Ok\r\n" +P2C: "226 Ok\r\n" + +C2P: "PORT " %CLIENT_COMMAIP ",5,22\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1302 +C2P: "RETR masik\r\n" +P2S: "RETR masik\r\n" +S2P: "150 Data Follow\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,23\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1303 +C2P: "RETR barmi\r\n" +P2S: "RETR barmi\r\n" +S2P: "150 Data Follow\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "451 Error\r\n" +P2C: "451 Error\r\n" + + +C2P: "PORT " %CLIENT_COMMAIP ",5,24\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1304 +C2P: "RETR barmi\r\n" +P2S: "RETR barmi\r\n" +S2P: "150 Data Follow\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12286.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12286.tests @@ -0,0 +1,17 @@ +StartGlobalInfo + Tags bug12286 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220-first\r\n220-second\r\n220 \r\n" +P2C: "220-first\r\n220-second\r\n220 \r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/transfer.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/transfer.tests @@ -0,0 +1,104 @@ +StartGlobalInfo + Tags bug10795 bug10920 bug10968 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE + self.request_stack["*"] = (FTP_STK_DATA, "/bin/cat >/dev/null; /bin/echo -en '0 SETVERDICT\\\\nn[]Verdict\\\\nnZ_REJECT\\\\nn[]Description\\\\nnNem nyert\\\\nn\\\\nn'>&3; read alma <&3") +EndPolicy + +# Some valid scenarios + +# testing aborted and reinitiated transfer +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,25\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1305 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150 Data Follow\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226-Ok\r\n226-Meg mindig Ok\r\n226 Itt a vege" +P2C: "550 Data transfer failed (Nem nyert)\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,21\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1301 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226-Ok\r\n226 Vege\r\n" +P2C: "226-Ok\r\n226 Vege\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,22\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1302 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +dP2C: "barmi\r\n" +C2P: Disconnect +P2S: Disconnect +dP2S: Disconnect +dP2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug17571.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug17571.tests @@ -0,0 +1,141 @@ +StartGlobalInfo + Tags bug17571 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE + AbstractFtpProxy.loadAnswers(self) +EndPolicy + +S2P: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +P2C: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +C2P: "USER someuser\r\n" +P2S: "USER someuser\r\n" +S2P: "331 User someuser OK. Password required\r\n" +P2C: "331 User someuser OK. Password required\r\n" +C2P: "PASS somepass\r\n" +P2S: "PASS somepass\r\n" +S2P: "230 Your bandwidth usage is restricted\r\n" +P2C: "230 Your bandwidth usage is restricted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen 1290 +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) + +C2P: "LIST\r\n" +P2S: "LIST\r\n" +C2P: Connect C_IP C_PORT +S2P: Accept +S2P: "150 Accepted data connection\r\n" +dS2P: "barmi\r\n" +dS2P: Disconnect +P2C: "150 Accepted data connection\r\n" +dP2C: "barmi\r\n" +dP2C: Disconnect +S2P: "226 Options: -l \r\n" +P2C: "226 Options: -l \r\n" +C2P: "TYPE I\r\n" +P2S: "TYPE I\r\n" +S2P: "200 TYPE is now 8-bit binary\r\n" +P2C: "200 TYPE is now 8-bit binary\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: Connect C_IP C_PORT +C2P: "TYPE A\r\n" +P2S: "TYPE A\r\n" +S2P: "200 TYPE is now ASCII\r\n" +P2C: "200 TYPE is now ASCII\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) + +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "421 Logoff\r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. + +S2P: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +P2C: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +C2P: "USER someuser\r\n" +P2S: "USER someuser\r\n" +S2P: "331 User someuser OK. Password required\r\n" +P2C: "331 User someuser OK. Password required\r\n" +C2P: "PASS somepass\r\n" +P2S: "PASS somepass\r\n" +S2P: "230 Your bandwidth usage is restricted\r\n" +P2C: "230 Your bandwidth usage is restricted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen 1290 +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) + +C2P: "LIST\r\n" +P2S: "LIST\r\n" +C2P: Connect C_IP C_PORT +S2P: Accept +S2P: "150 Accepted data connection\r\n" +dS2P: "barmi\r\n" +S2P: "226 Options: -l \r\n" +P2C: "150 Accepted data connection\r\n" +dS2P: "barmi2\r\n" +dS2P: Disconnect +dP2C: "barmi\r\nbarmi2\r\n" +dP2C: Disconnect +P2C: "226 Options: -l \r\n" +C2P: "TYPE I\r\n" +P2S: "TYPE I\r\n" +S2P: "200 TYPE is now 8-bit binary\r\n" +P2C: "200 TYPE is now 8-bit binary\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: Connect C_IP C_PORT +C2P: "TYPE A\r\n" +P2S: "TYPE A\r\n" +S2P: "200 TYPE is now ASCII\r\n" +P2C: "200 TYPE is now ASCII\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" + +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) + +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "421 Logoff\r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug13633.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug13633.tests @@ -0,0 +1,84 @@ +StartGlobalInfo + Tags bug13633 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 ProFTPD 1.3.1 Server (Debian)\r\n" +P2C: "220 ProFTPD 1.3.1 Server (Debian)\r\n" +C2P: "USER anonymous\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS legion@\r\n" +P2S: "PASS legion@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2C: "230 Anonymous access granted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +PORT=1290 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: Connect C_IP C_PORT +C2P: "NLST\r\n" +P2S: "NLST\r\n" +S2P: "150 Opening ASCII mode data connection for file list\r\n" +S2P: Accept +dS2P: Disconnect +P2C: "150 Opening ASCII mode data connection for file list\r\n" +dP2C: Disconnect +S2P: "226 Transfer complete.\r\n" +P2C: "226 Transfer complete.\r\n" +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 Goodbye.\r\n" +P2C: "221 Goodbye.\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +S2P: "220 ProFTPD 1.3.0 Server (Debian)\r\n" +P2C: "220 ProFTPD 1.3.0 Server (Debian)\r\n" +C2P: "USER anonymous\r\n" +P2S: "USER anonymous\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS legion@\r\n" +P2S: "PASS legion@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2C: "230 Anonymous access granted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +PORT=1290 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: Connect C_IP C_PORT +C2P: "NLST\r\n" +P2S: "NLST\r\n" +S2P: Accept +dS2P: Disconnect +S2P: "226 Transfer complete.\r\n" +dP2C: Disconnect +P2C: "226 Transfer complete.\r\n" +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 Goodbye.\r\n" +P2C: "221 Goodbye.\r\n" +. + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/commands.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/commands.tests @@ -0,0 +1,1543 @@ +#Access control commands +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.request["SMNT"] = (FTP_REQ_ACCEPT) + self.request["REIN"] = (FTP_REQ_ACCEPT) + AbstractFtpProxy.loadAnswers(self) + self.strict_port_checking = FALSE +EndPolicy + +#USER +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "USER rossz_username\r\n" +P2S: "USER rossz_username\r\n" +S2P: "530 Not logged in\r\n" +P2C: "530 Not logged in\r\n" +C2P: "USER jo_username\r\n" +P2S: "USER jo_username\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +. + +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "USER remoteuser@remotehost\r\n" +P2S: "USER remoteuser@remotehost\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +C2P: "USER remoteuser@remotehost\r\n" +P2C: "530 Already logged in.\r\n" +. + +# +# a '\' nem elfogadott karakter a usernevben. +#S2P: "220 Service ready for new user\r\n" +#P2C: "220 Service ready for new user\r\n" +#C2P: "USER usern\ame\r\n" +#P2S: "USER usern\ame\r\n" +#S2P: "230 logged in\r\n" +#P2C: "230 logged in\r\n" +#. + +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "USER ftp@212.40.96.74\r\n" +P2S: "USER ftp@212.40.96.74\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +. + +#PASS +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "331 User name okay, need password\r\n" +P2C: "331 User name okay, need password\r\n" +C2P: "PASS rossz_password\r\n" +P2S: "PASS rossz_password\r\n" +S2P: "530 Not logged in\r\n" +P2C: "530 Not logged in\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "332 Need account for login\r\n" +P2C: "332 Need account for login\r\n" +C2P: "PASS password\r\n" +P2C: "503 Login with USER first.\r\n" +. + +#ACCT +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "332 Need account for login\r\n" +P2C: "332 Need account for login\r\n" +C2P: "ACCT blurp\r\n" +P2S: "ACCT blurp\r\n" +S2P: "530 Not logged in\r\n" +P2C: "530 Not logged in\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "ACCT blurp\r\n" +P2C: "503 Login with USER first.\r\n" +. + +#CWD +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 User logged in, proceed\r\n" +P2C: "230 User logged in, proceed\r\n" + +C2P: "CwD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2C: "250 Requested file action okay, completed\r\n" + +C2P: "CWD utvona\lacska\r\n" +P2S: "CWD utvona\lacska\r\n" +S2P: "501 Syntax error in parameters or arguments\r\n" +P2C: "501 Syntax error in parameters or arguments\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 User logged in, proceed\r\n" +P2C: "230 User logged in, proceed\r\n" + +C2P: "CWD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "502 Command not implemented\r\n" +P2C: "502 Command not implemented\r\n" + +C2P: "CWD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "530 Not logged in\r\n" +P2C: "530 Not logged in\r\n" + +C2P: "CWD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "550 Requested action not taken\r\n" +P2C: "550 Requested action not taken\r\n" + +C2P: "CWD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "260 barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "CWD utvonalacska\r\n" +P2S: "CWD utvonalacska\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#CDUP +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "CDUP valami\r\n" +P2S: "CDUP\r\n" +S2P: "200 ok\r\n" +P2C: "200 ok\r\n" + +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "500 error in command\r\n" +P2C: "500 error in command\r\n" + +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "550 \r\n" +P2C: "550 \r\n" +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "260 barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#SMNT / would mount the volume Stranger1 on Server as a guest +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +C2P: "SMNT Stranger1:Server@*\r\n" +P2S: "SMNT Stranger1:Server@*\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2C: "250 Requested file action okay, completed\r\n" +. + +# would mount the volume Stranger2 on Server which is in the zone MyZone as "fred" with the password "fish" +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +C2P: "SMNT Stranger2:Server@MyZone:fred:fish\r\n" +P2S: "SMNT Stranger2:Server@MyZone:fred:fish\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2C: "250 Requested file action okay, completed\r\n" +. + +#REIN +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "REIN\r\n" +P2S: "REIN\r\n" +S2P: "500 error in command\r\n" +P2C: "500 error in command\r\n" + +C2P: "REiN\r\n" +P2S: "REIN\r\n" +S2P: "220 service ready\r\n" +P2C: "220 service ready\r\n" + +C2P: "REIN\r\n" +P2S: "REIN\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#QUIT +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 \r\n" +P2C: "221 \r\n" +P2C: Disconnect +. +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" +P2C: Disconnect +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "502 barmi\r\n" +P2C: "500 " $NIHIL "\r\n" +. + +#Transfer parameters + +#PORT +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "PORT 1,1,1,1,1,1\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "PORT 1,1,1,1,1\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PORT 1,1,1,1,1,1\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "PORT 1,1,1,1,1,1\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "PORT 1,1,1,1,1,1\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. + +#PASV +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "227 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "227 valami\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "227 (1,1,1,1)\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "227 (1,1,1,1,1,1)\r\n" +P2C: "227 (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "260 barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#MODE +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "504 \r\n" +P2C: "504 \r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "MODE s\r\n" +P2S: "MODE S\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "MODE B\r\n" +P2S: "MODE B\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "MODE C\r\n" +P2S: "MODE C\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "260 barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "MODE K\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "MODE S\r\n" +P2S: "MODE S\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#TYPE +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "TYPE A\r\n" +P2S: "TYPE A\r\n" +S2P: "200 Representation type is ASCII\r\n" +P2C: "200 Representation type is ASCII\r\n" + +C2P: "TYPE I\r\n" +P2S: "TYPE I\r\n" +S2P: "200 Representation type is IMAGE\r\n" +P2C: "200 Representation type is IMAGE\r\n" + +C2P: "TYPE A N\r\n" +P2S: "TYPE A\r\n" +S2P: "200 Representation type is ASCII\r\n" +P2C: "200 Representation type is ASCII\r\n" + +C2P: "TYPE E\r\n" +P2C: "504 Command not implemented\r\n" +. + +#STRU +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "504 \r\n" +P2C: "504 \r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "STRU R\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "STRU P\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "STRU barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "STRU F\r\n" +P2S: "STRU F\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#File action commands + +#ALLO size [ R max-record-size] +StartInfo + Tags kakukk +EndInfo +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "ALLO 1 R 2\r\n" +P2S: "ALLO 1 R 2\r\n" +S2P: "200 Gyuhet\r\n" +P2C: "200 Gyuhet\r\n" + +# Optional argument +C2P: "ALLO 1\r\n" +P2S: "ALLO 1\r\n" +S2P: "200 Gyuhet\r\n" +P2C: "200 Gyuhet\r\n" + +# Arguments must be positiv numbers +C2P: "ALLO almafa R 2\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 R kortefa\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO cseresznye R almafa\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO ringlo\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO -1\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 R -2\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 999999999999999999999999999999999999999999999999999999\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 R 999999999999999999999999999999999999999999999999999999\r\n" +P2C: "500 " $NIHIL "\r\n" + +# Missing argument +C2P: "ALLO\r\n" +P2C: "500 " $NIHIL "\r\n" + +# Bad separator +C2P: "ALLO 1 S 3\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 RR 3\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 R 3\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ALLO 1 R 3\r\n" +P2C: "500 " $NIHIL "\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "202 \r\n" +P2C: "202 \r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "504 \r\n" +P2C: "504 \r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "ALLO 123\r\n" +P2S: "ALLO 123\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + +#REST +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" +C2P: "REST 1500\r\n" +P2S: "REST 1500\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" + +C2P: "REST 0\r\n" +P2S: "REST 0\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" + +# missing marker +C2P: "REST\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "REST any_printable_characters\r\n" +P2S: "REST any_printable_characters\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" +. + +#STOR +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1280 +C2P: "PORT " %CLIENT_COMMAIP ",5,0\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "REST 1500\r\n" +P2S: "REST 1500\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" +C2P: "STOR utvonal\r\n" +P2S: "STOR utvonal\r\n" +S2P: "150 \r\n" +P2C: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +dP2C: Nothing +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1281 +C2P: "PORT " %CLIENT_COMMAIP ",5,1\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "REST 1500\r\n" +P2S: "REST 1500\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" +C2P: "STOR utvonal\r\n" +P2S: "STOR utvonal\r\n" +S2P: "150 \r\n" +P2C: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dC2P: "barmi\r\n" +dP2S: "barmi\r\n" +dC2P: Disconnect +dP2S: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#STOU +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1282 +C2P: "PORT " %CLIENT_COMMAIP ",5,2\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "REST 1500\r\n" +P2S: "REST 1500\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" +C2P: "STOU\r\n" +P2S: "STOU\r\n" +S2P: "150 \r\n" +P2C: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +dP2C: Nothing +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1283 +C2P: "PORT " %CLIENT_COMMAIP ",5,3\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "REST 1500\r\n" +P2S: "REST 1500\r\n" +S2P: "350 \r\n" +P2C: "350 \r\n" +C2P: "STOU\r\n" +P2S: "STOU\r\n" +S2P: "150 \r\n" +P2C: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dC2P: "barmi\r\n" +dP2S: "barmi\r\n" +dC2P: Disconnect +dP2S: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#RETR +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1284 +C2P: "PORT " %CLIENT_COMMAIP ",5,4\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "RETR utvonal\r\n" +P2S: "RETR utvonal\r\n" +S2P: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 \r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#LIST +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1285 +C2P: "PORT " %CLIENT_COMMAIP ",5,5\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "LIST utvonal\r\n" +P2S: "LIST utvonal\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1285 +C2P: "PORT " %CLIENT_COMMAIP ",5,5\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "LIST utvonal\r\n" +P2S: "LIST utvonal\r\n" +S2P: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 \r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1286 +C2P: "PORT " %CLIENT_COMMAIP ",5,6\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "LIST utvonal\r\n" +P2S: "LIST utvonal\r\n" +S2P: "450 \r\n" +P2C: "450 \r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1286 +C2P: "PORT " %CLIENT_COMMAIP ",5,6\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "LIST utvonal\r\n" +P2S: "LIST utvonal\r\n" +S2P: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 \r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#NLST +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1287 +C2P: "PORT " %CLIENT_COMMAIP ",5,7\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "NLST utvonal\r\n" +P2S: "NLST utvonal\r\n" +S2P: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150 \r\n" +dP2C: "barmi\r\n" +dS2P: Disconnect +dP2C: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#APPE +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: Listen 1288 +C2P: "PORT " %CLIENT_COMMAIP ",5,8\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" +C2P: "APPE utvonal\r\n" +P2S: "APPE utvonal\r\n" +S2P: "150 \r\n" +P2C: "150 \r\n" +FW_IP = str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +FW_PORT = PORT1*256 + PORT2 +S2P: Connect FW_IP FW_PORT +C2P: Accept +dC2P: "barmi\r\n" +dP2S: "barmi\r\n" +dC2P: Disconnect +dP2S: Disconnect +S2P: "226 \r\n" +P2C: "226 \r\n" +. + +#RNFR / RNTO +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "350 szoveg szoveg\r\n" +P2C: "350 szoveg szoveg\r\n" +C2P: "RNTO barmire\r\n" +P2S: "RNTO barmire\r\n" +S2P: "250 valami barmi\r\n" +P2C: "250 valami barmi\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "100 szoveg szoveg\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "350 szoveg szoveg\r\n" +P2C: "350 szoveg szoveg\r\n" +C2P: "RNTO barmire\r\n" +P2S: "RNTO barmire\r\n" +S2P: "150 valami barmi\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "350 szoveg szoveg\r\n" +P2C: "350 szoveg szoveg\r\n" +C2P: "RNTO barmire\r\n" +P2S: "RNTO barmire\r\n" +S2P: "502 valami barmi\r\n" +P2C: "502 valami barmi\r\n" +. + +#missing or invalid RNFR +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "550 szoveg szoveg\r\n" +P2C: "550 szoveg szoveg\r\n" +C2P: "RNTO barmire\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "RNFR barmirol\r\n" +P2S: "RNFR barmirol\r\n" +S2P: "550 szoveg szoveg\r\n" +P2C: "550 szoveg szoveg\r\n" +C2P: "RNTO barmire\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "RNTO barmire\r\n" +P2C: "500 " $NIHIL "\r\n" +. + +#DELE +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "250 ok\r\n" +P2C: "250 ok\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "450 not ok\r\n" +P2C: "450 not ok\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "550 not ok\r\n" +P2C: "550 not ok\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "500 se\r\n" +P2C: "500 se\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "501 se\r\n" +P2C: "501 se\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "502 cni\r\n" +P2C: "502 cni\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "530 nli\r\n" +P2C: "530 nli\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "563 nli\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "DELE utvonalacska\r\n" +P2S: "DELE utvonalacska\r\n" +S2P: "421 sd\r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. + +#RMD +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "250 \r\n" +P2C: "250 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "550 \r\n" +P2C: "550 \r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "551 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "RMD barmi\r\n" +P2S: "RMD barmi\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#MKD +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "257 \r\n" +P2C: "257 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "550 \r\n" +P2C: "550 \r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "551 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "MKD barmi\r\n" +P2S: "MKD barmi\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#PWD +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "257 \r\n" +P2C: "257 \r\n" + +C2P: "PWD\r\n" +P2S: "PWD\r\n" +S2P: "257 \r\n" +P2C: "257 \r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "550 \r\n" +P2C: "550 \r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "551 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "PWD barmi\r\n" +P2S: "PWD\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +URG = chr(255)+chr(244)+chr(242) +#ABOR +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "225 \r\n" +P2C: "225 \r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "226 \r\n" +P2C: "226 \r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "227 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. + +#Informational commands + +#SYST +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "215 \r\n" +P2C: "215 \r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "216 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "SYST\r\n" +P2S: "SYST\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#STAT +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "211 \r\n" +P2C: "211 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "212 \r\n" +P2C: "212 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "213 \r\n" +P2C: "213 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "450 \r\n" +P2C: "450 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "216 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "STAT\r\n" +P2S: "STAT\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.request["HELP"] = (FTP_REQ_ACCEPT) + self.request["SITE"] = (FTP_REQ_ACCEPT) + self.request["EPRT"] = (FTP_REQ_ACCEPT) + self.request["EPSV"] = (FTP_REQ_ACCEPT) + AbstractFtpProxy.loadAnswers(self) + self.strict_port_checking = FALSE +EndPolicy + + +#HELP and multi-line help reply +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "HELP\r\n" +P2S: "HELP\r\n" +S2P: "214-First line\r\n\ +Second line\r\n\ + 234 A line beginning with numbers\r\n\ +214 The last line\r\n" +P2C: "214-First line\r\n\ +214-Second line\r\n\ +214- 234 A line beginning with numbers\r\n\ +214 The last line\r\n" + +C2P: "HELP USER\r\n" +P2S: "HELP USER\r\n" +S2P: "214 \r\n" +P2C: "214 \r\n" + +C2P: "HELP user\r\n" +P2S: "HELP user\r\n" +S2P: "214 \r\n" +P2C: "214 \r\n" + +C2P: "HELP barmi\r\n" +P2S: "HELP barmi\r\n" +S2P: "211 \r\n" +P2C: "211 \r\n" + +C2P: "HELP USER\r\n" +P2S: "HELP USER\r\n" +S2P: "502 \r\n" +P2C: "502 \r\n" + +C2P: "HELP USER\r\n" +P2S: "HELP USER\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +#Miscellaneous commands + +#SITE +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "SITE HELP\r\n" +P2S: "SITE HELP\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "SITE LISTUSER\r\n" +P2S: "SITE LISTUSER\r\n" +S2P: "202 \r\n" +P2C: "202 \r\n" + +C2P: "SITE akarmi\r\n" +P2S: "SITE akarmi\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" + +C2P: "SITE 123\r\n" +P2S: "SITE 123\r\n" +S2P: "530 \r\n" +P2C: "530 \r\n" + +#C2P: "SITE\r\n" +#P2C: "500 " $NIHIL "\r\n" +. + +#NOOP +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "NOOP\r\n" +P2S: "NOOP\r\n" +S2P: "200 \r\n" +P2C: "200 \r\n" + +C2P: "NOOP\r\n" +P2S: "NOOP\r\n" +S2P: "500 \r\n" +P2C: "500 \r\n" + +C2P: "NOOP\r\n" +P2S: "NOOP\r\n" +S2P: "504 \r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "NOOP\r\n" +P2S: "NOOP\r\n" +S2P: "421 \r\n" +P2C: "421 Logoff\r\n" +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.data_port_min = 40500 + self.data_port_max = 40500 + self.request["EPSV"] = (FTP_REQ_ACCEPT) + self.request["EPRT"] = (FTP_REQ_ACCEPT) + AbstractFtpProxy.loadAnswers(self) + self.strict_port_checking = FALSE +EndPolicy + +#EPSV +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "EPSV 1\r\n" +P2S: "EPSV\r\n" +S2P: "229 Entering Extended Passive Mode (|||40500|)\r\n" +P2C: "229 Entering Extended Passive Mode (|||40500|)\r\n" + +C2P: "EPSV\r\n" +P2S: "EPSV\r\n" +S2P: "229 Entering Extended Passive Mode (|||40500|)\r\n" +P2C: "229 Entering Extended Passive Mode (|||40500|)\r\n" + +C2P: "EPSV ALL\r\n" +P2S: "EPSV\r\n" +S2P: "229 \r\n" +P2C: "229 \r\n" + +C2P: "EPSV 2\r\n" +P2S: "EPSV\r\n" +S2P: "501 \r\n" +P2C: "501 \r\n" +. + +#EPRT +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +C2P: "EPRT |1|10.2.3.6|40500|\r\n" +P2S: "EPRT |1|127.0.0.1|40500|\r\n" +S2P: "200 Command OK_1\r\n" +P2C: "200 Command OK_1\r\n" + +C2P: "EPRT |1|w3.org|40500|\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "EPRT |||40500|\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "EPRT |2|1080::8:800:200C:417A|40500|\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "EPRT |1080::8:800:200C:417A|40500|\r\n" +P2C: "500 " $NIHIL "\r\n" + +C2P: "EPRT\r\n" +P2C: "500 " $NIHIL "\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12941.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug12941.tests @@ -0,0 +1,72 @@ +StartGlobalInfo + Tags bug12941 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE +EndPolicy + + +URG = chr(255)+chr(244)+chr(242) + +#FIXME: This is not the best behaviour. But for now it's enough to +# not get abnormal program termination. +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,21\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1301 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +dP2C: "barmi\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +S2P: "225 \r\n" +P2C: "550 Data transfer failed\r\n" +. + +S2P: "220 kesz\r\n" +P2C: "220 kesz\r\n" +C2P: "USER user\r\n" +P2S: "USER user\r\n" +S2P: "230 logged in\r\n" +P2C: "230 logged in\r\n" + +CLIENT_COMMAIP = string.replace(ZTS_CLIENT_IP,".",",") +C2P: "PORT " %CLIENT_COMMAIP ",5,21\r\n" +P2S: "PORT " $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 "\r\n" +PORT = PORT1*256 + PORT2 +IP = str(IP1)+'.'+str(IP2)+'.'+str(IP3)+'.'+str(IP4) +S2P: "200 Ok\r\n" +P2C: "200 Ok\r\n" +C2P: Listen 1301 +C2P: "RETR egyik\r\n" +P2S: "RETR egyik\r\n" +S2P: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +S2P: Connect IP PORT +C2P: Accept +dS2P: "barmi\r\n" +P2C: "150-Data Follow\r\n150-Kakukk\r\n150 Vege\r\n" +dP2C: "barmi\r\n" +C2P: "ABOR\r\n" +P2S: %URG "ABOR\r\n" +S2P: "225 \r\n" +P2C: "225 \r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug3043.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug3043.tests @@ -0,0 +1,37 @@ +StartGlobalInfo + Tags bug3043 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.timeout = 3000 + self.strict_port_checking = FALSE + AbstractFtpProxy.loadAnswers(self) +EndPolicy + +# Some valid scenarios + +S2P: "220 Szia\r\n" +P2C: "220 Szia\r\n" +C2P: "USER ftp\r\n" +P2S: "USER ftp\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS myself@\r\n" +P2S: "PASS myself@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2C: "230 Anonymous access granted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: "LIST\r\n" +P2S: "LIST\r\n" +A=time.sleep(10) +P2C: "500 Connection timed out\r\n" +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug17571b.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/bug17571b.tests @@ -0,0 +1,68 @@ +StartGlobalInfo + Tags bug17571 +EndGlobalInfo + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.strict_port_checking = FALSE + AbstractFtpProxy.loadAnswers(self) +EndPolicy + + +S2P: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +P2C: "220 --------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n" +C2P: "USER someuser\r\n" +P2S: "USER someuser\r\n" +S2P: "331 User someuser OK. Password required\r\n" +P2C: "331 User someuser OK. Password required\r\n" +C2P: "PASS somepass\r\n" +P2S: "PASS somepass\r\n" +S2P: "230 Your bandwidth usage is restricted\r\n" +P2C: "230 Your bandwidth usage is restricted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen 1290 +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: "LIST\r\n" +P2S: "LIST\r\n" +C2P: Connect C_IP C_PORT +S2P: Accept +S2P: "150 Accepted data connection\r\n" +dS2P: "barmi\r\n" +S2P: "226 Options: -l \r\n" +P2C: "150 Accepted data connection\r\n" +dS2P: "barmi2\r\n" +dS2P: Disconnect +dP2C: "barmi\r\nbarmi2\r\n" +dP2C: Disconnect +P2C: "226 Options: -l \r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +C2P: "TYPE I\r\n" +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: Connect C_IP C_PORT +P2S: "TYPE I\r\n" +C2P: "PASV\r\n" +S2P: "200 TYPE is now 8-bit binary\r\n" +P2C: "200 TYPE is now 8-bit binary\r\n" +P2S: "PASV\r\n" +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,11)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "421 Logoff\r\n" +P2C: "421 Logoff\r\n" +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/valid-scenarios.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/ftp/func/cases/valid-scenarios.tests @@ -0,0 +1,127 @@ +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.request["SMNT"] = (FTP_REQ_ACCEPT) + self.request["REIN"] = (FTP_REQ_ACCEPT) + self.strict_port_checking = FALSE + AbstractFtpProxy.loadAnswers(self) +EndPolicy + +# Some valid scenarios + +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "USER username\r\n" +P2S: "USER username\r\n" +S2P: "331 User name okay, need password\r\n" +P2C: "331 User name okay, need password\r\n" +C2P: "PASS password\r\n" +P2S: "PASS password\r\n" +S2P: "332 Need account for login\r\n" +P2C: "332 Need account for login\r\n" +C2P: "ACCT account\r\n" +P2S: "ACCT account\r\n" +S2P: "230 User logged in, proceed\r\n" +P2C: "230 User logged in, proceed\r\n" +C2P: "CWD /home/test/\r\n" +P2S: "CWD /home/test/\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2C: "250 Requested file action okay, completed\r\n" +C2P: "CDUP\r\n" +P2S: "CDUP\r\n" +S2P: "200 Command okay\r\n" +P2C: "200 Command okay\r\n" +C2P: "SMNT server\r\n" +P2S: "SMNT server\r\n" +S2P: "250 Requested file action okay, completed\r\n" +P2C: "250 Requested file action okay, completed\r\n" +C2P: "REIN\r\n" +P2S: "REIN\r\n" +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 \r\n" +P2C: "221 \r\n" +P2C: Disconnect +. + +# PASS when no password is required +# Bazsi 2004-01-23 +# bug: 1642 + +S2P: "220 Service ready for new user\r\n" +P2C: "220 Service ready for new user\r\n" +C2P: "USER username\r\n" +P2S: "USER username\r\n" +S2P: "230 Authenticated, no password needed\r\n" +P2C: "230 Authenticated, no password needed\r\n" +C2P: "PASS password\r\n" +P2S: "PASS password\r\n" +S2P: "230 I said no password was needed\r\n" +P2C: "230 I said no password was needed\r\n" +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 \r\n" +P2C: "221 \r\n" +P2C: Disconnect +. + +S2P: "220 Szia\r\n" +P2C: "220 Szia\r\n" +C2P: "USER ftp\r\n" +P2S: "USER ftp\r\n" +S2P: "331 Send your password\r\n" +P2C: "331 Send your password\r\n" +C2P: "PASS myself@\r\n" +P2S: "PASS myself@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2C: "230 Anonymous access granted\r\n" +C2P: "PASV\r\n" +P2S: "PASV\r\n" +PORT=1290 +SERVER_DOTIP=string.replace(ZTS_SERVER_IP,".",",") +S2P: Listen PORT +S2P: "227 Entering Passive Mode (" %SERVER_DOTIP ",5,10)\r\n" +P2C: "227 Entering Passive Mode (" $IP1 "," $IP2 "," $IP3 "," $IP4 "," $PORT1 "," $PORT2 ")\r\n" +C_PORT=PORT1*256+PORT2 +C_IP=str(IP1)+"."+str(IP2)+"."+str(IP3)+"."+str(IP4) +C2P: "LIST\r\n" +P2S: "LIST\r\n" +S2P: "150 Data Follow\r\n" +S2P: Accept +C2P: Connect C_IP C_PORT +dS2P: "barmi\r\n" +P2C: "150 Data Follow\r\n" +dP2C: "barmi\r\n" +dC2P: "masikbarmi\r\n" +dP2S: Nothing +. + +StartPolicy + def config(self): + FtpProxyRW.config(self) + self.transparent_mode = FALSE + self.strict_port_checking = FALSE +EndPolicy + +P2C: "220-Welcome in Zorp FTP proxy authentication module!\r\n\ +220-Please authenticate yourself!\r\n\ +220-Authentication form:\r\n\ +220- USER @\r\n\ +220- PASS \r\n\ +220 \r\n" +C2P: "USER user@remotesite\r\n" +P2C: "331 Username and host okay, send your password.\r\n" +C2P: "PASS password@\r\n" +S2P: "220 Udv\r\n" +P2S: "USER user\r\n" +S2P: "331 Send your password\r\n" +P2S: "PASS password@\r\n" +S2P: "230 Anonymous access granted\r\n" +P2C: "230 Anonymous access granted\r\n" +C2P: "QUIT\r\n" +P2S: "QUIT\r\n" +S2P: "221 Goodbye.\r\n" +P2C: "221 Goodbye.\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/finger/spec +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/finger/spec @@ -0,0 +1,6 @@ +StartSpec + Proxy FingerProxy + ZSleep 2 + CSleep 2 +EndSpec + --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/finger/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/finger/info @@ -0,0 +1 @@ +Base-Class: FingerProxy --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/finger/attr/cases/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/finger/attr/cases/timeout.tests @@ -0,0 +1,29 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_hop_count = 1 + self.timeout = 3000 +EndPolicy + +C2P: "barki@barhol.com@" +A=time.sleep(6) +C2P: "barhonnan.hu@barkie.org\r\n" +#P2S: "barki@barhol.com\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "barki@barhol.com@barhonnan.hu@barkie.org\r\n" +P2S: "barki@barhol.com\r\n" +S2P: "peldaul " +A=time.sleep(6) +S2P: "barmilyen valasz\r\n" +#P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/finger/attr/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/finger/attr/cases/testcases @@ -0,0 +1,198 @@ + + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_hop_count = 1 +EndPolicy + +#strict_username_check = TRUE +C2P: "&^%*(+-@barmi.com\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "barki@barhol.com@barhonnan.hu@barkie.org\r\n" +P2S: "barki@barhol.com\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "barki@barhol.com\r\n" +P2S: "barki@barhol.com\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_hostname_length = 5 + self.max_hop_count = 10 +EndPolicy + +C2P: "barki@123.56\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + + +C2P: "barki@12.45\r\n" +P2S: "barki@12.45\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_line_length = 12 + self.max_hop_count = 10 +EndPolicy + +C2P: "barki@12.45\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "barki@12.4\r\n" +P2S: "barki@12.4\r\n" +S2P: "barmilyen\r\n" +P2C: "barmilyen\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_username_length = 5 + self.max_hop_count = 10 +EndPolicy + +C2P: "barkimas@alsomucsaj.hu\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "barki@alsomucsaj.hu\r\n" +P2S: "barki@alsomucsaj.hu\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + self.max_hop_count = 10 + def fingerRequest(self, username, hostname): + if self.request_detailed == 1: + self.request_detailed = 0 + else: + self.request_detailed = 1 + if self.request_hostnames == '@mucsajalso.net': + self.request_hostnames = '@mucsajfelso.org' + if self.request_hostnames == '@mucsajalso.net@verpelet.org': + self.request_hostnames = '@mucsajfelso.org@lachaza.net@verpelet.org' + if self.request_username == 'barki': + self.request_username = 'barkimas' + return Z_ACCEPT +EndPolicy + +C2P: "/W akarki@barhol.net\r\n" +P2S: "akarki@barhol.net\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + + +C2P: "akarki@barhol.net\r\n" +P2S: "/W akarki@barhol.net\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "akarki@mucsajalso.net\r\n" +P2S: "/W akarki@mucsajfelso.org\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "akarki@mucsajalso.net@verpelet.org\r\n" +P2S: "/W akarki@mucsajfelso.org@lachaza.net@verpelet.org\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. +C2P: "barki@barhol.net\r\n" +P2S: "/W barkimas@barhol.net\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "barki@mucsajalso.net\r\n" +P2S: "/W barkimas@mucsajfelso.org\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.response_header = "header " + self.response_footer = "footer" + self.strict_username_check = FALSE + self.max_hop_count = 10 +EndPolicy + +C2P: "barki@12.45\r\n" +P2S: "barki@12.45\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "header peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: "footer" +P2C: Disconnect +. + +C2P: "&^%*(+-@barmi.com\r\n" +P2S: "&^%*(+-@barmi.com\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "header peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: "footer" +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_hop_count = 10 + self.timeout = 6000 +EndPolicy + +C2P: "barki@12.45\r\n" +P2S: "barki@12.45\r\n" +. + +C2P: "b" +A= time.sleep(6) +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. \ No newline at end of file --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/finger/func/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/finger/func/cases/testcases @@ -0,0 +1,261 @@ + +StartPolicy + def config(self): + self.max_hop_count = 4 +EndPolicy + +#Format: {C} / null command line +C2P: "\r\n" +P2S: "\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "aztan meg sok barmilyen valasz\r\n" +P2C: "aztan meg sok barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: " \r\n" +P2S: "\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "aztan meg sok barmilyen valasz\r\n" +P2C: "aztan meg sok barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +#Format: {W}{C} +C2P: "/W\r\n" +P2S: "/W\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "aztan meg sok barmilyen valasz\r\n" +P2C: "aztan meg sok barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: " /W\r\n" +P2S: "/W\r\n" +. + +C2P: "/w\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +#Format: {W}{S}{U}{C} / name specified request +C2P: "/W username\r\n" +P2S: "/W username\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "aztan meg sok barmilyen valasz\r\n" +P2C: "aztan meg sok barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "&^%*(+-@hostname.org\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "/W username\r\n" +P2S: "/W username\r\n" +. + +C2P: "/W user@gepnev\r\n" +P2S: "/W user@gepnev\r\n" +. + +C2P: "/W user name\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "/Wusername\r\n" +P2S: "/W username\r\n" +. + +C2P: " /W username\r\n" +P2S: "/W username\r\n" +. + +C2P: "/w username\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +#Format: {H}{C} +C2P: "@hostnev.org\r\n" +P2S: "@hostnev.org\r\n" +. + +C2P: "@192.168.131.46\r\n" +P2S: "@192.168.131.46\r\n" +. + +C2P: "@hostnev\r\n" +P2S: "@hostnev\r\n" +. + +C2P: " @hostnev.org\r\n" +P2S: "@hostnev.org\r\n" +. + +C2P: "hostnev.org\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +C2P: "@hostnev.org@hostnev.org\r\n" +P2S: "@hostnev.org@hostnev.org\r\n" +. + +C2P: "@hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "@hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "@hostnev.org@hostnev.org alma korte\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +#Format: {W}{S}{H}{C} +C2P: "/W @hostnev.org\r\n" +P2S: "/W @hostnev.org\r\n" +. + +C2P: "/W @hostnev\r\n" +P2S: "/W @hostnev\r\n" +. + +C2P: "/W@hostnev.org\r\n" +P2S: "/W @hostnev.org\r\n" +. + +C2P: "/W @hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "/W @hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "/W@hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "/W @hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "/W @hostnev.org@hostnev.org@hostnev.org alma korte\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +#Format:{U}{H}{C} +C2P: "user@hostnev.org\r\n" +P2S: "user@hostnev.org\r\n" +. + +C2P: "user@hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "user@hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "user@hostnev.org@hostnev.org@hostnev.org alma korte\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +C2P: "barmi user@hostnev.org@hostnev.org@hostnev.org\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +P2C: Disconnect +. + +#Format:{W}{S}{U}{H}{C} +C2P: "/W user@hostnev.hu\r\n" +P2S: "/W user@hostnev.hu\r\n" +. + +C2P: "/Wuser@hostnev.hu\r\n" +P2S: "/W user@hostnev.hu\r\n" +. + +C2P: "/W user@hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "/W user@hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "/W user@hostnev.org@hostnev.org@hostnev.org alma korte\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +C2P: "/W barmi user@hostnev.org@hostnev.org@hostnev.org\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +C2P: "/Wuser@hostnev.org@hostnev.org@hostnev.org\r\n" +P2S: "/W user@hostnev.org@hostnev.org@hostnev.org\r\n" +. + +C2P: "/Wuser@hostnev.org@hostnev.org@hostnev.org alma korte\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +C2P: "/Wbarmi user@hostnev.org@hostnev.org@hostnev.org\r\n" +P2C: "Finger protocol or disallowed protocol element, request denied.\r\n" +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.max_hop_count = 1 +EndPolicy + +C2P: "user@hostname1.org@hostname2.org@hostname3.org\r\n" +P2S: "user@hostname1.org\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +C2P: "user@hostname1.org\r\n" +P2S: "user@hostname1.org\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) + self.response_header = "header " + self.response_footer = "footer" +EndPolicy + +C2P: "user@hostname\r\n" +P2S: "user\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "header peldaul barmilyen valasz\r\n" +S2P: Disconnect +P2C: "footer" +P2C: Disconnect +. + +StartPolicy + def config(self): + FingerProxy.config(self) +EndPolicy + +#Long line in response +C2P: "\r\n" +P2S: "\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "a"x1024 +P2C: Disconnect +. + +#Many lines in response +C2P: "\r\n" +P2S: "\r\n" +S2P: "peldaul barmilyen valasz\r\n" +P2C: "peldaul barmilyen valasz\r\n" +S2P: "a\r\n"x50 +P2C: "a\r\n"x50 +S2P: Disconnect +P2C: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/plug/spec +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/plug/spec @@ -0,0 +1,3 @@ +StartSpec + Proxy PlugProxy +EndSpec --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/plug/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/plug/info @@ -0,0 +1 @@ +Base-Class: PlugProxy --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/plug/attr/cases/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/plug/attr/cases/timeout.tests @@ -0,0 +1,24 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + self.timeout = 3000 +EndPolicy + +C2P: "1" +A=time.sleep(6) +C2P: "2" +P2S: "1" +P2S: Disconnect +P2C: Disconnect +. + +S2P: "1" +A=time.sleep(6) +S2P: "2" +P2C: "1" +P2C: Disconnect +P2S: Disconnect +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/plug/attr/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/plug/attr/cases/testcases @@ -0,0 +1,66 @@ + +StartPolicy + def config(self): + self.copy_to_server=FALSE +EndPolicy + +C2P: "Nem_megy_at" +S2P: "Atmegy" +P2C: "Atmegy" +. + +StartPolicy + def config(self): + self.copy_to_client=FALSE +EndPolicy + +C2P: "Atmegy" +P2S: "Atmegy" +S2P: "Nem_megy_at" +. + +StartPolicy + def config(self): + self.timeout = 2000 +EndPolicy + +C2P: "Atmegy" +P2S: "Atmegy" +A= time.sleep(3) +P2C: Disconnect +P2S: Disconnect +. + +StartPolicy + def config(self): + self.packet_stats_interval_packet = 5 + + def packetStats(self, client_bytes, client_pkts, server_bytes, server_pkts): + return Z_ACCEPT +EndPolicy + +C2P: "C1" +P2S: "C1" +S2P: "S1" +P2C: "S1" +C2P: "C2" +P2S: "C2" +S2P: "S2" +P2C: "S2" +C2P: "C3" +P2S: "C3" +S2P: "S3" +P2C: "S3" +C2P: "C4" +P2S: "C4" +S2P: "S4" +P2C: "S4" +C2P: "C5" +P2S: "C5" +S2P: "S5" +P2C: "S5" +C2P: "C6" +P2S: "C6" +S2P: "S6" +P2C: "S6" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/plug/func/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/plug/func/cases/testcases @@ -0,0 +1,33 @@ + +#First case. Proxy working? + +StartPolicy + def config(self): + pass +EndPolicy + + +C2P: "Haho" +P2S: "Haho" +S2P: "Hello" +P2C: "Hello" +. +#Testing bidirectional + +C2P: "One" +S2P: "Two" +P2C: "Two" +P2S: "One" +. +#Testing forced-one-way + +StartPolicy + def config(self): + PlugProxy.config(self) + self.copy_to_server=FALSE +EndPolicy + +C2P: "Nem_megy_at" +S2P: "Atmegy" +P2C: "Atmegy" +. \ No newline at end of file --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/whois/spec +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/whois/spec @@ -0,0 +1,3 @@ +StartSpec + Proxy WhoisProxy +EndSpec --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/whois/info +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/whois/info @@ -0,0 +1 @@ +Base-Class: WhoisProxy --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/whois/attr/cases/timeout.tests +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/whois/attr/cases/timeout.tests @@ -0,0 +1,23 @@ +StartGlobalInfo + Tags timeout D-01046 bug12123 +EndGlobalInfo + +StartPolicy + def config(self): + WhoisProxy.config(self) + self.timeout = 2000 + self.max_line_length = 10 +EndPolicy + +C2P: "keres\r\n" +P2S: "keres\r\n" +A= time.sleep(3) +S2P: "barmi\r\n" +. + +C2P: "keres" +A= time.sleep(3) +C2P: "\r\n" +#P2S: "keres\r\n" +P2C: "Whois protocol error or disallowed protocol element, request denied.\r\n" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/whois/attr/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/whois/attr/cases/testcases @@ -0,0 +1,85 @@ +StartPolicy + def config(self): + WhoisProxy.config(self) + self.timeout = 2000 + self.max_line_length = 10 +EndPolicy + +# Timeout check moved to timeout.tests + +C2P: "12345678\r\n" +P2S: "12345678\r\n" +. + +C2P: "123456789\r\n" +P2C: "Whois protocol error or disallowed protocol element, request denied.\r\n" +. + +C2P: "12345678\r\n" +P2S: "12345678\r\n" +S2P: "12345678\r\n" +P2C: "12345678\r\n" +. + +C2P: "12345678\r\n" +P2S: "12345678\r\n" +S2P: "123456789\r\n" +P2S: Disconnect +P2C: Disconnect +. + +StartPolicy + def config(self): + WhoisProxy.config(self) + self.max_request_length = 10 +EndPolicy + +C2P: "1234567890\r\n" +P2S: "1234567890\r\n" +. +C2P: "12345678901\r\n" +P2C: "Whois protocol error or disallowed protocol element, request denied.\r\n" +. + +C2P: "1234567890\r\n" +P2S: "1234567890\r\n" +S2P: "1234567890\r\n" +P2C: "1234567890\r\n" +. +C2P: "1234567890\r\n" +P2S: "1234567890\r\n" +S2P: "12345678901\r\n" +P2C: "12345678901\r\n" +. + +StartPolicy + def config(self): + WhoisProxy.config(self) + def whoisRequest(self, request): + if self.request == "minta": + return Z_ACCEPT + else: + return Z_REJECT +EndPolicy + +C2P: "minta\r\n" +P2S: "minta\r\n" +. + +C2P: "nem minta\r\n" +P2C: "Policy violation, request denied.\r\n" +. + +StartPolicy + def config(self): + WhoisProxy.config(self) + self.response_header = "eleje" + self.response_footer = "vege" +EndPolicy + +C2P: "request\r\n" +P2S: "request\r\n" +S2P: "response\r\n" +S2P: Disconnect +P2C: "elejeresponse\r\nvege" +. --- zorp-3.3.6.orig/debian/zorp-tests/usr/share/zorp/testdb/whois/func/cases/testcases +++ zorp-3.3.6/debian/zorp-tests/usr/share/zorp/testdb/whois/func/cases/testcases @@ -0,0 +1,50 @@ +StartPolicy + def config(self): + WhoisProxy.config(self) +EndPolicy + +C2P: "dump domain netsol.com\r\n" +P2S: "dump domain netsol.com\r\n" +S2P: "response\r\n" +P2C: "response\r\n" +. + +C2P: "?\r\n" +P2S: "?\r\n" +S2P: "list\r\n" +P2C: "list\r\n" +. + +C2P: "\r\n" +P2S: "\r\n" +S2P: "response\r\n" +P2C: "response\r\n" +. + +C2P: "arin.net.134.48.4.129\r\n" +P2S: "arin.net.134.48.4.129\r\n" +S2P: "response\r\n" +P2C: "response\r\n" +. + +C2P: "valami@valami\r\n" +P2S: "valami@valami\r\n" +S2P: "response\r\n" +P2C: "response\r\n" +. + +C2P: "~!@#$%^&*()_+{}|:?>\r\n" +P2S: "~!@#$%^&*()_+{}|:?>\r\n" +S2P: "response\r\n" +P2C: "response\r\n" +. + +C2P: "a"x1024 "\r\n" +P2C: "Whois protocol error or disallowed protocol element, request denied.\r\n" +. + +C2P: "keres\r\n" +P2S: "keres\r\n" +S2P: "a"x1024 "\r\n" +P2C: Disconnect +. --- zorp-3.3.6.orig/doc/man/zorp-config.1 +++ zorp-3.3.6/doc/man/zorp-config.1 @@ -0,0 +1,60 @@ +.\" Copyright (c) 2003-2004 BalaBit IT Ltd. +.TH ZORP-CONFIG 5 "March 10, 2004" +.SH NAME +zorp-config \- Zorp compilation environment +.SH SYNOPSIS +zorp-config [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] +.SH DESCRIPTION + +Zorp is a new generation proxy firewall suite for Unix based operating +systems. + +\fIzorp-config\fP is a tool that is used to configure to determine +the compiler and linker flags that should be used to compile Zorp modules. + +.SH OPTIONS + +.TP +.B --prefix + +.TP +.B --exec-prefix + +.TP +.B --version + +.TP +.B --cppflags + +.TP +.B --cflags + +.TP +.B --libs + +.TP +.B --local-cppflags + +.TP +.B --local-cflags + +.TP +.B --local-libs + +.TP +.B --datadir + +.TP +.B --moduledir + +.TP +.B --trace + +.TP +.B --debug + +.SH SEE ALSO +.BR zorp (8) +.SH AUTHOR +This manual page was written by rpd Magosnyi and Balzs +Scheidler . --- zorp-3.3.6.orig/pylib/kznf/Makefile +++ zorp-3.3.6/pylib/kznf/Makefile @@ -0,0 +1,536 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# pylib/kznf/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +pkgdatadir = $(datadir)/zorp +pkglibdir = $(libdir)/zorp +pkgincludedir = $(includedir)/zorp +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = pylib/kznf +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/zorpconfig.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run autoconf +AUTOHEADER = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run autoheader +AUTOMAKE = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run automake-1.10 +AWK = mawk +BINARY_BRANCH = +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -O2 -Wall -W -Werror-implicit-function-declaration -g -D_GNU_SOURCE +CPP = gcc -E +CPPFLAGS = -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/lib -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +CURRDATE = Thu, 15 Jul 2010 22:44:51 +0200 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DEPS_CPPFLAGS = -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +DEPS_LIBS = -lnsl -lpython2.6 -lrt -lm -lutil -ldl +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +GLIB_LIBS = -lglib-2.0 +GLIB_MIN_VERSION = 2.2.1 +GPERF = /usr/bin/gperf +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MODULES_CPPFLAGS = -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/libproxy/ -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/lib -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +MODULES_LIBS = -L$(top_builddir)/libproxy/ -lzorpproxy +MODULETESTS_LIBS = -L$(top_builddir)/libproxy/ -lzorpproxy -L$(top_builddir)/lib/ -lzorp -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +MODULE_DIRS = anypy finger ftp http plug pssl whois telnet +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENSSL_CFLAGS = +OPENSSL_CPPFLAGS = -I/usr/include +OPENSSL_LIBS = none required -lssl -lcrypto none required +OPENSSL_MIN_VERSION = 0.9.7 +OSIP_CFLAGS = +OSIP_LIBS = +OSIP_MAX_VERSION = 3 +OSIP_MIN_VERSION = 2.2.1 +OTOOL = +OTOOL64 = +PACKAGE = zorp +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_SUFFIX = -gpl +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PCAP_LIBS = +PKG_CONFIG = /usr/bin/pkg-config +PYTHON = /usr/bin/python +PYTHON_MIN_VERSION = 2.4 +RANLIB = ranlib +RELEASE_TAG = zorp30dbg +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +SNAPSHOT_VERSION = +SOCK_LIBS = -lnsl +SOURCE_REVISION = +STRIP = strip +TESTCASES = functional/finger/attr/config functional/finger/attr/cases/timeout.tests functional/finger/attr/cases/testcases functional/finger/info functional/finger/spec functional/finger/func/config functional/finger/func/cases/testcases functional/ftp/attr/config functional/ftp/attr/cases/timeout.tests functional/ftp/attr/cases/testcases functional/ftp/info functional/ftp/func/config functional/ftp/func/cases/commands.tests functional/ftp/func/cases/bug17571.tests functional/ftp/func/cases/bug12286.tests functional/ftp/func/cases/other.tests functional/ftp/func/cases/bug12941.tests functional/ftp/func/cases/bug13633.tests functional/ftp/func/cases/bug3043.tests functional/ftp/func/cases/bug11316.tests functional/ftp/func/cases/valid-scenarios.tests functional/ftp/func/cases/transfer.tests functional/ftp/func/cases/bug17571b.tests functional/ftp/func/cases/bug12342.tests functional/ftp/func/cases/bug11370.tests functional/http/protocol/strict-header-check.tests functional/http/protocol/http-0.9.tests functional/http/protocol/content-length.tests functional/http/protocol/rerequest.tests functional/http/protocol/proto-upgrade.tests functional/http/protocol/headers.tests functional/http/protocol/small-web-latency.tests functional/http/protocol/changing-host-headers.tests functional/http/protocol/no-entity.tests functional/http/protocol/smuggle.tests functional/http/protocol/parent-proxy.tests functional/http/protocol/non-transparent/host-rewrite.tests functional/http/protocol/non-transparent/connection-rewrite.tests functional/http/protocol/non-transparent/ftp-over-http.tests functional/http/protocol/non-transparent/info functional/http/protocol/non-transparent/authenticated-connect.tests functional/http/protocol/non-transparent/direct-connect.tests functional/http/protocol/non-transparent/authenticated-proxy-connect.tests functional/http/protocol/limit-checks.tests functional/http/protocol/url-encoding.tests functional/http/protocol/short-status-line.tests functional/http/protocol/keep-persistent.tests functional/http/protocol/host-header.tests functional/http/protocol/bug13705.tests functional/http/protocol/basic.tests functional/http/protocol/inband-auth.tests functional/http/protocol/persistent-mode.tests functional/http/policy/dynamic/policy-calls.tests functional/http/policy/dynamic/mime-type.tests functional/http/policy/dynamic/header-manip.tests functional/http/policy/permit-unicode-url.tests functional/http/policy/permit-both-conn-hdrs.tests functional/http/policy/use_default_port.tests functional/http/policy/accepted-methods.tests functional/http/policy/rejected-methods.tests functional/http/policy/timeout.tests functional/http/policy/permit-invalid-hex-escape.tests functional/http/policy/use_canonical.tests functional/http/policy/rewrite_url.tests functional/http/transfer/mime-stacked-content-length.tests functional/http/transfer/http-1.1-0.9-fallback-chunking.tests functional/http/transfer/bug14351.tests functional/http/transfer/no-content-length-hint.tests functional/http/transfer/upload-error-page.tests functional/http/transfer/info functional/http/transfer/body-length-limit.tests functional/http/transfer/chunked-conversion.tests functional/http/transfer/zero-sized-post.tests functional/http/transfer/negative-content-length.tests functional/http/transfer/chunked-encoding.tests functional/http/info functional/plug/attr/config functional/plug/attr/cases/timeout.tests functional/plug/attr/cases/testcases functional/plug/info functional/plug/spec functional/plug/func/config functional/plug/func/cases/testcases functional/whois/attr/config functional/whois/attr/cases/timeout.tests functional/whois/attr/cases/testcases functional/whois/info functional/whois/spec functional/whois/func/config functional/whois/func/cases/testcases functional/telnet/commands/config functional/telnet/commands/info functional/telnet/commands/cases/testcases functional/telnet/attr/config functional/telnet/attr/info functional/telnet/attr/cases/timeout.tests functional/telnet/attr/cases/testcases functional/telnet/info functional/telnet/func/config functional/telnet/func/cases/testcases +VERSION = 3.3.6 +XMLSEC_CFLAGS = +XMLSEC_LIBS = +ZLIB_LIBS = -lz +ZORPLIC_CFLAGS = +ZORPLIC_LIBS = +ZORPLIC_MIN_VERSION = 3.3.0 +ZORPLL_CFLAGS = -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +ZORPLL_LIBS = -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +ZORPLL_MIN_VERSION = 3.3.0.0 +ZORPMISC_CFLAGS = +ZORPMISC_LIBS = +ZORPMISC_MIN_VERSION = 3.3.0.0 +ZORP_LIBS = -L$(top_builddir)/lib/ -lzorp -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +ZORP_OS = Linux +ZORP_PACKAGE_LICENSE = gpl +ZORP_PROC = i686 +abs_builddir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/pylib/kznf +abs_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/pylib/kznf +abs_top_builddir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +abs_top_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chf - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/install-sh +libdir = ${prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pidfiledir = ${prefix}/var/run/zorp/ +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc/zorp +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +zorp_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +EXTRA_DIST = setup.py +SUBDIRS = kznf +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pylib/kznf/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign pylib/kznf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: install-exec-local + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-local install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am + + +clean: + $(PYTHON) $(top_srcdir)/pylib/kznf/setup.py clean --all + +distclean: clean + +install-exec-local: + $(PYTHON) $(top_srcdir)/pylib/kznf/setup.py install --prefix $(DESTDIR)/$(prefix) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: --- zorp-3.3.6.orig/pylib/kznf/kznf/Makefile +++ zorp-3.3.6/pylib/kznf/kznf/Makefile @@ -0,0 +1,373 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# pylib/kznf/kznf/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +pkgdatadir = $(datadir)/zorp +pkglibdir = $(libdir)/zorp +pkgincludedir = $(includedir)/zorp +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = pylib/kznf/kznf +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/zorpconfig.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run autoconf +AUTOHEADER = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run autoheader +AUTOMAKE = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run automake-1.10 +AWK = mawk +BINARY_BRANCH = +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -O2 -Wall -W -Werror-implicit-function-declaration -g -D_GNU_SOURCE +CPP = gcc -E +CPPFLAGS = -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/lib -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +CURRDATE = Thu, 15 Jul 2010 22:44:51 +0200 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DEPS_CPPFLAGS = -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +DEPS_LIBS = -lnsl -lpython2.6 -lrt -lm -lutil -ldl +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +GLIB_LIBS = -lglib-2.0 +GLIB_MIN_VERSION = 2.2.1 +GPERF = /usr/bin/gperf +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +MODULES_CPPFLAGS = -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/libproxy/ -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/lib -I/home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.6 +MODULES_LIBS = -L$(top_builddir)/libproxy/ -lzorpproxy +MODULETESTS_LIBS = -L$(top_builddir)/libproxy/ -lzorpproxy -L$(top_builddir)/lib/ -lzorp -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +MODULE_DIRS = anypy finger ftp http plug pssl whois telnet +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENSSL_CFLAGS = +OPENSSL_CPPFLAGS = -I/usr/include +OPENSSL_LIBS = none required -lssl -lcrypto none required +OPENSSL_MIN_VERSION = 0.9.7 +OSIP_CFLAGS = +OSIP_LIBS = +OSIP_MAX_VERSION = 3 +OSIP_MIN_VERSION = 2.2.1 +OTOOL = +OTOOL64 = +PACKAGE = zorp +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_SUFFIX = -gpl +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PCAP_LIBS = +PKG_CONFIG = /usr/bin/pkg-config +PYTHON = /usr/bin/python +PYTHON_MIN_VERSION = 2.4 +RANLIB = ranlib +RELEASE_TAG = zorp30dbg +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +SNAPSHOT_VERSION = +SOCK_LIBS = -lnsl +SOURCE_REVISION = +STRIP = strip +TESTCASES = functional/finger/attr/config functional/finger/attr/cases/timeout.tests functional/finger/attr/cases/testcases functional/finger/info functional/finger/spec functional/finger/func/config functional/finger/func/cases/testcases functional/ftp/attr/config functional/ftp/attr/cases/timeout.tests functional/ftp/attr/cases/testcases functional/ftp/info functional/ftp/func/config functional/ftp/func/cases/commands.tests functional/ftp/func/cases/bug17571.tests functional/ftp/func/cases/bug12286.tests functional/ftp/func/cases/other.tests functional/ftp/func/cases/bug12941.tests functional/ftp/func/cases/bug13633.tests functional/ftp/func/cases/bug3043.tests functional/ftp/func/cases/bug11316.tests functional/ftp/func/cases/valid-scenarios.tests functional/ftp/func/cases/transfer.tests functional/ftp/func/cases/bug17571b.tests functional/ftp/func/cases/bug12342.tests functional/ftp/func/cases/bug11370.tests functional/http/protocol/strict-header-check.tests functional/http/protocol/http-0.9.tests functional/http/protocol/content-length.tests functional/http/protocol/rerequest.tests functional/http/protocol/proto-upgrade.tests functional/http/protocol/headers.tests functional/http/protocol/small-web-latency.tests functional/http/protocol/changing-host-headers.tests functional/http/protocol/no-entity.tests functional/http/protocol/smuggle.tests functional/http/protocol/parent-proxy.tests functional/http/protocol/non-transparent/host-rewrite.tests functional/http/protocol/non-transparent/connection-rewrite.tests functional/http/protocol/non-transparent/ftp-over-http.tests functional/http/protocol/non-transparent/info functional/http/protocol/non-transparent/authenticated-connect.tests functional/http/protocol/non-transparent/direct-connect.tests functional/http/protocol/non-transparent/authenticated-proxy-connect.tests functional/http/protocol/limit-checks.tests functional/http/protocol/url-encoding.tests functional/http/protocol/short-status-line.tests functional/http/protocol/keep-persistent.tests functional/http/protocol/host-header.tests functional/http/protocol/bug13705.tests functional/http/protocol/basic.tests functional/http/protocol/inband-auth.tests functional/http/protocol/persistent-mode.tests functional/http/policy/dynamic/policy-calls.tests functional/http/policy/dynamic/mime-type.tests functional/http/policy/dynamic/header-manip.tests functional/http/policy/permit-unicode-url.tests functional/http/policy/permit-both-conn-hdrs.tests functional/http/policy/use_default_port.tests functional/http/policy/accepted-methods.tests functional/http/policy/rejected-methods.tests functional/http/policy/timeout.tests functional/http/policy/permit-invalid-hex-escape.tests functional/http/policy/use_canonical.tests functional/http/policy/rewrite_url.tests functional/http/transfer/mime-stacked-content-length.tests functional/http/transfer/http-1.1-0.9-fallback-chunking.tests functional/http/transfer/bug14351.tests functional/http/transfer/no-content-length-hint.tests functional/http/transfer/upload-error-page.tests functional/http/transfer/info functional/http/transfer/body-length-limit.tests functional/http/transfer/chunked-conversion.tests functional/http/transfer/zero-sized-post.tests functional/http/transfer/negative-content-length.tests functional/http/transfer/chunked-encoding.tests functional/http/info functional/plug/attr/config functional/plug/attr/cases/timeout.tests functional/plug/attr/cases/testcases functional/plug/info functional/plug/spec functional/plug/func/config functional/plug/func/cases/testcases functional/whois/attr/config functional/whois/attr/cases/timeout.tests functional/whois/attr/cases/testcases functional/whois/info functional/whois/spec functional/whois/func/config functional/whois/func/cases/testcases functional/telnet/commands/config functional/telnet/commands/info functional/telnet/commands/cases/testcases functional/telnet/attr/config functional/telnet/attr/info functional/telnet/attr/cases/timeout.tests functional/telnet/attr/cases/testcases functional/telnet/info functional/telnet/func/config functional/telnet/func/cases/testcases +VERSION = 3.3.6 +XMLSEC_CFLAGS = +XMLSEC_LIBS = +ZLIB_LIBS = -lz +ZORPLIC_CFLAGS = +ZORPLIC_LIBS = +ZORPLIC_MIN_VERSION = 3.3.0 +ZORPLL_CFLAGS = -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +ZORPLL_LIBS = -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +ZORPLL_MIN_VERSION = 3.3.0.0 +ZORPMISC_CFLAGS = +ZORPMISC_LIBS = +ZORPMISC_MIN_VERSION = 3.3.0.0 +ZORP_LIBS = -L$(top_builddir)/lib/ -lzorp -pthread -lzorpll -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 +ZORP_OS = Linux +ZORP_PACKAGE_LICENSE = gpl +ZORP_PROC = i686 +abs_builddir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/pylib/kznf/kznf +abs_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/pylib/kznf/kznf +abs_top_builddir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +abs_top_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chf - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6/install-sh +libdir = ${prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +pidfiledir = ${prefix}/var/run/zorp/ +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc/zorp +target_alias = +top_build_prefix = ../../../ +top_builddir = ../../.. +top_srcdir = ../../.. +zorp_srcdir = /home/sasa/src/debian/zorp/zorp-3.3.6/zorp-3.3.6 +EXTRA_DIST = __init__.py nfnetlink.py kznfnetlink.py +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pylib/kznf/kznf/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign pylib/kznf/kznf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: