--- wbox-5.orig/debian/copyright +++ wbox-5/debian/copyright @@ -0,0 +1,24 @@ +This work was packaged for Debian by: + + Alberto Furia on Thu, 10 Dec 2009 17:13:13 +0100 + +It was downloaded from http://www.hping.org/wbox/ + +Upstream Author: + + Salvatore 'antirez' Sanfilippo - antirez@gmail.com + +Copyright: + + Copyright (C) 2007 Salvatore Sanfilippo + +License: + + New BSD license + +The Debian packaging is: + + Copyright (C) 2009 Alberto Furia + +and is licensed under the New BSD license, +see `/usr/share/common-licenses/BSD'. --- wbox-5.orig/debian/control +++ wbox-5/debian/control @@ -0,0 +1,25 @@ +Source: wbox +Section: web +Priority: optional +Maintainer: Alberto Furia +Build-Depends: debhelper (>= 7), dpatch +Standards-Version: 3.8.3 +Homepage: http://www.hping.org/wbox/ + +Package: wbox +Architecture: any +Depends: ${shlibs:Depends} +Description: HTTP testing tool and configuration-less HTTP server + Wbox aims to help you having fun while testing HTTP related stuff. + You can use it to perform many tasks, including the following. + * Benchmarking how much time it takes to generate content + for your web application. + * Web server and web application stressing. + * Testing virtual domains configuration without the need to alter + your local resolver. + * Check if your redirects are working correctly emitting + the right HTTP code. + * Test if the HTTP compression is working and if it is actually + serving pages faster. + * Use it as a configuration-less HTTP server to share files! + (it's as simple as % wbox servermode webroot /tmp) --- wbox-5.orig/debian/compat +++ wbox-5/debian/compat @@ -0,0 +1 @@ +7 --- wbox-5.orig/debian/rules +++ wbox-5/debian/rules @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +# debian/rules for wbox by Alberto Furia +# Written from scratch. + +include /usr/share/dpatch/dpatch.make + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_FLAGS += -s +endif + + +build: patch-stamp build-stamp + +build-stamp: + $(MAKE) DESTDIR=$(CURDIR)/debian/wbox wbox + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/wbox + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs Changelog + dh_installdocs + dh_installman + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary install --- wbox-5.orig/debian/wbox.manpages +++ wbox-5/debian/wbox.manpages @@ -0,0 +1 @@ +debian/wbox.1 --- wbox-5.orig/debian/docs +++ wbox-5/debian/docs @@ -0,0 +1,4 @@ +AUTHORS +README +TODO +debian/TUTORIAL --- wbox-5.orig/debian/wbox.1 +++ wbox-5/debian/wbox.1 @@ -0,0 +1,93 @@ +.TH WBOX 1 "December 10, 2009" +.SH NAME +wbox \- HTTP testing tool and configuration-less HTTP server +.SH SYNOPSIS +\fBwbox\fP [ options ] +.br +\fBwbox\fP servermode webroot [serverport (def 8081)] +.PP +.SH DESCRIPTION +\fIwbox\fP aims to help you having fun while testing HTTP related stuff. You can use it to perform many tasks, including the following: +.PP +- Benchmarking how much time it takes to generate content for your web application. +.PP +- Web server and web application stressing. +.PP +- Testing virtual domains configuration without the need to alter your local resolver. +.PP +- Use it as a \fBconfiguration-less HTTP server\fP to share files! +.SH OPTIONS + +.PP +.TP +.I +Stop after requests +.TP +.I compr +Send Accept-Encoding: gzip,deflate in request +.TP +.I showhdr +Show the HTTP reply header +.TP +.I dump +Show the HTTP reply header + body +.TP +.I silent +Don't show status lines +.TP +.I head +Use the HEAD method instead of GET +.TP +.I http10 +Use HTTP/1.0 instead of HTTP/1.1 +.TP +.I close +Close the connection after reading few bytes +.TP +.I host +Use as Host: field in HTTP request +.TP +.I timesplit +Show transfer times for different data chunks +.TP +.I wait +Wait seconds between requests. Default 1. +.TP +.I clients +Spawn concurrent clients (via fork()). +.TP +.I referer +Send the specified referer header. +.TP +.I cookie +Set cookie name=val, can be used multiple times. +.TP +.I maxclients +Max concurrent clients in \fBserver mode\fI (default 20). +.TP +.I \-h or \-\-help +Show this help. +.TP +.I \-v +Show version. +.SH USAGE EXAMPLES +.LP +wbox wikipedia.org (simplest, basic usage) +.LP +wbox wikipedia.org 3 compr wait 0 (three requests, compression, no delay) +.LP +wbox wikipedia.org 1 showhdr silent (just show the HTTP reply header) +.LP +wbox wikipedia.org timesplit (show splitted time information) +.LP +wbox 1.2.3.4 host example.domain (test a virtual domain at 1.2.3.4) +.LP +wbox servermode webroot /tmp/mydocuments (Try it with http://127.0.0.1:8081) +.SH TUTORIAL +Wbox is trivial to use but, in order to understand better what wbox is and how to use it, +you may want to read the TUTORIAL inside the /usr/share/doc/wbox/ directory. +.SH AUTHOR +wbox was written by Salvatore 'antirez' Sanfilippo . +.PP +This manual page was written by Alberto Furia , +for the Debian project (and may be used by others). --- wbox-5.orig/debian/README.source +++ wbox-5/debian/README.source @@ -0,0 +1,3 @@ +wbox for Debian +--------------- +This package build-depends on dpatch as patch system but needs no special handling instructions so simply take a look at /usr/share/doc/dpatch/README.source.gz --- wbox-5.orig/debian/TUTORIAL +++ wbox-5/debian/TUTORIAL @@ -0,0 +1,243 @@ +****** Wbox TUTORIAL - taken from http://www.hping.org/wbox/ ****** + +***** HTTP client mode ***** + +The following is a short tutorial. Wbox is trivial to use but you may want to +read this in order to understand better what wbox is and how to use it. + +**** Basic usage **** + +The simplest way to use wbox is to call it with just one argument, an url: + +% wbox www.google.it +WBOX www.google.it (64.233.183.99) port 80 +0. 200 OK 3774 bytes 407 ms +1. 200 OK (3767) bytes 273 ms +2. 200 OK 3767 bytes 304 ms +3. 200 OK 3767 bytes 260 ms +user terminated + +As you can see wbox in this mode of operation resembles the ping_utility. For +every performed HTTP request it shows the sequence number of the request (0.), +the HTTP reply code and reason string (200 OK), the number of bytes received +from the server (3774 bytes), and the time the request took to complete in +milliseconds (407 ms). There are two details to note. + + * The number of received bytes includes the HTTP reply header, so it is not + equal to the document length. + * Every time it changes compared to the previous HTTP reply, the number of + received bytes is put between parens, like in (3767) + +**** Limiting the number of requests **** + +By default wbox will continue to perform requests forever, until you don't +press Ctrl+C. After the url argument you can pass a number of options to wbox +to alter its behaviour, one of this is an integer number specifying how many +requests to perform. + +% wbox www.google.it/notexistingpage.html 1 +WBOX www.google.it (64.233.183.103) port 80 +0. 404 Not Found 1495 bytes 310 ms + +This time wbox terminated after the first request was received. + +**** Obtaining splitted timing information **** + +Usually web applications don't spend the same time in the generation of every +part of the page. With wbox it's possible to obtain time information for +different parts of the document using the timesplit option. + +% wbox digg.com timesplit 1 +WBOX digg.com (64.191.203.30) port 80 +0. 200 OK 44134 bytes 1326 ms + [0] 0-4095 -> 728 ms + [1] 4096-8191 -> 254 ms + [2] 8192-12287 -> 16 ms + [3] 12288-16383 -> 17 ms + [4] 16384-20479 -> 225 ms + [5] 20480-24575 -> 12 ms + [6] 24576-28671 -> 16 ms + [7] 28672-32767 -> 18 ms + [8] 32768-36863 -> 16 ms + [9] 36864-40959 -> 16 ms + [10] 40960-44133 -> 8 ms + +**** Dumping data **** + +We may like to see what kind of HTTP reply google is emitting on 404 errors, +the option showhdr tells wbox to dump the HTTP reply header. + +% wbox www.google.it/notexistingpage.html 1 showhdr +WBOX www.google.it (64.233.183.103) port 80 + +HTTP/1.1 404 Not Found +Content-Type: text/html +Server: GWS/2.1 +Content-Length: 1368 +Date: Tue, 05 Jun 2007 16:49:58 GMT + +0. 404 Not Found 1495 bytes 540 ms + +We may like to use wbox inside a shell script in order to collect different +headers, so the option silent tells wbox to don't show status lines. + +% wbox www.google.it/notexistingpage.html 1 showhdr silent +HTTP/1.1 404 Not Found +Content-Type: text/html +Server: GWS/2.1 +Content-Length: 1368 +Date: Tue, 05 Jun 2007 16:51:52 GMT + +It's also possible to dump the whole reply using the dump option. + +% wbox www.google.it/notexistingpage.html 1 dump silent +HTTP/1.1 404 Not Found +Content-Type: text/html +Server: GWS/2.1 +Content-Length: 1368 +Date: Tue, 05 Jun 2007 16:53:44 GMT + + + + + +404 Not Found +