My Gadgets

The Useful Gadgets

Website Criteria

Website Criteria

HTTP Protocol

The website is run on port 80. You are in all probability pondering what “port 80” is, right (whether or not you basically are or not is irrelevant)? Nicely, the respond to is simple (not actually). See, the World-wide-web and the internet are diverse. The Internet is the infrastructure (ie the bodily wires, the server components, etcetera) and the world wide web is the suggestions and the software program. I say concepts for the reason that in advance of the website the Net was a mess of wires and strong computer systems using POP3 and SMTP for interaction, FTP for file transfer, and TELNET for distant shell obtain, amongst some others. Then the website arrived together, and Web use spread to the dwelling and all across the world. See, in basic conditions, a internet server broadcasts HTML to all related customers on port 80, so port 80 is the “HTTP port.” HTTP is the protocol, or set of standards for port 80 and its application. The consumer software is your browser, (ie almost certainly Web Explorer but with any luck , Firefox), and the server is one thing like Apache or IIS(uug). This relates to hacking, as you will see afterwards, but very first you require to know far more about HTTP (the areas just before the are set in so this just isn’t imagined of as HTML).


If Apache is serving that, and Firefox picks it up, It will change the , the , etc. They “close” the tag. Tag is a expression for nearly anything in s, and they need to be opened (ie launched) and closed (ie ). If you want to study HTML tagging, just head in excess of to our near close friend Google and do a research.

Given that you haven’t gotten to the programming area, and now I have not even wrote it, I will show you a web server case in point in the easiest sort I can feel of that will do the job on any OS you are now applying. So the evident preference is JAVA:

