Categories
Archives
Search
HTTP Protocol
The web is run on port 80. You are probably wondering what “port 80″ is, right (whether you actually are or not is irrelevant)? Well, the answer is easy (not really). See, the Internet and the web are different. The Internet is the infrastructure (ie the physical wires, the server hardware, etc) and the web is the ideas and the software. I say ideas because before the web the Internet was a mess of wires and powerful computers using POP3 and SMTP for communication, FTP for file transfer, and TELNET for remote shell access, among others. Then the web came along, and Internet use spread to the home and all across the world. See, in plain terms, a web server broadcasts HTML to all connected clients on port 80, so port 80 is the “HTTP port.” HTTP is the protocol, or set of standards for port 80 and its software. The client software is your browser, (ie probably
Internet Explorer but hopefully Firefox), and the server is something like Apache or IIS(uug). This relates to hacking, as you will see later, but first you need to know more about HTTP. (the spaces before the < & > are put in so this isnt thought of as HTML)
< html >
< body >
< img src="image.png" >< br >
< div align="center" >text< /div >
< /body >
< /html >
If Apache is serving that, and Firefox picks it up, It will replace the < img src... etc with the image found at image.png relative to the working directory of the page requested, (ie ./, current dir), and the < div... is turned into text printed in the middle of the page. Since
the code is processed from top to bottom, the br means that the browser should skip down one line and start the rest from there. The top two and bottom two lines tell the browser what part of the page it is reading. You migh have noticed the < /div >, the < /body >, etc. They “close” the tag. Tag is a term for anything in <>s, and they must be opened (ie introduced) and closed (ie < /tag >). If you want to learn HTML tagging, just head over to our close friend Google and do a search.
Since you haven’t gotten to the programming section, and currently I have not even wrote it, I will show you a web server example in the simplest form I can think of that will work on any OS you are currently using. So the obvious choice is JAVA:
import java.net.*;
import java.io.*;
import java.util.*;
public class jhttp extends Thread {
Socket theConnection;
static File docroot;
static String indexfile = “index.html”;
public jhttp(Socket s) {
theConnection = s;
}
public static void main(String[] args) {
int thePort;
ServerSocket ss;
// get the Document root
try {
docroot = new File(args[0]);
}
catch (Exception e) {
docroot = new File(“.”);
}
// set the port to listen on
try {
thePort = Integer.parseInt(args[1]);
if (thePort < 0 || thePort > 65535) thePort = 80;
}
catch (Exception e) {
thePort = 80;
}
try {
ss = new ServerSocket(thePort);
System.out.println(“Accepting connections on port “
+ ss.getLocalPort());
System.out.println(“Document Root:” + docroot);
while (true) {
jhttp j = new jhttp(ss.accept());
j.start();
}
}
catch (IOException e) {
System.err.println(“Server aborted prematurely”);
}
}
public void run() {
String method;
String ct;
String version = “”;
File theFile;
try {
PrintStream os = new PrintStream(theConnection.getOutputStream());
DataInputStream is = new DataInputStream(theConnection.getInputStream());
String get = is.readLine();
StringTokenizer st = new StringTokenizer(get);
method = st.nextToken();
if (method.equals(“GET”)) {
String file = st.nextToken();
if (file.endsWith(“/”)) file += indexfile;
ct = guessContentTypeFromName(file);
if (st.hasMoreTokens()) {
version = st.nextToken();
}
// loop through the rest of the input li
// nes
while ((get = is.readLine()) != null) {
if (get.trim().equals(“”)) break;
}
try {
theFile = new File(docroot, file.substring(1,file.length()));
FileInputStream fis = new FileInputStream(theFile);
byte[] theData = new byte[(int) theFile.length()];
// need to check the number of bytes rea
// d here
fis.read(theData);
fis.close();
if (version.startsWith(“HTTP/”)) { // send a MIME header
os.print(“HTTP/1.0 200 OKrn”);
Date now = new Date();
os.print(“Date: ” + now + “rn”);
os.print(“Server: jhttp 1.0rn”);
os.print(“Content-length: ” + theData.length + “rn”);
os.print(“Content-type: ” + ct + “rnrn”);
} // end try
// send the file
os.write(theData);
os.close();
} // end try
catch (IOException e) { // can’t find the file
if (version.startsWith(“HTTP/”)) { // send a MIME header
os.print(“HTTP/1.0 404 File Not Foundrn”);
Date now = new Date();
os.print(“Date: ” + now + “rn”);
os.print(“Server: jhttp 1.0rn”);
os.print(“Content-type: text/html” + “rnrn”);
}
os.println(“< HTML >< HEAD >< TITLE >File Not Found< /TITLE >< /HEAD >“);
os.println(“< BODY >< H1 >HTTP Error 404: File Not Found< /H1 >< /BODY >< /HTML >“);
os.close();
}
}
else { // method does not equal “GET”
if (version.startsWith(“HTTP/”)) { // send a MIME header
os.print(“HTTP/1.0 501 Not Implementedrn”);
Date now = new Date();
os.print(“Date: ” + now + “rn”);
os.print(“Server: jhttp 1.0rn”);
os.print(“Content-type: text/html” + “rnrn”);
}
os.println(“< HTML >< HEAD >< TITLE >Not Implemented< /TITLE >“);
os.println(“< BODY >< H1 >HTTP Error 501: Not Implemented< /H1 >< /BODY >< /HTML >“);
os.close();
}
}
catch (IOException e) {
}
try {
theConnection.close();
}
catch (IOException e) {
}
}
public String guessContentTypeFromName(String name) {
if (name.endsWith(“.html”) || name.endsWith(“.htm”)) return “text/html”;
else if (name.endsWith(“.txt”) || name.endsWith(“.java”)) return “text/plain”;
else if (name.endsWith(“.gif”) ) return “image/gif”;
else if (name.endsWith(“.class”) ) return “application/octet-stream”;
else if (name.endsWith(“.jpg”) || name.endsWith(“.jpeg”)) return “image/jpeg”;
else return “text/plain”;
}
}
I learned the basics of JAVA web server programming from “JAVA Network Programming” by Elliotte Rusty Harold. Now you don’t need to know JAVA to be able to understand that, even though it might not seem like that at first. 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 don’t 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
he 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 know 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 thing 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 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. www.publicproxyservers.com is a good site for finding these servers.
The last trick related to web servers and port 80 is a simple one. First, find a free website host that supports PHP and use the following code:
if ($password == “passwd”) {
$fp = fopen(“http://”.$destfile,”r”);
while (!feof($fp)) {
$fd = fread($fp,4096);
echo $fd;
}
fclose($fp);
}
exit;
?>
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, but you are using the bandwidth of the web host
Whatever you do with the above information is solely your responsibility.
Mike Vollmer — eblivion
http://eblivion.sitesled.com
Computer is an electronic machine work on the instructions of human being. In other words you have to input data to get your required output. Sure it has its own intelligence which is hidden from a user, that help in accurate and speedy calculations.
It has memory to store your things which is called as data. Computer helps user to huge amount of data securely, and helps to retrieve the stored data in fraction of time. It is very efficient way of data maintaining. Also it is useful fast way of searching piece of information from mass information.
Data is nothing but arranged information, it may be text, numbers and graphics.
There are two basic categories of computer fields
1. Computer Software 2. Computer Hardware
COMPUTER SOFTWARE
=>Software Programming
=>Graphic Designers
=>Multimedia
COMPUTER HARDWARE
=>Basic Computer Hardware
=>LAN
=>WAN
This is how the computer fields are categorized. Now start doing some exercise regarding “Research” remember we talk about this previously.
Carried out this research as you wish according to your convenience. But I recommend you to do one research per day.
For example take Research – 1 on day 1 that is today. Then next day vice versa.
With this you will observe information which you can digest and understand well. So takes the things in little pieces. Best of luck
Research – 1
What is computer
computer overview
how to use computer
computer
Research – 2
What is data
data
how data works
what are the types of data
Research – 3
What is computer hardware
What is computer memory
Types of computer memory
Note:
The best way to carry out this research is on Internet.
1. Type this link in internet explorer
http://www.google.com
2. Type any of the above sentence or word you are looking for in search box and press enter.
I hope you like this article. I am trying my best to provide you the simplest information.
Please feel free to comment. Your suggestions and comments are appreciated and helps me to improve the quality of the information.
Author is the owner of Computer Learning Center website where people learn computer basic and advance courses and tutorials and also know how to get bread and butter from the computer.
Mohammed Amerullah Qureshi
amer@7jj7.com
Public Liability or Employers Liability is now if your business want to run a thriving company an astonishingly good insurance sort to take out it is not a legal requirement but it does supply super corporate sense. If members of the public or maybe clientele come to the company’s property or you go to theirs, you yourself should consider about taking out public liability insurance. This type of insurance policy will shield one hundred & one various things including any awards or damages given to a member of the community for the reason of of injury or damage to their homes & themselves. There can be found tonnes of various conditions, exclusions and warranties that will often be applied to community liability rules It is hence principal that you yourself discuss this with your insurance consultant any that are pertinent to your policy. Insured Risks are one of the best corporations to go with for community Liability Insurance. They offer it at a very reasonable price and they will advice clientle and your own business on the correct insurance package to take out and make sure that it is 1 suitable for you. Insured Risks community Liability insurance policy is available for over 100 different professional and trade occupations and is specially designed to guard individual tradesmen, professionals and small businesses up to a total of 10 people with and without limited company status. The sheild you choose and are advised on is available on three different steps. ?1m. ?2m and ?5m. For information on Public and Employers Liability, Commercial Vehicle and Professional Indemnity Insurance, check out their own website www.insuredrisks.co.uk and find out everything clientle could possibly want to know. It is also possible to get an online quote with them as well.
There are numerous ways of forecasting the future like tarot readings and presently sensational psychic Anne Jirsch has discovered future life progression. This method is relatively unknown. The outstanding method is possible to everybody who can be hypnotised. You should expect to go into a light trance state and this will probably happen through hypnosis and you can be directed to go forward into your future like eight tens years.
Future life progression, aka FLP, is the opposite of past life regression, aka PLR, you can often go directly to a therapist or you will find an FLP mp3 from the net and do it yourself. Future life sessions allow you to see the future destiny with your own eyes and help you get a fantastic future. You will probably use this stunning technique to find your boyfriend or identify future destiny trends in the market. Use Spiritual Healing Energy to heal yourself with Anne Jirsch.
Anne Jirsch began her astonishing career as a tarot card reader in the UK and has a career spanning over nineteen years. The eye-opening future details that she acquires for her customers has made her one of the most world renowned tarot readers in England. Tarot reader Anne has gave future life progression to singers for many years and has an enormous client base in the UK and Canada.
I am going to assume that you are running windows xp on your machine, and you are the only user on this machine. That is right, no one else uses your computer except you.
Let me ask you a question:
How many user accounts should you have on
your computer?
You probably guessing, one user account is
the answer, since you are the only user on your
computer. This is what most people will
answer, one, just like you thought.
Here is the problem, you can run your your machine
with only one user account. But, it is not a good
practice.
The best practice is to have two accounts,
even if you are the only user on your computer.
Here is why:
when you install windows xp, a user
account is created for you, called the admin account.
The admin account has the highest privilege on the
computer.
That is installing new programs, deleting, adding
user accounts, and all the rest of the administrative
services. In other words, you are the most effective
user on this computer.
In order to prevent unwanted install or uninstall
of programs unintentionally, you must create another
user account beside the admin account. When you create
another user account beside the admin account, so you
prevent unwanted install or uninstall.
This is because the second account created will
not have the authority of the admin on the computer.
In summary, you should have two account users on your
computer, the admin, and another account you create.
You always login and do work using the account created
other than the admin account.
The only time you should login using the admin status,
is when installing a program, or doing other tasks
that can only be done by the admin.
For tips about your Windows XP computer, visit our new website:
http://www.ResolveWindowsXpProblems.com