|
Once upon a time i was in need to have shell access on a web server, but i had none. Actually i wanted to build vipsi on that host. I had an old version running there but utterly wanted to update to Flow control: if … then Flow control: try … thenthe current version.
So i wrote a sort-of-a-shell Modes of Operation: CGI Scripts Example Scripts: CGI Scriptscgi script to execute some commands. It actually worked better than i dared to hope. Basic thing is, you need a vip Example Scripts: CGI Scripts Example Scripts: Scriptsscript interpreter running
shell.cgi
erm, sorry, no Online Chat: Test links Search Site: Test link Print Environment: Test link Online Z80 Assembler: Test link Show Beautified Folder Listings: Test link Sort-of-a Shell: Test linktest link. Im a nice gui, but actually Operators: Bitwise Not "~" Operators: Boolean Negation "!"not that nice. ;-)
#!/home/smile77/bin/vipsi
// print all Flow control: if … then Flow control: try … thenthe headers:
// http header
// head section of html page Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and
// start body section
Instructions: putput «\
content-type: Data Types: Text Item selector "[]": Text Glossary: text, text_valtext/html; charset=utf-8
<!doctype html public \"-//w3c//dtd html 4.01 transitional//en\">
<html>
<head>
<META http-equiv=Content-Type content=\"Data Types: Text Item selector "[]": Text Glossary: text, text_valtext/html; charset=UTF-8\">
<title>vipsi online shell</title>
</head>
<body style="font-family:sans-serif;">
<h2>vipsi online shell</h2>
<form>
<input Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername="input_line" id="theinput" size=80 maxlength=240>
</form>
»
Instructions: var How does VScript::Value() work?: Var*&var hist_file = "/home/smile77/htdocs/cgi-bin/shell.zzz"
Flow control: try … thentry
Functions with varying return types: include Instructions: includeinclude hist_file
Flow control: if … then Flow control: try … thenthen
Flow control: if … thenif Numeric functions: existsexists input_line
Instructions: putput "<pre>"
Instructions: putput "<b>",input_line,"</b>",Constants: nlnl
List functions: split Instructions: splitsplit input_line," "
Flow control: if … thenif Numeric functions: countcount input_line==1
Flow control: if … thenif input_line[1]!=""
Text functions: sys Instructions: syssys input_line[1]
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenelse
Flow control: if … thenif Numeric functions: countcount input_line==2
Flow control: if … thenif input_line[1]=="Instructions: cd Shell Immediate Commands: cdcd"
Instructions: cd Shell Immediate Commands: cdcd input_line[2]
Flow control: if … then Flow control: try … thenelse
Text functions: sys Instructions: syssys input_line[1],input_line[2]
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenelse
Flow control: if … thenif Numeric functions: countcount input_line==3
Text functions: sys Instructions: syssys input_line[1],input_line[2],input_line[3]
Flow control: if … then Flow control: try … thenelse
Flow control: if … thenif Numeric functions: countcount input_line==4
Text functions: sys Instructions: syssys input_line[1],input_line[2],input_line[3],input_line[4]
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenthen
Flow control: try … thentry
Instructions: openoutopenout#4,hist_file
Instructions: putput#4, "Instructions: cd Shell Immediate Commands: cdcd ",Text functions: convert Instructions: convertconvert(Text functions: fullpathfullpath"." to quoted),Constants: nlnl
Instructions: putput#4, "Flow control: end Shell Immediate Commands: exit, quit, endend",Constants: nlnl
Instructions: closeclose#4
Flow control: if … then Flow control: try … thenthen
Flow control: if … then Flow control: try … thenthen
Instructions: putput
«
</pre>
<Example Scripts: CGI Scripts Example Scripts: Scriptsscript type="Data Types: Text Item selector "[]": Text Glossary: text, text_valtext/javascript">
document.getElementById("theinput").focus();
</Example Scripts: CGI Scripts Example Scripts: Scriptsscript>
</body></html>
»
Flow control: end Shell Immediate Commands: exit, quit, endend
| |