<br /> import java.web.*<br /> import java.io.*<br /> import java.util.*</p> <p> general public class jhttp extends Thread {<br /> Socket theConnection<br /> static File docroot<br /> static String indexfile = &#8220;index.html&#8221;</p> <p> general public jhttp(Socket s)<br /> theConnection = s</p> <p> community static void main(String[] args)<br /> int thePort<br /> ServerSocket ss<br /> // get the Doc root</p> <p> consider<br /> docroot = new File(args[0])</p> <p> capture (Exception e)<br /> docroot = new File(&#8220;.&#8221;)</p> <p> // set the port to pay attention on</p> <p> test<br /> thePort = Integer.parseInt(args[1])<br /> if (thePort 65535) thePort = 80</p> <p> capture (Exception e)<br /> thePort = 80</p> <p> try<br /> ss = new ServerSocket(thePort)<br /> Process.out.println(&#8220;Accepting connections on port &#8221;<br /> + ss.getLocalPort())<br /> Technique.out.println(&#8220;Doc Root:&#8221; + docroot)</p> <p> whilst (accurate)<br /> jhttp j = new jhttp(ss.accept())<br /> j.start out()</p> <p> catch (IOException e)<br /> System.err.println(&#8220;Server aborted prematurely&#8221;)</p> <p> general public void run() {</p> <p> String approach<br /> String ct<br /> String version = &#8220;&#8221;<br /> File theFile</p> <p> try {<br /> PrintStream os = new PrintStream(theConnection.getOutputStream())<br /> DataInputStream is = new DataInputStream(theConnection.getInputStream())<br /> String get = is.readLine()<br /> StringTokenizer st = new StringTokenizer(get)<br /> system = st.nextToken()</p> <p> if (approach.equals(&#8220;GET&#8221;))<br /> String file = st.nextToken()<br /> if (file.endsWith(&#8220;/&#8221;)) file += indexfile<br /> ct = guessContentTypeFromName(file)</p> <p> if (st.hasMoreTokens())<br /> edition = st.nextToken()</p> <p> // loop as a result of the relaxation of the input li<br /> // nes </p> <p> while ((get = is.readLine()) != null)<br /> if (get.trim().equals(&#8220;&#8221;)) break</p> <p> try<br /> theFile = new File(docroot, file.substring(1,file.size()))<br /> FileInputStream fis = new FileInputStream(theFile)<br /> byte[] theData = new byte[(int) theFile.length()]<br /> // want to verify the variety of bytes rea<br /> // d listed here<br /> fis.browse(theData)<br /> fis.close()<br /> if (variation.startsWith(&#8220;HTTP/&#8221;)) // deliver a MIME header<br /> os.print(&#8220;HTTP/1. 200 OKrn&#8221;)<br /> Day now = new Date()<br /> os.print(&#8220;Date: &#8221; + now + &#8220;rn&#8221;)<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;)<br /> os.print(&#8220;Content material-size: &#8221; + theData.duration + &#8220;rn&#8221;)<br /> os.print(&#8220;Material-type: &#8221; + ct + &#8220;rnrn&#8221;)<br /> // conclusion test</p> <p> // deliver the file<br /> os.produce(theData)<br /> os.near()<br /> // stop try</p> <p> capture (IOException e) // are unable to come across the file<br /> if (model.startsWith(&#8220;HTTP/&#8221;)) // ship a MIME header<br /> os.print(&#8220;HTTP/1. 404 File Not Foundrn&#8221;)<br /> Day now = new Date()<br /> os.print(&#8220;Date: &#8221; + now + &#8220;rn&#8221;)<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;)<br /> os.print(&#8220;Content-variety: textual content/html&#8221; + &#8220;rnrn&#8221;)</p> <p> os.println(&#8220;File Not Observed&#8221;)<br /> os.println(&#8220;HTTP Mistake 404: File Not Located&#8221;)<br /> os.shut()</p> <p>else // method does not equal &#8220;GET&#8221;<br /> if (variation.startsWith(&#8220;HTTP/&#8221;)) // mail a MIME header<br /> os.print(&#8220;HTTP/1. 501 Not Implementedrn&#8221;)<br /> Date now = new Date()<br /> os.print(&#8220;Date: &#8221; + now + &#8220;rn&#8221;)<br /> os.print(&#8220;Server: jhttp 1.0rn&#8221;)<br /> os.print(&#8220;Content-sort: textual content/html&#8221; + &#8220;rnrn&#8221;) </p> <p>os.println(&#8220;Not Applied&#8221;)<br /> os.println(&#8220;HTTP Mistake 501: Not Implemented&#8221;)<br /> os.close()</p> <p>}</p> <p>capture (IOException e) </p> <p>attempt<br /> theConnection.near()</p> <p>catch (IOException e) </p> <p>}</p> <p>general public String guessContentTypeFromName(String title) </p> <p>}<br />

I figured out the basics of JAVA web server programming from “JAVA Network Programming” by Elliotte Rusty Harold. Now you really don’t require to know JAVA to be equipped to recognize that, even nevertheless it might not look like that at initially. The crucial point to glimpse for when examining the code it the os.print(“”) commands. There is nothing extravagant currently being utilized to get the knowledge to the browser, you don’t have to mutate the info, its sending simple HTML by using a uncomplicated command. The plain and easy reality is that the browser is performing the majority of the tricky things, when talking about this simple server. But in sophisticated servers there is server-aspect scripting, and so forth. Webs are much a lot more difficult than just a simple server and Web Explorer, this sort of as Flash and JAVA Applets (operate on consumers machine in browser) and server-facet things like PHP and PEARL (exhibited on clients browser as basic HTML but executed as scripting on the server). T

The code above is a good way to master the HTTP criteria, even though the system itself ignores most of the rules. The world wide web browser not only understands HTML but also understands that incoming connection commencing with 404 suggests that the site is lacking, and so on. It also is aware that when “impression/gif” is returned the file is an impression of style gif. These are not phrases the silly server produced up. They are world-wide-web criteria. Generally speaking, there are two specifications. There is the w3 common (ie the real regular dependent on the initial world wide web servers and browsers) and the Microsoft normal (ie the World wide web Explorer, IIS and NT benchmarks). The specifications are there so any individual can make a server or customer and have it be compatible with (practically) anything else.

Hiding your Relationship

If you have a duplicate of Visual Simple 6, producing a internet browser is simple, thanks to Winsock and the code templates included, so I will not place in an illustration of that. Rather I will demonstrate awesome and likely harmful matters you can do to retain your self secure. I know people words and phrases set together would not make sense (ie potentially risky and safe), but you will see in a instant. I’m chatting about PROXIES. (anonymous proxy servers, to be specific).

You join to the world wide web on port 80 by means of the proxy server, as a result hiding your authentic IP. There are lots of apparent apps for this, but it is also the only really potentially unsafe thing so significantly, so I will restate what I have written at the top rated: Whatsoever you do with this info is your accountability. I offer facts and nothing at all more. With that mentioned, there is practically nothing illegal about working with an anonymous proxy server as extensive as it is free of charge and you are harming no 1 by using it. But if you assume you are wholly safe applying 1, you are lethal erroneous. They can merely request the homeowners of the proxy what your IP is if they definitely want to discover you. If you join a significant anonymous server, the likelihood of them releasing your IP is really reduced for one thing like stealing new music, but if you do something that would in fact warrant jail time, they possibly will be equipped to come across you. http://www.publicproxyservers.com is a superior web page for discovering these servers.

The previous trick relevant to web servers and port 80 is a straightforward one. Very first, obtain a free of charge internet site host that supports PHP and use the pursuing code:

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

If the handle of this file is http://file.com/script.php, to obtain the most current 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 transform “passwd” to what ever password you want.
This will make any onlookers think you are connected to http://file.com. You are still confined to the speed of your link, but you are utilizing the bandwidth of the website host

Whatever you do with the over information and facts is exclusively your duty.