Socket Script Manual Release version 1.16 - Feb 1999 ------------------------------- Table of contents ----------------- 1 - Introduction 2 - Installation 2.1 - Getting Socket Script 2.2 - Uncompressing 2.3 - Configuring 2.4 - SOCKS5 support 2.5 - Compiling 3 - Getting started 3.1 - Interpreter 3.2 - Composer 3.3 - Debugger 3.4 - Enterprise Remote Script Serving 3.5 - Getting your hands in Socket Script coding 4 - Functions 4.1 - Commands 4.2 - Variables 4.3 - Libraries 4.4 - Adding commands to SScript 4.5 - DES encryption 4.6 - SSL support 4.7 - PGP encryption 5 - Getting help A - Release and technical notes B - Contact information C - Error codes D - Legal notice ----------------------------------------- 1 Introduction ----------------------------------------- Socket Script is a simple scripting language to access sockets. It was designed to provide users with a quick and easy scripting language to make powerfull networking applications, without the need to learn C or complicated socket code. You can easily learn it by reading the tutorial and using this file as reference. It can be used for functions including retrieving web pages, making an IRC bot, information server, redir program, network monitor tool, online forms, web server, ICMP watcher, and many more. It was made to do simple or complex scripts that use the network. Socket Script is always under development, so please contact me if you find any bug. Note that Socket Script is a language, while the sscript binary is the language interpreter. Main Socket Script functions are available as a C library on the SScript web page for those who wants to code in C. ----------------------------------------- 2 Installation ----------------------------------------- 2.1 Getting Socket Script Socket Script (also called SScript) is available for free on the web. You can use any browser to go on the main SScript page at: http://devplanet.fastethernet.net/sscript.html or http://mirrors.darkelf.net or ftp://sunsite.unc.edu/pub/Linux/devel You can use 'Lynx' to see our web site from the command line. Or, if you use a GUI, 'Xmosaic' is available from NCSA, or 'Netscape Navigator' from www.netscape.com The systems where SScript was tested on are Linux ELF 2.x, Solaris 2.5.x, BSD/OS 3.0, FreeBSD 2.2.x and Windows 95/NT. Note that the Windows 95/NT (also called win32) is far from being 100% compatible with the functions in the Unix version. See the win32 documentation for win32 help. You can also order a CD-ROM (ISO9660 CD) from DevPlanet. See Appendix B for contact information. The CD-ROM contains binaries and source for all the SScript releases in /sscript/binaries and /sscript/source. 2.2 Uncompressing Once you have the latest SScript .tar.gz file, you can uncompress it with the following command: gzip -d sscriptX.XX.tar.gz tar -xvf sscriptX.XX.tar Where X.XX is the version number. 2.3 Configuring When SScript is uncompressed, you need to configure it to check your system and your preferences. To do this, simply type in: ./configure This will launch a configuration program that will ask you a few questions on how you want to compile Socket Script. The first asks you for your platform. You can find this out by typing, in the shell: uname The second asks you if you want to compile as a graphical application, or as a console (text only) application. For graphical application you need to have access to the X-Window system, and have the GTK library available at http://www.gtk.org SScript was made with GTK 1.0.x, but should work with future versions. Then it will ask you some questions on what to include in SScript. When the config is done, it will create two files: config.h and Makefile. You then may want to customize your config.h and sscript.h by editing them in the directory /src. 2.4 SOCKS5 support SScript can be easily made to work with a SOCKS5 proxy server. You need the SOCKS5 package (which is available from www.socks.nec.com) installed on the system, and the file /etc/libsocks5.conf configured like, for example: socks5 - - - - Ask your system admin to do this if you aren't root. You also need to tell the SScript configuration program that you want SOCKS5 support. 2.5 Compiling When the config is done, you can compile SScript by typing: make It can possibly print a few warnings on your screen, but it shouldn't have any error. If there are errors, you can contact me about it (see Appendix B). ----------------------------------------- 3 Getting started ----------------------------------------- 3.1 Interpreter To start SScript type: ./sscript Note that SScript is a multi-languages program. You can change the language with the LANG environment variable with the following command: setenv LANG english or export LANG=english depending on the shell you're using. The supported languages are english, french and spanish. This program reads the file sscript.file when you start it up, or you can specify a script or project file in the command line. If you specify a project file, it must be name.prj and it must contain a list of script you want SScript to merge, one after the other, in the following syntax: $include script-name. See example.prj for details about project files. There are many examples with this version of SScript that you can use to create your own applications. I suggest you begin by simply trying the examples, then looking at how they were made: ./sscript ./examples/ Where is the example you want to try. SScript logs by default in sscript.log. It also has a few other command line commands, including the composer and debugger, as you will see below. Use: sscript -help for a complete list. 3.2 Composer SScript comes with a composer. This is a graphical frontend that allows you to write scripts. You can write your scripts with any text editor, but in the case where you don't have one handy, you can always use the SScript composer. To start it, type: ./sscript -c