Web Standards

backlink building

HTTP Protocol

The web is operated on port 80. You are most likely questioning what “port 80” is, right (whether you in fact are or otherwise is unimportant)? Well, the solution is very easy (not truly). See, the Internet and also the web are various. The Internet is the facilities (ie the physical cables, the web server equipment, and so on) and also the web is the concepts and also the software application. I claim concepts due to the fact that prior to the web the Internet was a mess of cables and also effective computer systems making use of POP3 and also SMTP for interaction, FTP for documents transfer, and also TELNET for remote covering gain access to, to name a few. Then the web went along, and also Internet utilize infected the house and also all throughout the globe. See, in simple terms, a web server programs HTML to all linked customers on port 80, so port 80 is the “HTTP port.” HTTP is the method, or collection of standards for port 80 and also its software application. The customer software application is your internet browser, (ie most likely Internet Explorer however ideally Firefox), and also the web server is something like Apache or IIS(uug). This associates with hacking, as you will certainly see later on, however initially you require to understand even more regarding HTTP (the rooms prior to the are placed in so this isn’t considered HTML).


If Apache is offering that, and also Firefox chooses it up, It will certainly change the , the , and so on. They “close” the tag. Tag is a term for anything in s, and also they have to be opened up (ie presented) and also shut (ie ). If you intend to find out HTML tagging, simply head over to our friend Google and also do a search.

Since you have not reached the shows area, and also presently I have not also composed it, I will certainly reveal you a web server instance in the most basic kind I can consider that will certainly work with any type of OS you are presently making use of. So the noticeable option is JAVA:

