Jump to content

the DtTvB's AutoIt Web Server


the DtTvB
 Share

Recommended Posts

uhmm...

thats odd.

which autoit version do you use?

try this as Replacement.

Func _ConsoleWrite($sBuff)
    Local $STD_OUTPUT_HANDLE = -11
    Local $INVALID_HANDLE_VALUE = -1
    Local $hStdOut = DllCall("kernel32.dll", "ptr", "GetStdHandle", "dword", $STD_OUTPUT_HANDLE)
    $hStdOut = $hStdOut[0]
    Local $vBuff = DllStructCreate("byte[" & StringLen($sBuff) & "]")
    DllStructSetData($vBuff, 1, $sBuff)
    If $hStdOut = $INVALID_HANDLE_VALUE Then Return SetError(1, 0, 0)
    Local $fWriteFile = DllCall("kernel32.dll", "int", "WriteFile", "ptr", $hStdOut, "ptr", DllStructGetPtr($vBuff), "dword", StringLen($sBuff), "int_ptr", 0, "ptr", 0)
    $fWriteFile = $fWriteFile[0]
    If $fWriteFile = 0 Then
        Return SetError(2, 0, 0)
    Else
        Return 1
    EndIf
EndFunc   ;==>_ConsoleWrite

i think - but i really dont know for sure - Autoit uses crt to write to stdout but the one above uses windows api...

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

  • Replies 171
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

checkout the latest version

i have added support for 'sever.conf.local'

which overrides server.conf definitions if it exists

but its ignored by the repository

just create a file named server.conf.local in the Trunk directiory

icgi_Replace     1
listenPort     27643
cgi_php       "C:\PHP516\php-cgi.exe"

and we can keep the default values in server.conf...

i put your icgi_Replace thing in too

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

No preview yet. It should be released either today, tomorrow, or the day after tomarrow.

Current features:

File Manager

Easly edit server config

Restart server

and some more to come :P

Link to comment
Share on other sites

Oh, crap, the server just screwed itself.

It wont pre-process anymore! Im using it stright out of the box, stright from download and it wont work.

Whats wrong? It just shows a blank page.

Link to comment
Share on other sites

Oh wait, i think its the HTTP_AUTHORIZATION enviroment variable.

The server is not setting it. How can i make it set it? My admin panal uses it to authenticate the user.

Its based off of DtTvB's auth code in his file. http://opensvn.csie.org/DtTvBs_httpd/Trunk...ml/www-auth.aux

Any help?

Link to comment
Share on other sites

I used No-IP and Yi.org. They are both cool!

Actually, in my DNS record, dttvb.yi.org CNAMEs to 62sv2.hopto.org.

Uhh. By the way, I installed the latest version of AutoIt, and it still doesn't work.

I am still wondering why does the release work really fine!

Link to comment
Share on other sites

  • 4 months later...

I am having some trouble with AUX files I have written, they run fine on their own but when used on the server the server replies that the connection was reset while the page was loading. Does anyone have any idea why this is happening? I tried looking for stuff to do with the pre-processor but could not even find many references to it in the web server files! I am trying to use code that will load stuff from another website and read its HTML then interpret that and write it to a page, maybe this is impossible with the new version? It worked fine with the release but I could not get POST to work with that version!

Link to comment
Share on other sites

  • 3 weeks later...

<h1>Welcome, &amp;$ip;</h1>

to delete

<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Index of /&$dir;</title>

<style type="text/css">

/* <!-- <![CDATA[ */

to add

the closed title tag was missing.

AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1)

Link to comment
Share on other sites

http-auth

1. base64 decoding does not work properly

2. passwords should be hashed (non reversible), to avoid instant access for passwd-file-stealer.

use md5 or crypt and compare the given passwd after hashing it with the same algo to the saved one.

and save the passwd-file outside the webroot.

Edited by Raik

AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1)

Link to comment
Share on other sites

most cgi stuff works now, including cookies :)

get the request body that way:

Global $POST 
 If EnvGet("CONTENT_LENGTH") > 0 Then
    $POST = ConsoleRead(EnvGet("CONTENT_LENGTH"))
 EndIf

ConsoleRead("") or ConsoleRead(0) just hangs, but that's autoit specific.

i don't have problems like this, can you be a bit more specific?

but this shouldn't be a problem with html...

Nice work :)

Couple of problems noted:

1. Server hangs when submitting a form using POST and php-cgi.exe. Server wont proccess anything further after the post submission until its restarted.

2.folderIndex "index.html" in server.conf ........can this be a list?, eg. folderIndex "index.html,index.htm,index.php" because ie7 doesn't list the folder tree, ffox does.

We can start the server and start a gui that uses _IE.au3 to embedd a browser using com....if php files could be embedded in the built exe and prevent viewing source code.....we'd be running php apps as exe's......that'd be very cool!

btw, when using php, php doesn't need to be installed as such, alls required is point to location of php-cgi.exe. php4ts.dll needs to be in the same folder.

I'm using the minimal php that comes with windbinder.

An alternative i've been utilising and the reason that got me reading this post is shttpd (50kb) c source is freely available.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...