$Id: README,v 1.10 2004/09/14 14:37:42 jombart Exp $ ----------------------------------------------------------------------------- WSPP (c) 2003-2004 Nicolas Jombart Herve Schauer Consultants - http://www.hsc.fr ----------------------------------------------------------------------------- 1. Overview WSPP is a HTTP<->WSP proxy. You may call it a reverse WAP gateway. wml-aware browser <-- HTTP --> WSPP <-- WSP --> WAP GW <-- HTTP --> HTTP Server or tool WSPP does not implement full WSP specification, as this would be a very long work. It should only be able to forward a simple request to a WAP gateway, using connectionless WSP, in order to allow you to use it like any webserver. In other words, if you really want to deal with WSP, use another tool that can handle all parameters, or add them to WSPP code :-) You will have to configure localhost:PORT as a proxy (default port is 8000) in your browser/environnement/pentest tool/... /\ WSPP is in alpha stage, but stable enough to allow you / \ to test some sites. It can not be used to build a ---- production HTTP<->WSP proxy. 2. WSP and WSPP A WSP packet will looks like (tethereal captures): User Datagram Protocol, Src Port: 49615 (49615), Dst Port: 9200 (9200) Source port: 49615 (49615) Destination port: 9200 (9200) Length: 128 Checksum: 0xc6e3 (correct) Wireless Session Protocol Transaction ID: 0x01 PDU Type: Get (0x40) URI Length: 21 URI: http://wapserver.tld/ Headers Accept: text/vnd.wap.wml Accept: application/vnd.wap.wmlc Accept: image/vnd.wap.wbmp Accept: image/gif Accept: image/jpeg Accept: text/vnd.wap.wmlscript Accept: application/vnd.wap.wmlscriptc User-Agent: Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 WSPP puts a few headers (shown in the packet), and add the one it receives: Wireless Session Protocol, Method: Reply (0x04), Status: 200 OK (0x20), Content-Type: text/html Transaction ID: 0x01 PDU Type: Reply (0x04) Status: 200 OK (0x20) Headers Length: 53 Content-Type: text/html; charset=iso-8859-1 Charset: iso-8859-1 Headers Date: Sep 5, 2004 12:34:26.000000000 Server: Apache Last-Modified: Aug 26, 2004 15:11:28.000000000 ETag: "b54041-769-412de180" Accept-Ranges: bytes Content-Length: 1897 Line-based text data: text/html (...) Here is a capture from the HTTP point of view: ecu@silver % nc 0 8000 GET http://ipv42.net/ HTTP/1.0 HTTP/1.1 200 OK Content-Type: text/html Content-Length: 1897 Via: WSP (WSPP proxy) v0.02 Date: Sun Sep 5 12:34:26 2004 Server: Apache Last-Modified: Thu Aug 26 15:11:28 2004 Etag: "b54041-769-412de180" Accept-Ranges: bytes (...) Full specification is provided by WAP Forum: http://www1.wapforum.org/tech/terms.asp?doc=WAP-203_005-WSP-20010717-a.pdf Accept and User-Agent headers are hardcoded. You need to change User-Agent in wspp.h if you need. Therefore, these headers from HTTP are ignored. Implementation in WSPP includes: . Connectionless WSP . GET PDU (GET, OPTIONS, HEAD, DELETE and TRACE) . POST PDU (POST only) . Headers submitted in HTTP are forwarded (except Content-Length and and User-Agent). Supported headers are: Host Authorization WWW-Authenticate Cookie Proxy-Authorization Proxy-Authenticate Referer Accept Accept-Language Content-Disposition Content-Type (for POST PDU) Values are encoded in textual mode, except Accept, Content-Type and Content-Disposition . All headers given in response are translated in the HTTP response from the proxy. . Valid languages are en, es, fr, ru, de, ja, sv and co (for Content-Language, from the gateway response). 3. Usage % wspp Only is mandatory. Default values for other options are: GW PORT : 9200 LISTEN PORT : 8000 In order to test it, you can use kannel (actually, kannel is the only one gateway fully tested). Download it at http://www.kannel.org/ and lauch by: % bearerbox % wapbox Typical use: % ppp -ddial YOURWAPAPN % sudo route add GW_ADDR ENDPOINT % ./wspp GW_ADDR % nc 0 8000 GET http://whatever/ HTTP/1.0 4. Author Nicolas Jombart 5. Thanks . Franck Davy from HSC for great ideas . Bozohttpd authors 6. Bugs - Many (see BUGS) - Feel free to send bug reports, patches to me - Please also send success of failure report with unknown gateways, a full pcap capture can help. Thanks for using WSPP !