<br /> import java.net.*;<br /> import java.io.*;<br /> import java.util.*;</p> <p> public course jhttp prolongs Thread {<br /> Socket theConnection;<br /> fixed File docroot;<br /> fixed String indexfile = &#8220;index.html&#8221;;</p> <p> public jhttp(Socket s) {<br /> theConnection = s;<br /> }</p> <p> public fixed gap major(String[] args) {<br /> int thePort;<br /> ServerSocket ss;<br /> // obtain the Document origin</p> <p> attempt {<br /> docroot = brand-new File(args[0]);<br /> }</p> <p> catch (Exception e) {<br /> docroot = brand-new File(&#8220;.&#8221;);<br /> }</p> <p> // established the port to pay attention on</p> <p> attempt {<br /> thePort = Integer.parseInt(args[1]);<br /> if (thePort 65535) thePort = 80;<br /> } </p> <p> catch (Exception e) {<br /> thePort = 80;<br /> } </p> <p> attempt {<br /> ss = brand-new ServerSocket(thePort);<br /> System.out.println(&#8220;Accepting connections on port &#8221;<br /> + ss.getLocalPort());<br /> System.out.println(&#8220;Document Root:&#8221; + docroot);</p> <p> while (real) {<br /> jhttp j = brand-new jhttp(ss.accept());<br /> j.start();<br /> }</p> <p> }</p> <p> catch (IOException e) {<br /> System.err.println(&#8220;Server aborted prematurely&#8221;);<br /> }</p> <p> }</p> <p> public gap run() {</p> <p> String approach;<br /> String ct;<br /> String variation = &#8220;&#8221;;<br /> File theFile;</p> <p> attempt {<br /> PrintStream os = brand-new PrintStream(theConnection.getOutputStream());<br /> DataInputStream is = brand-new DataInputStream(theConnection.getInputStream());<br /> String obtain = is.readLine();<br /> StringTokenizer st = brand-new StringTokenizer(obtain);<br /> approach = st.nextToken();</p> <p> if (method.equals(&#8220;GET&#8221;)) {<br /> String documents = st.nextToken();<br /> if (documents.endsWith(&#8220;/&#8221;)) file += indexfile;<br /> ct = assumptionContentTypeFromName(documents);</p> <p> if (st.hasMoreTokens()) {<br /> variation = st.nextToken();<br /> }</p> <p> // loophole via the remainder of the input li<br /> // nes </p> <p> while ((obtain = is.readLine()) != null) {<br /> if (get.trim().equates to(&#8220;&#8221;)) break;<br /> }</p> <p> attempt {<br /> theFile = brand-new File(docroot, file.substring(1,file.length()));<br /> FileInputStream fis = brand-new FileInputStream(theFile);<br /> byte[] theData = brand-new byte[(int) theFile.length()];<br /> // require to inspect the variety of bytes rea<br /> // d right here<br /> fis.read(theData);<br /> fis.close();<br /> if (version.startsWith(&#8220;HTTP/&#8221;)) { // send out a MIME header<br /> os.print(&#8220;HTTP/1.0 200 OKrn&#8221;);<br /> Date currently = brand-new Date();<br /> os.print(&#8220;Date: &#8221; + currently + &#8220;rn&#8221;);<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;);<br /> os.print(&#8220;Content-length: &#8221; + theData.length + &#8220;rn&#8221;);<br /> os.print(&#8220;Content-type: &#8221; + ct + &#8220;rnrn&#8221;);<br /> } // end shot</p> <p> // send out the documents<br /> os.write(theData);<br /> os.close();<br /> } // end shot</p> <p> catch (IOException e) { // can not discover the documents<br /> if (version.startsWith(&#8220;HTTP/&#8221;)) { // send out a MIME header<br /> os.print(&#8220;HTTP/1.0 404 File Not Foundrn&#8221;);<br /> Date currently = brand-new Date();<br /> os.print(&#8220;Date: &#8221; + currently + &#8220;rn&#8221;);<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;);<br /> os.print(&#8220;Content-type: text/html&#8221; + &#8220;rnrn&#8221;);<br /> } </p> <p> os.println(&#8220;File Not Found&#8221;);<br /> os.println(&#8220;HTTP Error 404: File Not Found&#8221;);<br /> os.close();<br /> }</p> <p>}</p> <p>else { // approach does not equivalent &#8220;GET&#8221;<br /> if (version.startsWith(&#8220;HTTP/&#8221;)) { // send out a MIME header<br /> os.print(&#8220;HTTP/1.0 501 Not Implementedrn&#8221;);<br /> Date currently = brand-new Date();<br /> os.print(&#8220;Date: &#8221; + currently + &#8220;rn&#8221;);<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;);<br /> os.print(&#8220;Content-type: text/html&#8221; + &#8220;rnrn&#8221;);<br /> }</p> <p>os.println(&#8220;Not Implemented&#8221;);<br /> os.println(&#8220;HTTP Error 501: Not Implemented&#8221;);<br /> os.close();<br /> }</p> <p>}</p> <p>catch (IOException e) {</p> <p>}</p> <p>attempt {<br /> theConnection.close();<br /> }</p> <p>catch (IOException e) {<br /> }</p> <p>}</p> <p>public String assumptionContentTypeFromName(String name) name.endsWith(&#8220;.htm&#8221;)) return &#8220;text/html&#8221;;<br /> else if (name.endsWith(&#8220;.txt&#8221;) </p> <p>}<br />

I discovered the fundamentals of JAVA web server shows from “JAVA Network Programming” by Elliotte Rusty Harold. Now you do not require to understand JAVA to be able to comprehend that, despite the fact that it may not appear like that initially. The important thing to look for when examining the code it the os.print(“”) commands. There is nothing fancy being used to get the data to the browser, you do not have to mutate the data, its sending plain HTML via a simple command. The plain and simple truth is that the browser is doing the majority of the difficult stuff, when speaking about this simple server. But in complicated servers there is server-side scripting, etc. Webs are much more complicated than just a simple server and Internet Explorer, such as Flash and JAVA Applets (run on clients machine in browser) and server-side stuff like PHP and PEARL (displayed on clients browser as plain HTML but executed as scripting on the server). T

The code above is a good way to learn the HTTP standards, even though the program itself ignores most of the regulations. The web browser not only understands HTML but also knows that incoming connection starting with 404 means that the page is missing, etc. It also knows that when “image/gif” is returned the file is an image of type gif. These are not terms the stupid server made up. They are web standards. Generally speaking, there are two standards. There is the w3 standard (ie the real standard based on the first web servers and browsers) and the Microsoft standard (ie the Internet Explorer, IIS and NT standards). The standards are there so anyone can make a server or client and have it be compatible with (nearly) everything else.

Hiding your Connection

If you have a copy of Visual Basic 6, making a web browser is easy, thanks to Winsock and the code templates included, so I will not put in an example of that. Instead I will explain cool and potentially dangerous things you can do to keep yourself safe. I understand those words put together doesn’t make sense (ie potentially dangerous and safe), but you will see in a moment. I’m talking about PROXIES. (anonymous proxy servers, to be exact).

You connect to the internet on port 80 through the proxy server, thus hiding your real IP. There are many obvious applications for this, but it is also the only really potentially dangerous point so far, so I will restate what I have written at the top: Whatever you do with this info is your responsibility. I provide information and absolutely nothing more. With that said, there is nothing illegal about using an anonymous proxy server as long as it is free and you are harming no one by using it. But if you think you are completely safe using one, you are deadly wrong. They can simply ask the owners of the proxy what your IP is if they really want to find you. If you join a high anonymous server, the chance of them releasing your IP is pretty low for something like stealing music, but if you do something that would actually warrant jail time, they probably will be able to find you. http://www.publicproxyservers.com is a good site for finding these servers.

The last trick related to web servers and port 80 is a straightforward one. First, find a free website host that supports PHP and also use the following code:

<eml><br /> if ($password == &#8220;passwd&#8221;) {<br /> $fp = fopen(&#8220;http://&#8221;.$destfile,&#8221;r&#8221;);<br /> while (!feof($fp)) {<br /> $fd = fread($fp,4096);<br /> echo $fd;<br /> }<br /> fclose($fp);<br /> }<br /> exit;<br /> ?&gt;<br /> </eml>

If the address of this file is http://file.com/script.php, to download the latest Fedora DVD you would go to the following address: http://file.com/script.php?destfile=linuxiso.org/download.php/611/FC3-i386-DVD.iso &password=passwd

You can change “passwd” to whatever password you want.

This will make any onlookers think you are connected to http://file.com. You are still limited to the speed of your connection, however you are using the bandwidth of the web host

Whatever you do with the over information is solely your obligation.

Leave a Reply