by Eggo
This file is a text version of 'script.hlp' Basic layout for a ScarabScript: ## Scarab Demo Script ## Dont try to use this, it wont do anything. cat=CATAGORY NAME\0 " func=FUNCTION NAME\script commands;" " func=FUNCTION NAME2\script commands;" catend=CATAGORY NAME\0 As you can see the script format is very simple, at the start of the script you must define the catagory name. This is done on the line cat=CATAGORY NAME\0 (the \0 is used for decoding purpuses). Then come the sub-functions, the basic commands that the user will interact with. They are formated just as simply, " func=FUNCTION NAME\script commands;", as you can see the entire function is enclosed in "quotes", this is nessesary for the decoder. Note the space after the first quote mark, dont forget this it is important. The second thing that you see is func=, this is self explanitory. Notice that the FUNCTION NAME comes right after the = sign, no space. After the function name there is a \, this slash separates the ScarabScript Code from the function name. Notice how in the comments there are TWO number signs on the very left margin. Any lines with two number signs as the first chars will be ignored by the decoder. The comment lenghts from the second number sign to the end of the line. script commands: disp'Y'; Y=TEXT TO DISPLAY (VARIABLES ALLOWED) send'Y'; Y=TEXT TO SEND (VARIABLES ALLOWED) note: The send command replaces | with ; getuser$X'Y'; Y=QUESTION TO ASK USER (NO VAR) X=VARIABLE TO USE stop; Stops the script at this point pflash; Flash the taskbar to get user attention clearvarbuffer; clear the variable buffer (will NOT clear system variables) disconnect; this will disconnect from the server execplug'Y'; Y=Plugin executable name, as listed in the program menus execscript'Y'; Y=Script name, must be in the same CATAGORY (see selcat) selcat'Y'; Y=Catagory to switch to msgbox'Y'; Y=Message to display in the popup dialog errmsgbox'Y'; Y=Error message to display in the popup dialog set'VARIABLE=DATA'; VARIABLE=what to set too, DATA=what to set timeout'Y'; Y=duration of pause getdata$VARIABLE'what key'; Gets saved information putdata'what key=what information'; Saves information ifthen'$z=$y'{msgbox'$z = $y'}; Checks if $z is the equivilent of $y, if it is popup the messagebox note: you may only execute one function in the brackets of the IFTHEN statment. note2: do not use a semicolon inside of the brackets debugbuffer Pops up about 500 message boxs with all the buffer data in them dont mess with this, it will drive you insane. the following are system variables: $T = Local (Client) Time $D = Local (Client) Date $L = Local (Client) IP Address $R = Remote (Server) xIP Address $H = User (Client) Handle\Nickname The Scarab Protocol (get ready for a headache): Normal Layout: [ATRRIBUTES]<FUNCTIONNAME[*CLIENT_HANDLE]> example: ($a=newdate $H=username) $a<CHANGESYSTIME*$H> would be sent as NEWDATE<CHANGESYSTIME*USERNAME> As you can see the protocol is basically simple. Make sure you format the script that sends it correctly, and make sure the protocol is correct. For validation issues such as REBOOTING THE SYSTEM where the user of the client is asked if he is sure, this is because the server requires an Y to complete the task. If you are always sure then edit the script and delete the GETUSER statement, then edit the SEND command so it looks more like 'Y<REBOOTWIN*$H>' instead of '$a<REBOOTWIN*$H'. This allows you to customize the client so it works best for you! I know it is a little confusing at first, but you will get used to it. It's really easy then. -Eggo <[email protected]>MegaSecurity