Saturday, April 2, 2011

The Matrix has you

            Do you remember a movie called The Matrix (a science fiction-action film) which has been written and directed by Larry and Andy Wachowski in 1999? If not, then you haven’t watch this movie yet.  The reason is no one will ever forget this movie, even they don’t understand.  I’m not going to tell about that movie, I’m going to tell about the reality of the movie. The basic theme of this movie is a virtual world called matrix. Is this world can be implement in the real world? Now that sounds interesting.
       In most of the movies, we can see computing stuff like hacking, login remotely, accessing the internet, chatting via the internet and, blah blah blah....The fact is most of them are not using real systems, and they just control the system by using unknown commands and methods. Somehow in The Matrix movie, there is a scene that an infamous female hacker called Trinity is trying to login a system remotely.  Check this out.

 In this picture she uses a Linux system and NMAP (a network mapping program). Not only NMAP but also she uses SSHnuke (the real tool is SSH - Secure Shell) to login to the remote system as root (Admin). That's really cool. Still you may think is it possible to build a virtual world (which has everything like the real world) in side a computer or a server.  There are little evidences we can think of it. I’ll show them from my next post.

Wednesday, March 23, 2011

Forgetting Root

What happen if you forgot your GNU/Linux root password? 

Worry? ah.... 

Ok. I'm going to describe a method which can be helpful to you. I have tested this method in my Linux OS (debian 6.0 ). 
Here what you need to do, first of all, make sure what is the boot loader you are using. You can check it easily by reading the name when your PC boots. If your boot loader is LILO then this method is not for you. If your boot loader is GRUB .............
 Follow these easy steps. Unfortunately, I don't have any screen shot. Because of that I have used one screen shot from the internet.


  Examine the screen shot at the end of this post. 
 1. Reboot the PC and press arrow keys when the boot loader appear.

 2. Select the OS and press 'e'
 3. Select the kernel mode. 
              You can find this in the top of the list. I can give a phrase. "linux /boot/vmlinuz ". Try to find that line.
FYI :  vmlinuz is the name of the Linux kernel executable.

 4. To edit that line, press 'e' again. For Grub V1.9+, you don't need to do that.

 5. Now go to the end of the line by hitting 'End' key. Type the following path to initialization after a space.
      init=/bin/bash
 6. Now exit from the edit mode and press 'b' to boot. For Grub V1.9+ use Ctrl+x
 7. After the system boots type following in the command prompt.
                #mount -o remount, rw /
                    #passwd
           
      Enter your new password.

              #sync
                  #mount -o remount, ro /
                  #reboot

 8. Thatz it. Hopefully, this method will work for your system. However, I can't grantee.

              

Friday, February 25, 2011

Setting up LAMP server

From this post you are going to learn how to set up LAMP server on your linux operating system. I'm using GNU/Linux Debian 6.0 distro. You can directly apply these methods for DEB based Linux systems (Ubuntu). For the RPM based systems (Redhat, Fedora, Suse ...... ) you need to apply different commands.
Ex: for DEB
      #apt-get install package-name
      for RPM
      $ yum install package-name
      $ zypper install package-name

LAMP again.........

First of all you need to install few packages, you can't find a package called LAMP, LAMP is a collection of packages which belongs to PHP and MySQL.

1.you need to update your source list.
     #apt-get update
   then install apache2 and php5 or any php version which is compatible to your distro.
    #apt-get install apache2 php5 libapache2-mod-php5

2. Run a php script

<?php
        echo "Hello World\n";
?> 

save this code in to the test.php file and you should place it /var/www/. (you can give any name with php extinction)
interpret the code by using php command
# php /var/www/test.php
 

3. MySQL and phpMyAdmin
   
    To do database stuff you need to install MySQL (complete package with most of the utilities) and for the php database stuff you need to install phpMyAdmin.

    #apt-get install mysql-server mysql-client php5-mysql
    #apt-get install phpmyadmin

