Personal Technology Information |
|
Web Standards
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 probablyInternet 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. Sincethe 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 headeros.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 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
MORE RESOURCES: What I Got Wrong in a Decade of Predicting the Future of Tech The Wall Street Journal Smartphones Can Now Last 7 Years. Here's How to Keep Them Working. The New York Times iPad Pro vs. MacBook: The Great Apple Laptop Trade-Off The Wall Street Journal Opinion | Technology Hates Me The New York Times In the City, Personal Safety Starts With Your Smartphone The Wall Street Journal Jonathan Haidt's 'The Anxious Generation': Tech, Smartphones Cause Teen Anxiety - WSJ The Wall Street Journal Tech That Will Change Your Life in 2024, From AI to EV - WSJ The Wall Street Journal The AI Gadget That Can Make Your Life Better—and Two That Definitely Won't - The Wall Street Journal The AI Gadget That Can Make Your Life Better—and Two That Definitely Won't The Wall Street Journal Want to Get More Done? That Podcast in the Background Is Holding You Back The Wall Street Journal How TikTok Is Wiring Gen Z's Money Brain The Wall Street Journal OpenAI Made AI Videos for Us. These Clips Are Good Enough to Freak Us Out. - The Wall Street Journal OpenAI Made AI Videos for Us. These Clips Are Good Enough to Freak Us Out. The Wall Street Journal Apple's New iPad Pro vs. New iPad Air vs. iPad: Why Are There So Many? The Wall Street Journal The Invisible $1.52 Trillion Problem: Clunky Old Software The Wall Street Journal After a Sugar High of Free Money, These Billion-Dollar Technologies Need a Nap The Wall Street Journal Huawei's latest smartphone mostly made in China The Register We Aren't Posting on Social Media as Much Anymore. Will We Ever? The Wall Street Journal The Tech to Help You Beat Your Tech Addictions The Wall Street Journal Tech Hubs Are Losing the Talent War to Everywhere Else The Wall Street Journal What Kind of Driver Will Your Kid Be? This Test Can Tell. The Wall Street Journal iPhone Fixes to Make if You're the Family IT Department This Year The Wall Street Journal AT&T, Verizon, Sprint, T-Mobile US fined $200M for selling off people's location info - The Register I Bought the World's Hottest High-Tech E-Bike. Then Its Maker Went Bankrupt. The Wall Street Journal Hands Off! With $3500 Headsets in the Wild, New Social Norms Apply The Wall Street Journal Apple's New Face Computer Is for Work The Wall Street Journal Schools Want to Ban Phones. Parents Say No. The Wall Street Journal Niklaus Wirth, Who Inspired a Generation of Computer Programmers, Dies at 89 The Wall Street Journal Vision Pro Review: Apple's First Headset Lacks Polish and Purpose The New York Times He Stole Hundreds of iPhones and Looted People's Life Savings. He Told Us How. The Wall Street Journal The Accounting Technology Lab Podcast: Personal Tech at CES 2024 CPAPracticeAdvisor.com Boys Are Struggling. It Can Take Coaches, Tutors and Thousands a Month to Fix That. The Wall Street Journal 100 Cool Tech Gadgets in 2024, According to a Tech Expert BestProducts.com 12 Apps We Can't Stop Using, for Better or Worse The Wall Street Journal Best Tech Gifts of 2023 to Buy This Holiday Season, an Updated List - WSJ The Wall Street Journal Yun-Hee Kim promoted to Tech Editor, Corporate and Personal Technology The Washington Post The Four Steps to Better Password Security The Wall Street Journal Testing Apple’s Vision Pro The New York Times Turn On Your iPhone's Stolen Device Protection Now to Secure Your Money and Photos in iOS 17.3 Update - WSJ The Wall Street Journal Meta’s Ray-Ban Smart Glasses Use AI to See, Hear and Speak. What Are They Like? - The New York Times Snapchat's Friend-Ranking Feature Adds to Teen Anxiety The Wall Street Journal A Pain-Free Way to Secure All Your Online Accounts The Wall Street Journal Is the $139 Amazon Prime Subscription Still Worth It? The Wall Street Journal The Apple Video Feature Awkwardly Crashing Your Meetings - WSJ The Wall Street Journal What if You Never Had to Charge Your Gadgets Again? The Wall Street Journal The most personal technology | Jul 22nd 2023 The Economist Quick Tips to Save Time on the Telephone The New York Times Apple’s iOS 17.3 Stolen Device Protection Update Aims to Stop iPhone Thieves The Wall Street Journal Don't rent out that container ship yet: CIOs and biz buyers view AI PCs with some caution The Register Do You Have Painful 'Tech Neck?' This Expert-Approved Gadget Might Help The Wall Street Journal The Most Important Tech Company You've Never Heard of Is a Major Reason Computers Keep Getting Faster The Wall Street Journal Faster, Beefier, Cheaper: The Next-Generation Electric Skateboards Have Arrived The Wall Street Journal Sluggish Wi-Fi? Weird Party Smells? 8 High-Tech Helpers for Harried Holiday Hosts The Wall Street Journal Meta Welcomes Headset War With Apple - WSJ The Wall Street Journal Meta and Google Are Betting on AI Voice Assistants. Will They Take Off? The New York Times Distracted, Forgetful and Hooked on Smartphones: Why More Women Are Being Diagnosed With ADHD The Wall Street Journal Ten years ago Microsoft bought Nokia's phone unit – then killed it as a tax write-off - The Register Yes, It's Rude to Use Your Laptop During Meetings—and More Tech Etiquette Rules You Might Be Breaking The Wall Street Journal You're Brewing It Wrong: The Coffee-Making Myths That Might Be Holding You Back The Wall Street Journal How to Cut Down Your Screen Time but Still Get Stuff Done The New York Times EU duties might not hold off flood of China EVs The Register Why Tech Companies Are Not Your Friends: Lessons From Roku The New York Times BASICally still alive: Classic language celebrates 60 years with new code and old quirks The Register New Tech That Asks 'Are You Sure About Sending a Nude Photo?' The Wall Street Journal How to Make Your Phone Last Forever: 6 Simple Tips The Wall Street Journal |
RELATED ARTICLES
Learning To Navigate Ciscos Online Documentation When studying for your Cisco CCNA, CCNP, or CCIE exam, you've got a powerful online weapon at your disposal. It's Cisco Connection Documentation, found at www. How I Started Working With 3D Modeling Programs So I'll start from the very beginning.One day I was surfing in the web and I found one site -- www. Digital Cameras: Hot Gear with the Coolest Features! Cameras: still known for taking pictures but assumed as digital still today.We have to understand cameras are just as important today as they have always been to us. Bios Term BIOS - Basic Input Output SystemThe central processing unit of a computer needs to communicate with the many hardware devices installed in your computer.The BIOS of a computer contains a piece of software that enables the CPU to communicate with the many devices a computer has installed. Buying A PC Flat Screen Monitor For six years, my Samsung PC 13.8 inch SyncMaster conventionalmonitor has served me well. What Exactly are Screensavers? - part I After reading this good article you will know some important information about screensavers and their history. You will find out how screensavers are different from other applications and what advantages you'll have if you use them. Emulation Manual - A Complete Guide on How to Change Your Windows XP to Mac OS X IntroductionMac OS X is the most technologically advanced operating system by Apple. The use of soft edges, translucent colors and pinstripes (similar to the hardware of the first iMacs) brought more color and texture to the windows and controls on the desktop which is what windows lack. Repairing A Corrupt .RAR/.ZIP Archive Step 1:Open WinRAR and browse to the folder with your .rar/. Get Ahead When You Build Your Own Computer If you've been kicking around the idea of building your own computer, it actually isn't a bad idea. It's easier than you might think, and you can probably come out with a system that gives you more kick for your money, than you'd see in retail, or those made-to-order places. Make Windows XP Run Faster! A friend told me: "My computer startup seems to be taking a long time. And when the hard disk finally stops churning, everything just seems slower than when it was new. A Beginners Guide to Avoiding Viruses "Aaaaaahhhhhh! I've been invaded by a virus!" Getting a virus means getting sick and no one in their right mind wants to be ill. Well, now that computers have become our close friends, it's a shock to learn that foreign bodies too can invade them with malicious intent. Bluetooth Headphones For Your PDA Nothing is worse than having to negotiate all kinds of cables with your many electronic devices. This is why bluetooth technology is so fantastic. The Benefits of the New Firefox Browser You probably heard of the new Firefox browser version 1.0 recently released by Mozilla. Cut Through the Hype and Make the Right Digital Camera Comparisons There are soooo many choices. With all the styles and features, and prices are all over the map, digital camera comparisons can be mind-boggling. Upgrading Your PC for Non-experts IntroOne of the big advantages of PCs over earlier types of computers is that they're upgradable. If you get to the point where you need a faster computer, more storage space or whatever, you don't have to buy a new PC. Smart Apple iPod Tips and Techniques Are you thinking of buying an Apple iPod? Or have you bought one?Almost everyone and anyone that I know seems to have bought an iPod or at least is thinking of getting an ipod for themselves or their loved ones. The iPod is just so alluring! However, do you know what you should do after buying the iPod?Most people don't. Things You Can Do To Speed Up Your Computer Upgrading your processor will always speed up your computer, but sometimes this will not be the best thing to do. The first thing you need to do is find out where the bottle neck is in your system. Help, I Need a New HDTV! (Part 3 of 5) Feeling overwhelmed in selecting a new TV? With all the choices these days, you may feel like, "Where do I start?!"In part 3 of our 5 part article, we the discuss what HDTV is.HDTV stands for High Definition TV. What Does That Error Message Really Mean? Surf the 'Net for about 10 minutes and chances rate veryhigh that you'll encounter an error of one kind oranother.Whether the error message pops up on your own computer oron a website loaded in your browser, knowing what theerror means can help you solve the problem much fasterand avoid hours of frustration (especially in a situationwhere nothing you do will solve the problem). Home Electronics: The Facts About Plasma TV Not so many years ago, homes across the country watched their favorite TV shows on a bulky floor model that took awhile to warm up before you could see the picture, didn't offer anything in the way of remote control manipulation and offered a washed out image on the TV's cathode ray tubehosted screen.. |
home | site map |
© 2006 |