winrash - Windows Remote Asynchronous SHell

A simple windows service originally designed for the Wine project to facilitate automated testing.

Why "winrash"?  Lots of other names were already taken, like tsh(tiny shell), rsh(remote shell), etc.  Its also an interesting play on words for the handful of guys that came up with the name.

Basic program flow:

SF project page

CVSWeb


The scripting file is quite simple at the moment

Command set:
cookie <name> <value>
Add a cookie with a name of <name> and value of <value>.  All cookies will be put into the url that is sent to the server.  This allows for multiple downloads to be individually tracked and managed.
cookie <name>
Remove cookie named <name>
download <local_file_name> <url_of_file_to_download>
Download a file as a given name
error_sleep <seconds>
If an error is encountered, how many seconds should we sleep before trying to retrieve a new script from the server address.  Default sleep on error is 7200 seconds(2 hours).
error_url <url>
Winrash will build an error report file and HTTP post it to this url upon error.  If this key is not set no error reporting will take place and winrash will wait for the time set by 'error_sleep' before downloading a new script from the server address.
gpgverify filename
Runs 'gpg --verify filename' to authenticate a download
If gpg verification fails no exes will be executed until a new script is downloaded.
run <local_exe_name> <arg1> <arg2> ...
execute the local_exe_name, waits for completion before continuing to processing commands
sleep <seconds>
sleeps XX seconds before processing the next command
unzip <local_zip_name>
unzip a zip file



The url sent to the server is of format:

http://serveraddress/script?winrash=<serviceVersion>?id=<clientID>?cookie_name1=cookie_value1?cookie_name2=...


serviceVersion - a value compiled into winrash found in winrash.c
clientID - a registry value that identifies the
           client(HKEY_LOCAL_MACHINE\Software\winrash\ClientID)



The format for the error report that will be http posted if 'error_url' was set:
Winrash version: 1
ClientID: ID_NOT_SET
Operating system:
    dwMajorVersion=5
    dwMinorVersion=1
    dwBuildNumber=2600
    PlatformId=2
    szCSDVersion=Service Pack 1
    wServicePackMajor=1
    wServicePackMinor=0
    wProductType=1240696
    wReserved=1243416
Cookies:
Script:
0       download winrash-20040405.exe http://winrash.sf.net/winrash.exe
1       fork winrash-20040405.exe
Command in error:
    0


Software requirements to compile:

Written by Chris Morgan<cmorgan@alum.wpi.edu>


SourceForge.net Logo

Last updated: 4/5/2004