Pakistan’s Cyber Crime Bill 2007

Saturday, April 17, 2010 18:02
Posted in category WWW - Internet

The Federal Cabinet approved the adoption of The Prevention of Electronic Crimes Bill 2007 on 17 January 2007. The proposed law titled as Prevention of Electronic Crimes Bill 2007 offers penalties ranging from six months imprisonment to capital punishment for 17 types of cyber crimes, including cyber terrorism, hacking of websites and criminal access to secure data.

The bill deals with the electronic crimes included, cyber terrorism, criminal access, criminal data access, data damage electronic fraud, electronic forgery, misuse of electronic system or electronic device, unauthorised access to code, misuse of encryption, misuse of code, cyber stalking and suggest stringent punishment for offences involving sensitive electronic crimes.

It proposes seven years punishment on charges of electronic fraud and electronic forgery and would not have the right of bail whereas those tried for data damage, system damage and criminal data access, misuse of electronic system or electronic device would get maximum three-year punishment with the right of bail.

The bill suggests maximum punishment of death or life imprisonment for those booked under cyber crimes or involved in sensitive electronic systems offences.

Following the passage of the mentioned bill, the Minister for Information Technology Awais Ahmad Khan Leghari stated that the e-crime law would require the internet companies maintain their traffic data for at least six months to enable the agencies to investigate cases involving data stored by them. He said the law would enable the government to seek extradition of foreign nationals through Interpol for their involvement in criminal activities punishable under the law.

  • Share/Bookmark

How do we get JavaScript onto a web page?

Friday, April 16, 2010 0:13
Posted in category Javascript

You can use several different methods of placing javascript in you pages.
You can directly add a script element inside the body of page.
1. For example, to add the “last updated line” to your pages, In your page text, add the following:

<p>blah, blah, blah, blah, blah.</p>
<script type="text/javascript" >
<!-- Hiding from old browsers
document.write("Last Updated:" +
document.lastModified);
document.close();
// -->
</script>
<p>yada, yada, yada.</p>

