Sign in to follow this  
Followers 0

Simple, Mini Webserver In Autoit

63 posts in this topic

Posted (edited)

Full-featured version of WebServer: (Recommended)

  • Logs Requests Recieved
  • Ability to extend WebServer using DSO. (Refer to the README file.)
  • Includes a file browser DSO.
  • Now works with FireFox!
Extreme basic version of Webserver: (Will not update unless there are bugs)

http://www.autoitscript.com/fileman/users/nfwu/WebServerBasic.zip

  • Extremely basic version of webserver.
  • No DSO.
  • Update! Works with FireFox.
(Out of date) Screenshots: http://www.autoitscript.com/forum/index.ph...ndpost&p=163412

#)

Edit: Version 0.4

Edit: Added Basic Webserver

Edited by Jon

Share this post


Link to post
Share on other sites



Posted

Nice Job!

Share this post


Link to post
Share on other sites

Posted

Update! v0.2

-----------------

Now logs all requests recieved.

Rather simple update, actually.

#)

Share this post


Link to post
Share on other sites

Posted

AHH! OMFG WTF

this is awsome! I cant really test it since I already have a webserver...but how on earth did u figure out how to do this?

Share this post


Link to post
Share on other sites

Posted

would this work for someone behind a router?

Share this post


Link to post
Share on other sites

Posted

would this work for someone behind a router?

Probably, but you will have to forward ports from your router control panel to your computer.

Share this post


Link to post
Share on other sites

Posted (edited)

Took down the link to my computer...

Updated for version 0.3~!

Here are some screenshots instead:

Sample Webpage: Posted Image

Sample output from the "Directory Browsing" functionality of Direct Server Output: Posted Image

And some other screenshots (click to enlarge):

Proof that users can download files:Posted Image

Sample Error 404 (File Not Found):Posted Image

Sample Error 401 (Unauthorized):Posted Image

Error 401 and 404 are the only currently supported Errors.

#)

EDIT: i just noticed a typo in my webpages... version 1.2 ... supposed to be 0.2... oh never mind!

EDIT: updated for version 0.3! typo HAS NOT been corrected yet... (it's still 1.2)

Edited by nfwu

Share this post


Link to post
Share on other sites

Posted

would this work for someone behind a router?

Yes, forward the ports.

It'll also work behind a firewall (had some of my classmates to connect to my computer to test), but you would have to forward incoming TCP traffic on port 80.

#)

Share this post


Link to post
Share on other sites

Posted (edited)

AHH! OMFG WTF

this is awsome! I cant really test it since I already have a webserver...but how on earth did u figure out how to do this?

Ananlysing logs like this:

2006-03-19 20:13:10 : GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-19 20:13:12 : GET /woodlogo.jpg HTTP/1.1
Accept: */*
Referer: http://220.255.59.229/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-19 20:13:23 : GET /404.html HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-19 20:13:40 : GET /error_404.html HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-19 21:31:43 : GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-19 21:31:44 : GET /woodlogo.jpg HTTP/1.1
Accept: */*
Referer: http://220.255.59.229
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.59.229
Connection: Keep-Alive

2006-03-20 15:21:45 : GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

2006-03-20 15:21:52 : GET /woodlogo.jpg HTTP/1.1
Accept: */*
Referer: http://220.255.121.19/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

2006-03-20 15:23:02 : GET /page_that_does_not_exist.html HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

2006-03-20 15:24:00 : GET /../../Atempt_accessing_illegal_file.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

2006-03-20 15:24:09 : GET /../../../ HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

2006-03-20 15:24:16 : GET /../ HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)
Host: 220.255.121.19
Connection: Keep-Alive

Rather simple... only understand GET so far.... I'll expand it's vocabulary to POST soon...

#)

Edited by nfwu

Share this post


Link to post
Share on other sites

Posted

I just noticed that my IP address changes with everytime I connect to the internet... so i'm taking this down...

Couldn't you get an account with no-ip and use there ip updater software to update your new ip everytime it changes?

Share this post


Link to post
Share on other sites

Posted

Nice job! I have been away for so long I didn't get a chance to see it earlier. :)

Share this post


Link to post
Share on other sites

Posted

Vrey cool

But can not use it to make an files download server

Share this post


Link to post
Share on other sites

Posted

Vrey cool

But can not use it to make an files download server

You CAN use it as a files download server now.

Just that you have to ZIP everything which you want people to download.

#)

Share this post


Link to post
Share on other sites

Posted

Update! v0.3

----------------

Added 'Direct Server Output' functionality.

First function included is a directory browser.

Screenshots updated to reflect the changes.

PLANS FOR THE NEXT UPDATE:

EXTERNAL SERVERS & MORE DSO FUNCTIONALITY

===========================================

This 'external servers' functionality will send 'server' applications data when requested by a web browser

(for example, convert @zerocool60544's ***remote Pc Control*** into a server application that is setup to use this web server, then you can use the application by directly connecting to the computer, instead of needing to co through a remote server)

Also support for POST commands will be given in the next update

#)

Share this post


Link to post
Share on other sites

Posted

sounds very cool

can you tell me what I would do just to host one file so I can connect to it online like:

207.32.12.32:80/file.txt

is it posible just to have it as file server. if so can you highlight the code I would need

Share this post


Link to post
Share on other sites

Posted (edited)

sounds very cool

can you tell me what I would do just to host one file so I can connect to it online like:

207.32.12.32:80/file.txt

is it posible just to have it as file server. if so can you highlight the code I would need

Sure, use version 0.2:

here is the required files (includes source) for v0.2:

(NOTE: Comple v2_clone.au3. Do NOT use WoodMiniWebServer_original.exe)

Note to others: the LATEST version can be found here: http://www.autoitscript.com/forum/index.ph...ndpost&p=163087

Only if you require basic functionality then you download this v0.2

It's a re-write of v0.2 because I can't find the source of v0.2...

One advantange is that it is much more readable than the original :)

#)

Edited by Jon

Share this post


Link to post
Share on other sites

Posted

I'm running MiniWebServer in my pc

My pc is on a LAN and my IP is 192.168.0.44

If i start the browser and type http:\\192.168.0.44, i can see only the html code of the webpage called index.html.

In addition a Message box regarding the htmlcode appears.

I think it is a bug.

Share this post


Link to post
Share on other sites

Posted

I'm running MiniWebServer in my pc

My pc is on a LAN and my IP is 192.168.0.44

If i start the browser and type http:\\192.168.0.44, i can see only the html code of the webpage called index.html.

In addition a Message box regarding the htmlcode appears.

I think it is a bug.

The message box pops up with a timeout of 1 second on the computer running the server. This is to alert the user on the server that someone has sent a request to the webserver.

As for that only HTML code in your browser... that's wierd... what browser are you using? I'm using Internet Explorer v 6.0 and it works fine...

And the webserver I am using is the one found in the first post, version 0.3.

???

#)

Share this post


Link to post
Share on other sites

Posted

The browser is Firefox 1.5 and the WebServer Version is 0.3 downloaded today from the first post.

Now i try using Internet Explorer and i tell you the result.

Bye

Share this post


Link to post
Share on other sites

Posted

Using IE the there isn't problem!

Share this post


Link to post
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
Sign in to follow this  
Followers 0