Interesting Idea
Well I was sat thinking the other day (no that's not all)… and I thought, what if I could make my computer "pretend" that it's running a web server. Like make a program that listens for a connection on a certain port, then when connected… sends whatever a browser would normally receive from a web server.
Could this be done? If so, how could this be done?
or… Is this just some crazy idea :]
Hope that all made sense
Thanks, Reaper
I know how I'd send the data (I think) but… I don't know what data I'd need to send.
Basically, how does a browser work? What does it request from the server?
If I knew a little more of this kind of stuff, I think I might be able to make something work with Perl or Python.
Thanks, Reaper
P.S: If anyone would like to work on something like this with me, I'd appreciate the help and such.
yah, it's called a HONEYPOT (no, not the slang term for a vagina! You sick perv!)
You should look into headers. when you browser connects to a web server, it will ask it using HTTP (the language used for communicating web sites) something like this
GET / HTTP/1.1
Host: yoursite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 200 OK
Date: Sun, 16 Sep 2007 23:48:16 GMT
Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d SE/0.5.1
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
X-Powered-By: PHP/4.4.0
Set-Cookie: PHPSESSID=[removed]; path=/
Content-Encoding: gzip
Content-Length: 1017
Connection: close
Content-Type: text/html
so that is the type of information you have to work with, and will need to reply to.
you will get a seperate header request for each .css, image, .html, whatever that is requested.
boot up telnet and play around with
>telnet google.com 80
GET / HTTP/1.1
Host: http://google.com
hit enter twice and you will have just requested the HTML of google.com
(btw you wont see what you are typing, it is being sent to the server.)
so using telnet you can see all of the requests and responses.
hope that helped
i would love to help you with this but im swamped with school shit right now.
Thanks guys, I'm looking into it using some of the Perl modules (HTTP::Response is the main on I'm looking at).
Also, am I missing something? Or would this be an obviously simply way to host a server on Windows? If someone made something like this, and released it open source, or just made it downloadable and customizable… then someone could just run it on a box that they leave running.
Reaper
[Edit] Okay, I think I understand mainly what information I need to be sending and such. Now I just don't know how. I'm using the Perl HTTP::* modules. If anyone would like to help me, please do :). [/Edit]
omnipresence wrote: -Scanning machine-
If your program could tell the difference in everyones hand writing, it would be good for scanning passwords that you cant read.
other than that the only other thing i could think of would be image verification like they already said. Good idea though.
I'm guessing that was the wrong thread? Or is it just me?
Reaper
reaper4334 wrote: what if I could make my computer "pretend" that it's running a web server.
you arnt really "pretending" anymore. you are coding your own web server.
sounds like an awesome idea. i think i might have to do the same when i get enough time. i was thinking of going the visual c++ route, but perl will work probably better (i am just very familiar with visual c++)
anyways sounds awesome. we could definitely release some open source customizable "hbh web server" or something. that would be fun.
i think i am going to make mine just text based tho. images and stuff add a whole new level of complexity. i think. ill have to look into it. ciao, and good luck
DigitalFire