Wednesday, September 5, 2012

RAM: A small buying Guide

I recently bought a RAM for my laptop and really had troubles finding the right one. So, This is a short guide about RAM. How can you shop for RAM if you don’t even know what it is? Random Access Memory is a form of computer storage. It’s like your hard drive in your computer, but smaller and much, much faster. The part that makes it “random” is the fact that any data stored at any location can be accessed in constant time, meaning you don’t have to wait for the data to be found or for it to travel some distance to be read.

RAM is like, if your computer needs some piece of information it doesn’t waste time traveling to the address and getting the information, it can just get it. And no address in RAM is “closer” to its destination than another, for instance, the left side of the RAM chip isn’t read or accessed any faster than the right.

Also, your computer needs RAM to be able to even boot or do any task.

DDR (1,2, & 3) SDRAM – Double Data Rate Synchronous Dynamic Random Access Memory

These are the RAM's that one is going to look for when he is going to buy one for his/her desktop or laptop. Though laptop RAM's are smaller than desktops they also have one SO-DIMM type specifications.

DDR1

Standard Name  Memory      Clock Data Transfers/s         Module Name     Peak Transfer Rate
DDR-200  100 MHz 200 Million         PC-1600 1600 MB/s
DDR-266  133 MHz 266 Million         PC-2100 2100 MB/s
DDR-333  166 MHz 333 Million         PC-2700 2700 MB/s
DDR-400  200 MHz 400 Million         PC-3200 3200 MB/s

DDR2

Standard Name Memory Clock Data Transfer/s Module Name Peak Transfer Rate
DDR2-400 100 MHz 400 Million PC2-3200 3200 MB/s
DDR2-533 133 MHz 533 Million PC2-4200 4266 MB/s
PC2-4300
PC2-5300
DDR2-667 166 MHz 667 Million PC2-5400 5333 MB/s
PC2-6400
DDR2-800 200 MHz 800 Million PC2-8500 6400 MB/s
DDR2-1066 266 MHz 1066 Million PC2-8600 8533 MB/s

DDR3
Standard Name Memory Clock Data Transfers/s Module Name Peak Transfer Rate
DDR3-800 100 MHz 800 Million PC3-6400 6400 MB/s
DDR3-1066 133 MHz 1066 Million PC3-8500 8533 MB/s
DDR3-1333 166 MHz 667 Million PC3-10667 10667 MB/s
DDR3-1600 200 MHz 1600 Million PC3-12800 12800 MB/s

As you can see as the DDR level increases the Transfer rate increases. The better the DDR level the better the performance of the computer.
But Remember, your computer can support only one type of RAM. Before going to buy check what type of RAM does your system have and the same you can buy.

SO-DIMM (Laptop RAM)
SO-DIMM memory has the same specifications as regular DDR desktop memory except for the fact that SO-DIMM is smaller. Because of it’s smaller size it’s used in laptops and net-tops (like the Mac Mini). DDR1 and DDR2 SO-DIMM modules have 200 pins, whereas DDR3 SO-DIMM has 204.
NOTE: DDR1 and DDR2 SO-DIMM modules are not interchangeable, and the layout of the pins on the module prevent you from installing it into the wrong system.

Important Thing to know:
Windows XP (and other 32-bit operating systems) can only use 4GB’s of memory. This means 4GB’s of memory in the entire system. This includes your graphics card and any other peripherals that use even the slightest bit of memory.

This becomes a problem if you’re still hanging on to Windows XP but want a super-duper fast graphics card. Some graphics cards now have 1GB or 1.5 GB’s of video RAM, which means that will be taken out of the total 4GB’s that XP can address.

The answer: get a 64 bit operating system like Windows Vista x64 or Windows 7. Keep this in mind if you’re wanting lots of RAM but also wanting XP; there’s a tradeoff.


Wednesday, August 22, 2012

Web Infrastructure on Cloud





Hey Developers out there, if you are searching for a reliable server to host your applications. Here is a small help for all of you.

1. Cloudbees
2. Jelastic
3. Redhat openshift
4. Google Appengine
5. Amazon EC2

The importance of using a hosting service is that you don't have to worry about managing servers and resources. These hosting services provide autoscaling to your services, of-course there is some cost involved but at-least your services are up and running at all times without any type of congestion.

