piccaso Posted December 1, 2006 Share Posted December 1, 2006 Hello, I made a really simple GUI for this web server.Thanks!but i didnt see it yet, i cant promise that it will all get merged into the trunk small fix. This is for the last version that spyrorocks? uploaded with timeout support. There is an issue were after it processes the au3 script it does not close the socket and so it appears as though the server hangs. The fix is to remove the continueloop after you output the data. Here is a fixed version that I have also added debuging to(right now only for the preprocessing) and it also includes reduce memory function. Reduce mem cut's it's memory usage in about half. Also there seems to be a slow leak someplace as the memory usage goes up and up the more pages that are viewed and does not ever come back down without the reducemem function.Thank you, but this was already fixed in the svn version i'll have a sharp lookout for a memory leak.if there realy is one then EmptyWorkingSet wont fix it or its a windows feature I'll add the debug function, have to do a diff on in to see what else you changed...I dont know when i will have time to take a deeper look into your versions.So for the future could you check out from svn bevore you do some modificationsHere is a Web interface to itand you can do anonymous checkout from herepn me your preferred username (and email address if possible) to get an accout.@the DtTvBi feel a bit like taking over or so.But this still is your project.If you feel like stepped on the toe or...... i am going to far or...... something gets added you dont likePlease tell me!... and could you add links to the repository in the first post please CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
spyrorocks Posted December 2, 2006 Share Posted December 2, 2006 I am making a admin panal for the server configuration. Its web-based. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
piccaso Posted December 2, 2006 Share Posted December 2, 2006 isnt that a bit to early?Basic authentication inst supported yet...if you sitll doing it, can you make it 'localhost only' accessand please keep in mind that we should move settings to a ini file CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
the DtTvB Posted December 2, 2006 Author Share Posted December 2, 2006 OK, I will post the SVN link and how to obtain it as soon as I get back home! [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
Apzo Posted December 2, 2006 Share Posted December 2, 2006 Well well...you should keep in mind the UDF philosophy.Scripts here should be made as Components Off The Shelf, except those intended to work "as is".Just remake Abyss web server and get in competition, or provide something new (different).That is, a standard UDF, a Component Off The Shelf, something another au3 scipt can use.This has already been done for FTP, POP3, and SMTP.Seperate add-ons should reslult in separate files; please keep the core focused on what it is aimed to be : a web server and nothing else.(please ) Apzo. All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
spyrorocks Posted December 2, 2006 Share Posted December 2, 2006 Why should they? We are trying to make a feature-rich webserver in autoit. Why should we be limmited? I was planning to make the admin panal localhost only. also, someone should try to make it authenticate like the htaccess password/username thing. that would be cool. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
the DtTvB Posted December 3, 2006 Author Share Posted December 3, 2006 OK, I posted the link to SVN and how to obtain it..By the way, I thought about new name, what about "AutoIt Community Web Server?"To be relaxing, I made this, at my school, just for fun! [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
the DtTvB Posted December 3, 2006 Author Share Posted December 3, 2006 (edited) Configuration file feature added. It has its own syntax, similar to Apache's configuration file. Here is the syntax rules. Any line that start with # is ignored. Blank lines are also ignored. The simple syntax for each configuration line is.[directive] [value] String values should be quoted, either with single quote or double quote. To escape a quote, double it (e.g. 'the DtTvB''s'). For number values, you don't have to add quotes. Equations are enabled (e.g. sin(3.14) * 2). AutoIt macros are also enabled (e.g. @AutoItExe). Some excerpt from the configuration file. # listenIP # - Default: "" # - The IP address to listen to. # - To listen to all address, you can use "0.0.0.0" listenIP "" # listenPort # - Default: 27643 # - The port number to listen to. # - You can go to your site by going to http://localhost:[port] listenPort 27643 # iRequestTimeout # - Default: 20 * 1000 # (20000, 20 seconds) # - The maximum amount of time, in milliseconds, for the client to # send the request header. iRequestTimeout 20 * 1000 # preprocessor_path # - Default: @AutoItExe # - Path to the executable file of the preprocessor. # - The program should output to StdOut, so the web server can read. preprocessor_path @AutoItExe Obtain the code via SVN. Edited December 3, 2006 by the DtTvB [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
Apzo Posted December 4, 2006 Share Posted December 4, 2006 Great ! Now your script can be embedded, my quest is about to end All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
piccaso Posted December 4, 2006 Share Posted December 4, 2006 embedded? did some cleanup...Fixed Preprocessor Truncated Output of Child process Changed Default Value 'listenPort' to 80 (We don't want the AV Company's to misunderstand...) Changed Default Value 'autoit_preprocessor_protectionmode' to 0 its easy to exploit and prevents reading the Request! Removed AU3Check Warnings Added server.conf Parser Errors and improved security Added 'public_html/test.aux' display Request and All Environment Variables Added 'CONTENT_LENGTH' CGI Variable Added Cgi like Request forwarding that protecionmode thing needs some special care... why do we need this anyway? if you want to host someone untrusted you probably rather runthe script as unprivileged user, right? i dont know if pre nt os support this, but we should think about implementing it. Security for server.conf is a bit too tight for the mime types. I'll change that in the next days. Imo we should stick with the cgi standards. once this is done its possible supporting php, python & friends... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Apzo Posted December 5, 2006 Share Posted December 5, 2006 (edited) Imo we should stick with the cgi standards. once this is done its possible supporting php, python & friends... Absolutely ! CGI mime types should be defined in the .conf file along with their parser. Example :#cgi_EXT, parser running path cgi_exe "" @ScriptDir;unset mime_exe ! cgi_php "C:\php\bin\php" @ScriptDir cgi_au3 "@AutoItExe /ErrorStdOut /AutoIt3ExecuteScript" @ScriptDir; For .au3 files with no preprocessor for example. A function may handle that : Func _CgiExec($file, $parser, $path) Local $data If $parser = "" Then Local $pid = Run($file, $path, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) Else Local $pid = Run($parser & ' "' & $file &'"', $path, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) EndIf While 1 $data &= StdoutRead($pid) If @error Then ExitLoop Wend Return $data EndFunc Of course this one is minimalist and needs serious improvements, but that's the idea. Apzo Edited December 5, 2006 by Apzo All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
piccaso Posted December 5, 2006 Share Posted December 5, 2006 we should have a cgi folder for exe files. and why not configure the interpreters throu mime stuff? and add a cgi section... mime_au3 "cgi/AutoIt" mime_a3x "cgi/AutoIt" mime_aha "cgi/AutoItTags" mime_ahp "cgi/AutoItTags" mime_php "cgi/php5" mime_pl "cgi/perl" # CGI Config... CgiBinFolder public_html\cgibin # this asumes that $sCgiFullPath is available AutoIt "@AutoItExe /ErrorStdOut /AutoIt3ExecuteScript " & $sCgiFullPath php5 "C:\php\php.exe -whatever " & $sCgiFullPath i dont like the $mime_ global variables, i think i'll turn them into an array or two CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
webmedic Posted December 5, 2006 Share Posted December 5, 2006 I also don't like the idea of a cgi bin on other servers the idea was dropped and it is still a constant source of exploitations. I would also suggest having some settings to allow for virtual paths and such while we are at at. Link to comment Share on other sites More sharing options...
piccaso Posted December 5, 2006 Share Posted December 5, 2006 (edited) I also don't like the idea of a cgi bin who else doesn't like it? I dont need it but it wont hurt to have it... maybe turned off by Default i dont like the $mime_ global variables, i think i'll turn them into an array or two so i did but svn is down. so i'll post in here if someone is bored when svn is back up please commit it... edit: its not down, but terribly slow... Edited December 5, 2006 by piccaso CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
webmedic Posted December 5, 2006 Share Posted December 5, 2006 (edited) well apache for instance no longer requires the use of cgi-bin. You can use scripted languages from anywhere in the html working directory. and if you were referring to using a virtual folder for exacutable scripts I guess. That would not be bad but it would still be extra overhead that is not needed. Edited December 5, 2006 by webmedic Link to comment Share on other sites More sharing options...
piccaso Posted December 6, 2006 Share Posted December 6, 2006 i was referring to executables. and i don't see much overhead. but... I don't need it. I won't implement it unless i get really bored. There is so much more useful stuff to do. Still i won't stand in the way of someone who wants to hack this in. As long as it's optional. CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Apzo Posted December 7, 2006 Share Posted December 7, 2006 i was referring to executables.and i don't see much overhead.but...I don't need it.I won't implement it unless i get really bored.There is so much more useful stuff to do.Still i won't stand in the way of someone who wants to hack this in.As long as it's optional.It's not about hack !Sometimes it's better to use .exe rather than .au3 (or .ahp for instance).First, .exe don't need AutoIt to be installed on the runnning computer.Second : never ever let your collegues play with your scripts ! Especially when those scripts are dealing with security and you're the admin (you know, the bad guy )Such a webserver can make my existing scripts on remote computers easy to manage (and launch).Some kind of web service. Apzo. All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
piccaso Posted December 7, 2006 Share Posted December 7, 2006 ok what I really wanted to say... Still i won't stand in the way of someone who wants to implement this. As long as it's optional. but doing this right now would be a hack... I'll see how i could implement the config file features i suggested above if this is done it would be easier CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted December 8, 2006 Share Posted December 8, 2006 it works with php now but you have to install it:download it from hereinstall it into @ProgramFilesDir & "\PHP\" or change the path in server.confmake sure you install 'Other CGI' Web Server Setup (Setup will ask you for that)I'm not sure if it works right...so who knows php good enough to test it WebServer_1.3_Beta.zipsorry spyro i had to scratch your preprocessor to support the 'New way of setting up cgi' CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
piccaso Posted December 8, 2006 Share Posted December 8, 2006 By the way, I thought about new name, what about "AutoIt Community Web Server?"How about...au3HTTPd - The AutoIT Community Web Serverif there is no conflict with the law and john doesn't mind that we use that namei want a small name for it too and acws would be American Civil War Society CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now