(Note: the first comment, “<--" hides the content of the script from browsers that don't understand javascript. The "// -->” finishes the comment. The “//” tells javascript that this is a comment so javascript doesn’t try to interpret the “–>”. If your audience has much older browsers, you should put this comments inside your javascript. If most of your audience has newer browsers, the comments can be omitted. For brevity, in most examples here the comments are not shown. )
The above code will look like this on Javascript enabled browsers,

2. Javascript can be placed inside the element
Functions and global variables typically reside inside the element.

<head>
<title>Default Test Page</title>
<script language="JavaScript" type="text/javascript">
var myVar = "";
function timer(){setTimeout('restart()',10);}
document.onload=timer();
</script>
</head>

3. Javascript can be referenced from a separate file
Javascript may also a placed in a separate file on the server and referenced from an HTML page. (Don’t use the shorthand ending “

  • Share/Bookmark

How to read and write a file using javascript?

Thursday, April 15, 2010 0:13
Posted in category Javascript

I/O operations like reading or writing a file is not possible with client-side javascript. However , this can be done by coding a Java applet that reads files for the script.

  • Share/Bookmark

How to detect the operating system on the client machine?

Wednesday, April 14, 2010 0:14
Posted in category Javascript

In order to detect the operating system on the client machine, the navigator.appVersion
string (property) should be used.

  • Share/Bookmark

What is an IP Address ?

Wednesday, April 7, 2010 13:36
Posted in category WWW - Internet

Every device connected to the public Internet is assigned a unique number known as an Internet Protocol (IP) address. IP addresses consist of four numbers separated by periods (also called a ‘dotted-quad’) and look something like 127.0.0.1. In computer networking, an Internet Protocol (IP) address consists of a numerical identification (logical address) that network management assigns to devices participating in a computer network utilizing the Internet Protocol for communication between its nodes.

Although computers store IP addresses as binary numbers, they often display them in more human-readable notations, such as 192.168.100.1 (for IPv4), and 2001:db8:0:1234:0:567:1:1 (for IPv6). The role of the IP address has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.

  • Share/Bookmark

What is Subnet Mask ?

Tuesday, April 6, 2010 13:37
Posted in category WWW - Internet

A subnet (short for “subnetwork”) is an identifiably separate part of an organization’s network. Typically, a subnet may represent all the machines at one geographic location, in one building, or on the same local area network (LAN). Having an organization’s network divided into subnets allows it to be connected to the Internet with a single shared network address.

Without subnets, an organization could get multiple connections to the Internet, one for each of its physically separate subnetworks, but this would require an unnecessary use of the limited number of network numbers the Internet has to assign. It would also require that Internet routing tables on gateways outside the organization would need to know about and have to manage routing that could and should be handled within an organization.

  • Share/Bookmark

What is ARP Cache Poisoning?

Monday, April 5, 2010 13:39
Posted in category WWW - Internet

Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address (IP address) to a physical machine address that is recognized in the local network. For example, in IP Version 4, the most common level of IP in use today, an address is 32 bits long. In an Ethernet local area network, however, addresses for attached devices are 48 bits long.

(The physical machine address is also known as a Media Access Control or MAC address.) A table, usually called the ARP cache, is used to maintain a correlation between each MAC address and its corresponding IP address. ARP provides the protocol rules for making this correlation and providing address conversion in both directions.

  • Share/Bookmark

How ARP Works ?

Sunday, April 4, 2010 13:40
Posted in category WWW - Internet

When an incoming packet destined for a host machine on a particular local area network arrives at a gateway, the gateway asks the ARP program to find a physical host or MAC address that matches the IP address. The ARP program looks in the ARP cache and, if it finds the address, provides it so that the packet can be converted to the right packet length and format and sent to the machine. If no entry is found for the IP address, ARP broadcasts a request packet in a special format to all the machines on the LAN to see if one machine knows that it has that IP address associated with it. A machine that recognizes the IP address as its own returns a reply so indicating. ARP updates the ARP cache for future reference and then sends the packet to the MAC address that replied.

Since protocol details differ for each type of local area network, there are separate ARP Requests for Comments (RFC) for Ethernet, ATM, Fiber Distributed-Data Interface, HIPPI, and other protocols. There is a Reverse ARP (RARP) for host machines that don’t know their IP address. RARP enables them to request their IP address from the gateway’s ARP cache. RARP (Reverse Address Resolution Protocol) is a protocol by which a physical machine in a local area network can request to learn its IP address from a gateway server’s Address Resolution Protocol (ARP) table or cache. A network administrator creates a table in a local area network’s gateway router that maps the physical machine (or Media Access Control

MAC address) addresses to corresponding Internet Protocol addresses. When a new machine is set up, its RARP client program requests from the RARP server on the router to be sent its IP address. Assuming that an entry has been set up in the router table, the RARP server will return the IP address to the machine which can store it for future use.

  • Share/Bookmark

What is a default gateway? What happens if I don’t have one?

Saturday, April 3, 2010 13:42
Posted in category WWW - Internet

A gateway is a routing device that knows how to pass traffic between different subnets and networks. A computer will know some routes (a route is the address of each node a packet must go through on the Internet to reach a specific destination), but not the routes to every address on the Internet. It won’t even know all the routes on the nearest subnets.

A gateway will not have this information either, but will at least know the addresses of other gateways it can hand the traffic off to. Your default gateway is on the same subnet as your computer, and is the gateway your computer relies on when it doesn’t know how to route traffic. The default gateway is typically very similar to your IP address, in that many of the numbers may be the same. However, the default gateway is not your IP address. To see what default gateway you are using, follow the steps below for your operating system.

  • Share/Bookmark

Can a workstation computer be configured to browse the Internet and yet NOT have a default gateway?

Friday, April 2, 2010 13:45
Posted in category WWW - Internet

In computer networks based on the Internet Protocol Suite, a subnetwork, or subnet, is a portion of the network’s computers and network devices that have a common, designated IP address routing prefix (cf. Classless Inter-Domain Routing, CIDR). A routing prefix is the sequence of leading bits of an IP address that precede the portion of the address used as host identifier (or rest field in early Internet terminology).

  • Share/Bookmark