One can choose on variety of platforms like unix, windows or linux. You can choose if you need any relational DB. Generally My-SQL is present with all the vendors. Amount of disk space, max RAM utilization can be chosen but are generally based on pricing slot selected.

Well established services like redhat openshift, google appengine and amazon ec2, which are the pioneers of the cloud services guarantees 99.999% uptime.

Pricing:
Presence of small as well as big players in the market has led enormous competition. The prices are competitive. Prices are based on amount of computing power utilized by the application. The prices are as low as $0.0139 for small applications and as large as $1.477 per hour for high I/O instances on Amazon EC2.

Some other local services might provide you more competitive pricing yet they might have a lot of hidden charges, also they will not be able to provide you with a guaranteed 99.999% uptime.


Thanks Pratikabu for your insight information and feedback.

Please mention your feedback.

Monday, July 9, 2012

Move Gmail attachments to GoogleDrive

With Google now providing free space on Google Drive, on may want all the Gmail attachments that is gets on his email or that he already have on to Google Drive. This post explains a simple and fairly easy way to do that.

Prerequisites

If you would like to have a similar setup for your Gmail and Google Drive, all you need is a minute. Just follow these easy steps:
  1. Assuming that you are logged in to your Google account, create a copy of this sheet in your Google Docs (now Google Drive).
  2. Go to Gmail create a Label "GoogleDrive" to filter only emails that has attachments. Also, you will need to create a folder in the GoogleDrive with the name "Gmail". Please make sure that the names are correctly spelled.
  3. Open the sheet and you should see a new Gmail menu – click Initialize and grant the necessary permissions. This is your sheet (see source code) and you are not sharing your Google credentials or data with anyone else.
  4. Next go the Gmail menu again and select Run. Close the Google sheet and you are done.

Background Work

Here’s how the program works. The Google sheet will monitor your Gmail mailbox in the background (every two minutes) and as soon as it finds any message that has a label GoogleDrive, it will automatically save all the attachments in that message to the Gmail folder on your actual Google Drive.
Once the basic setup is ready, apply the label GoogleDrive to any of your email messages in Gmail and the attached files should become available in your Drive (both online and offline) in the next few minutes.

Troubleshooting

If you are getting errors like “Service invoked too many times,” you can increase the trigger duration. Open the same sheet in Google Docs, go to Tools – > Script Editor and then choose Resources – > Current Script Triggers. Change the value of Minutes timer from “Every 5 minutes” to say “Every 15 minutes”.
If you would like to stop the script from running in the background, go to the same trigger screen and simple delete the “SendToGoogleDrive” time trigger.

Friday, June 1, 2012

VI Editor: Cheat Sheet

In this post I am giving a cheat sheet of VI editor. I found it very useful, hope everyone finds it useful too.


Quitting
:x Exit saving changes 
:q Exit as long as there have been no changes 
ZZ Exit and save changes if any have been made
:q! Exit and ignore any changes 

Inserting Text
i  Insert before cursor 
I  Insert before line 
a  Append after cursor 
A  Append after line 
o  Open a new line after current line 
O  Open a new line before current line 
r  Replace one character 
R  Replace many characters 

Motion
h  Move left 
j  Move down 
k  Move up 
l  Move right 
w  Move to next word 
W  Move to next blank delimited word 
b  Move to the beginning of the word 
B  Move to the beginning of blank delimted word 
e  Move to the end of the word 
E  Move to the end of Blank delimited word 
(  Move a sentence back 
)  Move a sentence forward 
{  Move a paragraph back 
}  Move a paragraph forward 
0  Move to the begining of the line 
$  Move to the end of the line 
1G  Move to the first line of the file 
G  Move to the last line of the file 
nG  Move to nth line of the file 
:n  Move to nth line of the file 
fc  Move forward to c 
Fc  Move back to c 
H  Move to top of screen 
M  Move to middle of screen 
L  Move to botton of screen 
%  Move to associated ( ),  { }, []

Deleting Text
Almost all deletion commands are performed by typing d followed by a motion. For example,  dw deletes a word. A few other deletes are:
x  Delete character to the right of cursor 
X  Delete character to the left of cursor 
D  Delete to the end of the line 
dd  Delete current line 
:d  Delete current line 


