Slingex Viewer:
===============
We require a web application that does the following:
Get a list from a local socket
Performs some sql querys from local mssql db.
Displays the list along with results from sql and some buttons
When a button is clicked, it may:
run a command on the web server.
run a command on the client (for example [login to view URL] server ip)
Specs:
DB structure:
db name is "slingex"
table users:
username, password(SHA1ed), client
table clients:
client(bigint), name
Main:
-----
login with username and password.
There is a db table named users, with a username field and a password field - which contains the SHA1 of the password.
the db name is "slingex"
afterwards, the main page which has a list with the following columns:
session_id username host client control(button)
the (session_id, username, host) data will be pulled from a local socket (see Protocol).
the client will be the [login to view URL] pulled from db using foreign key client
the control button will open a new window (see Control).
Protocol:
--------------
This is the protocol of the local service running on the server.
It will open ports on computers that are currently connected in a session to the server.
It will also give the list of sessions that we are able to connect to.
The username and password are the same as the username and password used to login to the web application.
When you want to connect to a port, port A is the port we are conenction to in a specific session computer, and B is the port opened in the server. A and B are
specified in Control section.
Messages(4 bytes):
OK = 0
BadInput = 1
BadLogin = 2
BadMode = 3
SlaveProblem = 4
Modes(4 bytes):
slave = 1
master = 0
The protocol:
app> 4 bytes of srv_version (parameter, currently it will be 1)
srv> OK or BadInput
app> 32 bytes of username(null terminated), 32 bytes of password(null terminated)
srv> OK or BadInput or BadLogin
app> master
srv> OK or BadInput or BadMode
srv> sessions_list
the format of sessions_list is:
4 bytes of len(sessions_list)
for each entry in session_list: 4 bytes of session_id, 32 bytes of username(null terminated), 32 bytes of host(null terminated)
app> 4 bytes of session_id
srv> OK or BadInput
app> 4 bytes of port number(A)
srv> OK or BadInput or SlaveProblem
srv> 4 bytes of port number(B)
Control:
--------
in the new window, we will have the following buttons:
*Open VNC
*Open PCAnywhere
*Open Remote Desktop
*Open SFTP
*Open SSH
*Run Script
What they do:
*Open VNC:
Initiate protocol with A = 5900
Run on the client computer "[login to view URL] [server ip] [Port B]"
*Open PCAnywhere
Don't do anything currently
*Open Remote Desktop
Don't do anything currently
*Open SFTP:
Don't do anything currently
*Open SSH:
Don't do anything currently
*Run Script:
Show list of files (scripts) in some local directory, and let the user choose one.
when he does:
Initiate protocol with A = 22
Run a command on the server (currently, make it something like "echo [host] [Port B] [script]")