4. Using MySQL

    To use MySQL, you need to have a user name and password. In order to add a new user ....................

   #mysql
  you will get a prompt like this
   mysql>
   mysql> CREATE DATABASE myData
   mysql> GRANT ALL ON myData.* TO name@localhost IDENTIFIED BY 'password';
   mysql> exit
  
   test your user name
   # mysql -u name -p myData

5. Dealing with phpMyAdmin

    phpMyAdmin a web based SQL database handler. In order to use phpMyAdmin open your favorite web browser and use this URL ( if you haven't set a domain name )

    http://localhost/phpmyadmin/

    and give your user name and password there. ( which you have created for the SQL database )


6. Run php in your web browser

   We have already done with the basic LAMP configuration. Still we haven't check apache web server   (you don't need to configure apache2.conf file for the basic LAMP configuration).
        I.  Create a php script file (as I explained before ) in the /var/www/ directory.
        II. Just open a web browser again and type
             http://localhost/test.php

Note: red color - user define names (not keywords)

Thatz it. Enjoy the LAMP server.
  


Wednesday, February 16, 2011

Install tar.bz2 in linux

If you want to install an application which is not listed in your linux distro sources you need to find an installable file which suitable to your distro.
example:
                for debian/ubuntu, you need to download .deb files
                for fedora/suse/redhat you need to download .rpm files

If you can find .bin file, that would be the easiest way to install the application.
In this post I'm going to show how to install the application from the hardest way. (only use this method if you fail to find above files, and this method can be use for any linux distro)
Ok, now I'm going to install seamonkey. (a web browser based on firefox)

1. Download tar.bz2 file.

2. Make a directory and move the downloaded tar.bz2 file to that directory.

To make a directory ( "seamonkey" is the name I have used)

mkdir seamonkey

To move tar.bz2 file ( "seamonkey-2.0.11.tar.bz2" is the name of tar.bz2 )

mv seamonkey-2.0.11.tar.bz2 ./seamonkey/
cd seamonkey/
 
3. Extract .tar.bz2 file ( you can use full name without using * )

tar jxvf sea*.tar.bz2

4. Change the directory to seamonkey which has been extracted.

cd seamonkey/


5. Finally run the application by using

./seamonkey

6. Configure the application launcher ( the way is depends on the desktop environment )
for GDM


FYI: This method is for seamonkey, for the other applications, open the .tar.bz2 file then you can find the README.txt. You will find a similar method as above.

Saturday, February 12, 2011

Live HTTP headers for Firefox

From this post you are going to learn how to install Live HTTP headers tool.
What is Live HTTP headers tool?
                       It's a tool which gives all the information about the site you are visiting. That is the simplest answer by the way.
Follow these easy and dirty steps.

1. Install Live HTTP headers tool.
    You need to download firefox addons. click here
 or for direct download ( other browsers ) click here
 

2. Allow to install



3. Hit on Install Now






4. Restart Firefox by clicking Restart Firefox



5. To run Live HTTP headers tool
    tools > Live HTTP headers

 
 6. Now you can see the meta data of the site you are visiting. enjoy !!!

Friday, January 14, 2011

Setting up JDK (Windows)

Hello folks, now you are going to learn how to setup JDK to compile using "javac" and run the compiled class using "java".  You can download JDK from here.
Note: The arrow points where you should click.

1. Download


2. Open the downloaded file



2. Install JDK








3. Now you can compile your source code, but not comfortable. You need to change the location every time.




4. To fix that go Start > Control Panel


5. Double click on System

6. Go to Advanced tab







7. Click on the Environment Variables button


8. In the User Variables click New




9. Set 
         Variable name: Path 
         Variable value: C:\Program Files\Java\jdk1.6.0_23\bin
    
  •    Note: Variable value depends on the location you have installed. The ordinary value is like this
                       location of Java \ jdk folder with the version\bin

10. Now you can compile very easily.

That's it. Enjoy !!!