Yanking Text
Like deletion, almost all yank commands are performed by typing y followed by a motion. For example, y$ yanks to the end of the line. Two other yank commands are:
yy  Yank the current line 
:y  Yank the current line 


Putting text
p  Put after the position or after the line 
P  Put before the poition or before the line 

Search for strings
/string  Search forward for string 
?string  Search back for string 
n  Search for next instance of string 
N  Search for previous instance of string 

Replace
The search and replace function is accomplished with the :s command. It is commonly used in combination with ranges or the :g command (below).
:s/pattern/string/flags Replace pattern with string according to flags. 
g Flag Replace all occurences of pattern 
c Flag Confirm replaces
& Repeat last :s command 
:.=  Shows current line number 
:=  Shows number of lines in file 


VI Settings
Note: Options given are default. To change them, enter type :set option to turn them on or :set nooption to turn them off.To make them execute every time you open VI, create a file in your HOME directory called .exrc and type the options without the colon (:) preceding the option Set Default Description
:set ai noai  Turns on auto indentation 
:set all  Prints all options to the screen 
:set ap aw  Prints line after d c J m :s t u commands 
:set aw noaw  Automatic write on :n ! e# ^^ :rew ^} :tag 
:set bf nobf  Discards control characters from input 
:set dir=tmp dir = /tmp  Sets tmp to directory or buffer file 
:set eb noed  Precedes error messages with a bell 
:set ed noed  Precedes error messages with a bell 
:set ic noic  Ignores case when searching 
:set lisp nolisp  Modifies brackets for Lisp compatibility. 
:set list nolist  Shows tabs (^l) and end of line ($) 
:set magic magic  Allows pattern matching with special characters 
:set mesg  mesg  Allows others to send messages 
:set nooption   Turns off option 
:set nu nonu  Shows line numbers 
:set opt opt  Speeds output; eliminates automatic RETURN 
:set prompt prompt  Prompts for command input with : 
:set re nore  Simulates smart terminal on dumb terminal 
:set ro noro  Changes file type to "read only" 
:set scroll=n scroll = 11  set n lines for CTRL-d and z 
:set showmode nosm  Indicates input or replace mode at bottom 
:set sm nosm  Show matching { or ( as ) or } is typed 

Saturday, May 12, 2012

Set Default OS in Fedora 16

This is for dual boot OS users, there are many who prefers dual boot to keep another OS optional. For any reason if you wish to change boot sequence unlike grub, grub2 requires couple of commands to run.

Here will take example to keep Windows as default boot.
First of all find menuentry for Windows

#cat /boot/grub2/grub.cfg |grep Windows
the output will be:

menuentry "Windows 7 (loader) (on /dev/sda1)" --clas-clss window -ass os {

To set Windows menuentry as default (only entry mentioned in either " or ' from above command)
I had problem using doubble quotes in the command line. The problem was resolved when in changed the keyboard type from "US" to "US(Engish)" using


#system-config-keyboard

To set Windows menuentry as default (only entry mentioned in either " or ' from above command)

#grub2-set-default "Windows 7 (loader) (on /dev/sda1)"

Verify default entry

#grub2-editenv list

Generate updated grub.cfg

#grub2-mkconfig -o /boot/grub2/grub.cfg

If you get grub error "Environment block too small" then:
#rm -rf /boot/grub2/grubenv
and then rebuild it using
#grub2-editenv /boot/grub2/grubenv create


Now follow all the above steps.

Friday, May 11, 2012

Linux Run Levels

Linux systems today generally use seven runlevels.

Runlevels define what services or processes should be running on the system.

The init process can run the system in one of seven runlevels. The system runs only one of the eight runlevels at a time.

The main runlevels are from 0 – 6. Here's what each runlevel is for:

Runlevel 0: Halt System - To shutdown the system
Runlevel 1: Single user mode
Runlevel 2: Basic multi user mode without NFS
Runlevel 3: Full multi user mode (text based)
Runlevel 4: unused
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot System

Runlevels 1 and 2 are generally used for debugging purposed only, and are not used during normal operations. Most desktop linux distributions boot into runlevel 5, which starts up the Graphical Login Prompt. This allows the user to use the system with X-Windows server enabled. Most servers boot into runlevel 3, which starts the text based login prompt.

Linux runlevels can be changed on the fly using the init tool. If you want to switch from text based operations to the Graphical Interface, you just have to type in 'telinit 5' in the root prompt. This will bring up the Graphical Interface in your system.

Each runlevel can be configured by the system administrator. The "/etc/inittab" file has information on which runlevel to start the system at and lists the processes to be run at each runlevel.

Each runlevel has its own directory structure where you can define the order in which the services start. These directories are located in the /etc/rc.d/ directory, under which you have rc1.d, rc2.d, rc3.d…. rc6.d directories where the number from 0 through 6 that corresponds to the runlevel.

Refer to Wiki for runlevels on different Operating Systems.

Friday, May 4, 2012

Windows Tricks: Try out..!!

In order to achieve a faster response while in all programs in the start menu, you can easily change a registry key.

XP Instructions

1. Click the "Start" button.
2. Click "run".
3. Type "regedit" without quotes and click ok.

Note you should now be in the Registry Editor.

4. Open (double click or click the + symbol) HKEY_CURRENT_USER
5. Open (double click or click the + symbol) Control Panel
6. Open (double click or click the + symbol) Desktop
7. In the right panel, find "MenuShowDelay"
8. Right click the row and click "Modify"
9. Change the value of "400" to "0" (without quotes), or whatever you want.
10. Restart your computer.

Vista / Win 7

Same as above.

#################################################

In order to achieve a faster response while in all programs in the start menu, you can easily change a registry key.

XP Instructions

1. Click the "Start" button.
2. Click "run".
3. Type "regedit" without quotes and click ok.

Note you should now be in the Registry Editor.

4. Open (double click or click the + symbol) HKEY_CURRENT_USER
5. Open (double click or click the + symbol) Control Panel
6. Open (double click or click the + symbol) Desktop
7. In the right panel, find "MenuShowDelay"
8. Right click the row and click "Modify"
9. Change the value of "400" to "0" (without quotes), or whatever you want.
10. Restart your computer.

Vista / Win 7

Same as above.

Tuesday, May 1, 2012

Botnet

"A Botnet is a collection of software agents, or robots, that run autonomously and automatically. The term is most commonly associated with malicious software, but it can also refer to a network of computers using distributed computing software."

It all starts out with the creator of the botnet, the herder. A herder is the (master)mind behind the script that is spread around, infecting hundreds, if not thousands of computers. And each infected computer is deemed a slave to said botnet, also known as a zombie.

Botnets have recently been used mainly for DDoS attacks. These attacks can be used for a number of reasons - to put a ransom on the up-time of a site (threatening to kick it offline), to collect user credentials (as many bot scripts have keylogging functions), or simply to demonstrate the power one has over the internet.

A very rapid growth in IRC bots has been present and apparent recently. Bot scripts that connect to an IRC channel on the zombie computer can take direct commands once they are in the channel.

Spreading is necessary for a botnet. Spreading techniques that are most commonly used today range from drive-by downloads to torrents, 'cracked' software to Youtube videos, and everything in-between. And often times the herder will bind his bot to the true file that he is promoting for spreading, in which case the end-user is satisfied from the download, while he also is not suspicious of it.

Once the script is downloaded, however, the road to botnet domination still is not paved in gold. This is the point in which crypters and stubs come in...

Crypters are programs that use a number of techniques in order to prevent (or 'distract'Wink anti-virus software from detecting the virus that is being spread around. When a script avoids being detected by anti-virus, it is referred to as fully undetectable (FUD).

Some methods commonly used by crypters are:

- Adding junk code for modifying execution flow and various other reasons.
- Changing strings, encrypting strings.
- Changing variable names.
- Changing the order of all code aspects.
- Changing Assembly information.
- Adding or changing the icon.

This brings us to stubs. Stubs are usually .exe files, and sometimes .dll files. Basically, how undetectable the final script executable will be depends on the stub used. Some crypters have 'Unique Stub Generators' that come pre-packaged. Unique stubs allow scripts to be FUD for longer time periods.

Once anti-virus software 'learns' the stub, your script is no longer FUD, and you must use a new (unique) stub to make your script FUD once more.

Sunday, April 29, 2012

Networking Linux and Windows with SAMBA


Purpose of this Tutorial


The purpose of this tutorial is not to scare you away from using Linux but to encourage you! I will go over the very basics of what you need to get your Linux box and your Windows machine talking seamlessly and cover what needs to be done to accomplish some very basic file sharing capabilities.

Note: This tutorial assumes that tcp/ip is installed and functioning on both the Linux and Windows machine and that all the hardware required for proper communication is configured correctly.

Part 1: What is Samba and Why do I Need It?


To answer this question we need to discuss briefly how Windows machines exchange information and share files. In a small Windows network the initial connection and session setup is handled by NetBios, (Network Basic Input Output System.) It is the job of NetBios to handle any names that need to be resolved and to make sure that all sessions are properly configured from the start and properly terminated when the connection is closed. Once a client has a NetBios session setup with the server he can than access the shared resources provided using a protocol called SMB (Server Message Block.) When a client requests a resource on the network a SMB packet is created with some of the following information.

1. Credentials. Basically your username and password. This lets the server know who you are and what your allowed to do with the resource. (Your permissions.)

and...

2. The requested resource. How the heck do you expect to get anything in return if you dont let the server know what you want?

Although theres a lot more associated with the format of an SMB packet, these are two of the big ones you need to know. Now you may be wondering, well what the heck does this have to do with sharing files with linux!? This is where Samba comes in. You can think of Samba as a unix version of Microsofts smb protocol. It emulates the protocol in such a way that it allows Linux to share files with Windows and (horrors...!) vice versa. In fact it is so effective Windows computers have no idea they're even talking to a linux machine! So to wrap this part up, Samba is the Linux implementation of the smb protocol and allows Linux and windows to share files seamlessly.

Part 2: Installing Samba


To install Samba we need to open a terminal. You can open a terminal either by going to applications--->accessories---->terminal or by switching to one of virtual terminals (ctrl - alt - f5) I prefer a virtual terminal because I am easily distracted by the gui and all of what we will be working with will be done in the shell anyways. Alright, to begin we must install samba through the aptitude package manager. At the prompt type...

    sudo apt-get install samba


You will be prompted for the root password. Enter it and the shell will tell you the size of the package and ask you if you really want to install it. hit [Y] and allow the package to install.

Part 3: Configuring Samba


Once installed a number of directories that pertain to the Samba service and configuration will be created. I will explain the ones we will be using in this section. The first and probably most important is the actual service script itself located in /etc/init.d/samba you will use this script to start, stop and restart the service.

Note: anytime you change the samba configuration you must restart the service for the changes to take effect. the commands to start, stop and restart the service are as follows...

    /etc/init.d/samba stop (stops the service)
    /etc/init.d/samba start (starts the service)
    /etc/init.d/samba restart (restarts the service)

Like alot of applications in Linux all configuration changes that will be made to Samba will be done through its configuration file smb.conf located at /etc/samba/smb.conf So lets get right into it and configure this bad boy. you can use any text editor you feel comfortable with for this step. I prefer vi because its simple and you can expect it to be installed by default on all versions of Linux.

    sudo vi /etc/samba/smb.conf

You will see a lot of information but there are only a few lines that we need to concern ourselves with for basic file sharing. These entries are as follows.

Note: Lines that begin with "#" are considered comments and are ignored by Samba. Also, I like to delete everything from this configuration file and start from scratch so that the only entries in the file are entries I actually use. Doing this makes administration a little bit simpler.

[global]
workgroup = Enter your MS workgroup here

netbios name = The netbios name the samba machine will use

server string = The name you want your server to appear as under network neighborhood

#===== Share Definitions =====
# Configure your Shares under here. You Configure shares like this....

[tmp]
comment = My shares
path = /tmp
read only = No
guest ok = Yes

    # The above share will share the /tmp directory with everybody. No user #name or password required
    # To add some basic security you can restrict access to certain users like so...

[VeronicasDir]
comment = Veronicas Stuff
path = /home/Veronica/Documents
valid users = Veronica
public = no
writable = yes

    #The above share specifies user Veronica as the only valid user able to access #the specified share. On a windows machine you will see a share called #VeronicasDir and the share will require a valid username and password #(veronicas) to access.

Note: In order for user authentication to work properly the user needs to have a valid account on the Linux system and the user needs to have an SMB password configured to work with his or her account. configuring a user account and SMB password is done by using the adduser and smbpasswd commands:

    adduser Veronica

You will be prompted to enter a UNIX password for the user and enter some basic information. Once completed assign the user an smb password:

    smbpasswd -a Veronica

Enter a password. If the user will be accessing the share from a Windows machine it would be wise to use the same username and password so no confusion on the client side will take place. After this step is completed User Veronica can now access her home directory!


Once you have the above smb.conf configuration, save the file and restart the samba service. If you entered everything correctly in the configuration and the samba service is started, you should be able to see and navigate the Linux shares from a windows computer! Congratulations you have succesfully networked Linux and Windows using samba!

Part 4: Accessing a Windows share from Linux


Ok, so we configured Linux so Windows computers can access the shares we specified but what if a Linux machine wants to obtain a resource from a Windows computer? Dont worry, we dont have to configure another text file but we do need to become familiar with the smbclient command. This command uses the smb protocol to view and navigate shares on a windows computer. It is fairly straightforward and some basic commands are as follows.

    smbclient -L host


this will list the remote shares on a windows host and looks something like this:

Domain=[HOST] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
My Stuff Disk Put stuff here

Once you know whats on the machine you can now connect to the share:

    smbclient \\HOST\My Stuff


Enter the proper username and password if required and happy sharing! Once your in the directory, most of the basic Linux commands work. you can type help to get a list of commands you can use to manipulate the files.

Final Notes and Some Helpful Links


This is a very basic tutorial for configuring Samba on a windows network. There is a lot you can do with Samba that is not covered here and i encourage you to pursue the options! Whatever the case I hope you found this tutorial informative and most of all i hope the tutorial worked for you! Below you will find some suggested reading that really helped me out when i first started out. Thanks for reading.

http://www.samba.org/
http://www.faqs.org/docs/securing/chap29sec284.html
http://samba.anu.edu.au/cifs/docs/what-is-smb.html

Wednesday, April 18, 2012

Wireless Networking Basics


Wireless networks are very famous for their fast and the reliable working among the people of the modern World. But the people who do not like this technology and feel jealous with it and trying to do the activities that can hack the particular network and decode all the personal information of the users on the network. Basically wireless network hacking is defined as the set of different types of techniques or the tools to hijack the network through unauthorized mean with out the permission of any body and breaks the security of the network. Hackers use different types of hacking techniques to break the security of the wireless network and decode all the information such as passwords, MAC addresses, and many more secret things.

How Hacker hack the Wireless Network? 

In the past that hacking technology was used to check the security measure either the system or the network is secured or not but nowadays people use this technology for unfair means and for hijacking purposes. There are different techniques or the methods that are used by the hackers to break the security and hack the network. But some common techniques are as follows
  • Network Enumeration
  • Wireless Network Spoofing
  • Wireless Network Probing
  • Wireless Network Sniffing

Network Enumeration:

First of all the hacking process starts with the initial step, in the first step the data and the information about the wireless network is collected wit the help of any possible way , that phenomenon is referred to as the network enumeration. Hackers use different types of applications or the software to collect the important information about the network. Some of the important applications used by the hackers to hack the wireless networks are WarXing that operates with the help of computer or the laptops. Some other applications such as Kismet or network stumbler also used for the same purpose.

Wireless Network Spoofing:

It is the type of technique that is used by the hackers to crack the security and hack whole wireless networking system. It is the very strong technique that is used by the attackers to attack on the both wired and the wireless networks security and hijack them. In this technique hackers use different types of applications and the software to locate and identify the different types of addresses pf the network such as IP or MAC by filling the particular fields with the addresses. There are different types of spoofing in which the hackers deals with the specific addresses such as MAC spoofing, IP spoofing and frame spoofing

Wireless Network Sniffing:

An important technique used by the hackers to hack the wireless networks is the wireless network sniffing. In this process sniffer is used, sniffer is the program that is used by the hackers to breaks and decodes the secret information of the wireless network traffic broadcasting. Through this program hackers are also able to hijack the wired networks also. But sniffing of the wireless networks is quite easy and convenient for the hackers as compared to the wired networks.

Wireless Network Probing:

If some amount of information is missing after spoofing and sniffing of the networks then the hackers try to use the wireless network probing technique. In this technique hackers construct the artificial data packets and spread them over the network and attacks on the specific target. It is called as wireless network probing.

Prevention of Wireless Network Hacking:

Where there are different techniques to hack the wireless networks, some protection techniques are also used which are as follows
  • By encryption of the wireless traffic of wireless networks
  • Password protections
  • Change the default name and password of SSID


Saturday, February 25, 2012

Two Simple Tricks for Shell Error Handling

Here are two simple tricks that are easy to use and will make your scripts much more robust.

    Turn on -e mode (do you feel lucky - punk?)

    In this mode any command your script runs which returns a non-zero exitcode - an error in the world of shell - will cause your script to itself terminate immediately with an error.

    You can do that in your shebang line:

    #!/bin/sh -e

    Or using set:

    set -e

    Yes, this is what you want. A neat predictable failure is infinitely better than a noisy unreliable failure.

    If you REALLY want to ignore an error, be explicit about it:

    # I don't care if evil-broken-command fails
    evil-broken-command || true

    Oh and as long as you're messing with shell modes, -e goes well with -x (which I like to think of as shell X-ray).

    Like this:

    #!/bin/sh -ex

    Or like this:

    # turn -x on if DEBUG is set to a non-empty string
    [ -n "$DEBUG" ] && set -x

    That way you can actually see what your script was doing right before it failed.

    Use trap for robust clean-ups

A trap is a snippet of code that the shell executes when it exits or receives a signal. For example, pressing CTRL-C in the terminal where the script is running generates the INT signal. killing the process by default generates a TERM (I.e., terminate) signal.

I find traps most useful for making sure my scripts clean-up after themselves whatever happens (e.g., a non-zero error code in -e mode).

    For example:


    #!/bin/sh -e

    TMPFILE=$(tempfile)
    trap 'echo "removing $TMPFILE"; rm -f $TMPFILE' INT TERM EXIT

    echo TMPFILE=$TMPFILE
    echo hello world > $TMPFILE
    cat $TMPFILE

    # gives user a chance to press CTRL-C
    sleep 3

    # false always returns an error
    false

    echo "NEVER REACHED"

    Note that you can only set one trap per signal. If you set a new trap you're implicitly disabling the old one. You can also disable a trap by specifying - as the argument, like this:

    trap - INT TERM EXIT

Sunday, January 1, 2012

Digital Camera: A Buying Theory

I was wandering a lots of websites to find what camera suites my needs as well as my pocket. There are lot of brands to choose from and even more websites giving reviews of them. I was totally confused what to buy, where to buy.

I believe that some of the following steps can help a novice to buy a camera.

First is you should know what are your requirement. It depends on why are you really buying a digital camera. Is it for you to start taking hobby photographs, then i would say that one must consult a good photographer or a knowledgeable person in this field to gain some knowledge, about the lenses, the flash, the hardware that gives more sharp and clear images etc etc.

Other probable reasons are buying it for someone who just need a Camera to pic and shoot and capture some memories and they don't require much of the sophistication. For them you can buy some of the widely available ranges of camera's from Nikon, Canon, Sony, Olympus,Samsung, phillips, Kodak, etc etc.I have a good example to quote for this one. I have to buy a digital camera for my home so that if my mom and dad are visiting some place then they can easily get some pics and it should be easy to handle and i want the range to be reasonable as they dont need any high quality features.

Second is you should be careful about the brand you are going for. I would suggest everyone to go for brands and do not waste any time going for local products for this thing. The brand gives you high quality lenes as well as the hardware is of good quality, whereas this "always" does not imply for local products.

Third one is the Technical specificatons you are looking for. Check the optical and digital zoom. Check if the camera supports image stabilization and what kind of image stabilization is present, Hardware or software. You can check the aspect ratio and compare in different cameras.

The next point to consider is the battery life. Check how many photos can be taken from it. I want to mention important point that i dont prefer camera with a AA battery(but thats just me), So check what kind of battery is provided if you want to be choosy on that point too.

I hope this helps everyone..!!