Saturday 12 November 2011

Install LibreOffice In Ubuntu 10.04 or 10.10

The older 10.x versions of ubuntu, 10.04 Lucid Lynx and 10.10 Maverick Meerkat have openoffice.org and I wanted to install libreoffice for my friends in Lucid Lynx. This How To explains how to install libreoffice in ubuntu 10.04 and ubuntu 10.10 using PPA.

First, we have to remove openoffice in case it is installed. Its better to purge the openoffice.org installation with the following command.

sudo apt-get purge openoffice*.*

Now lets add the Libreoffice PPA repository with the following command.

sudo add-apt-repository ppa:libreoffice/ppa

Now we need to update our package information for which you have to issue the following update command.

sudo apt-get update

Now we are ready to go for installation of libreoffice. Type one of the following commands according to your desktop environment.

For Gnome Users:
sudo apt-get install libreoffice libreoffice-gnome

sudo apt-get install libreoffice libreoffice-kde

This completes your job for installation of the libreoffice. Now leave for package download and you can access the tools from Applications -> Office.

About PPA(Taken from Launchpad
Using a Personal Package Archive (PPA), you can distribute software and updates directly to Ubuntu users. Create your source package, upload it and Launchpad will build binaries and then host them in your own apt repository.

That means Ubuntu users can install your packages in just the same way they install standard Ubuntu packages and they'll automatically receive updates as and when you make them.


Read more...

Epub Reader Within Firefox Without Any Other Software

There is a very very useful firefox addon EPUBReader which allows you to read the .epub files from within the firefox without any need of installing other softwares. Personally I've loved this add-on very much since its simple and works really great.

About the add-on

If you click on a link to an ePub file, you are normally prompted with the Firefox save dialog.

With EPUBReader installed, you don't see the dialog. EPUBReader downloads the file, makes some processing and displays the ePub file ready to read! If you have got already downloaded ePub-files, you can read them by using the Firefox "File/File open" dialog.


Install EPUBReader For Firefox.


Read more...

Thursday 10 November 2011

Emesene Password Cracker in Python

I had recently posted a small tutorial on Emesene messenger password cracking. I have coded a small python script today that automates the process of cracking the saved passwords of emesene messenger.

#!/usr/bin/python

import os, sys, pwd, binascii

def coder():
    print """
        Coded By Samar Dhwoj Acharya
        http://www.techgaun.com
        Checked in emesene1.0
        
    """

def getpass():
    user = pwd.getpwuid(os.getuid()).pw_name
    emesene_file = "/home/%s/.config/emesene1.0/users.dat" % (user)
    if os.path.exists(emesene_file) == True:
        fp = open(emesene_file, "r")
        for line in fp.readlines():
            line_list = line.split(":")
            line_list[1] = binascii.unhexlify(line_list[1])
            print "%s : %s" % (line_list[0], line_list[1])
        fp.close()
    else:
        print "Could not locate the users.dat file."
coder()
getpass()

To run this tool, type as following in the terminal:

./emesene_cracker.py

Download Emesene Password Revealer



Read more...

How To Reach To The End Of File In Nano Editor

Sometimes the file you are working on is so long that you might want to know some shortcut rather than going through each and every entry to reach the end of file. Here I am sharing the shortcut to reach at the end of line which will prove useful several times while working with nano editor.

To reach the end of the file, you can use one of the two shortcuts available in nano.

The first one is Alt + / and the second one is Ctrl + w + v. You can use either of these. Personally I am used to use the first one. By the way, if you want to reach to the top of the file, you can use the shortcut Alt + \.

I hope it proves useful for you.


Read more...

Wednesday 9 November 2011

Encoder/Decoder Tool From Techgaun [New Release]

I am glad to release this very small encoder and decoder tool that I coded just now around 10 minutes ago. I hope this tool will be useful for you.

Right now, the tool has the following options.

Base64 Encoding and Decoding
Rot13
URL Encoding and Decoding
String Reverse
MD5 and SHA1 Hash
HEX Encoding and Decoding
ASCII to Binary and Binary to ASCII

Encoder and Decoder Tool Online



Read more...

How To Crack Emesene Messenger Passwords Easily

Emesene is a lightweight messenger for MSN users. Now that Emesene stores the passwords for emails in users.dat file with very simple ASCII to Hex encryption, it is very easy to reverse it to get the passwords.

The users.dat file is located in /home/current_user/.config/emesene1.0/users.dat and you can view the content of this file by issuing the command as below:

cat ~/.config/emesene1.0/users.dat

The format in which the login information is saved is email:hex_encrypted_password:status which is later read by emesene in next launch. Now to get the original password, all you have to do is decrypt the hex string using the encrypter/decrypter tool.

Copy the hex encoded part(i.e. password part) from the users.dat file. Mine users.dat file was samar_acharya@hotmail.com:74657374696e67:busy where 74657374696e67 is the password in the hex form. All I have to do is open the encrypter/decrypter tool, paste this hex string in the input box, select the Hex decoding optioni from dropdown list and then click on Submit to get the actual password to my account.



Read more...

Tuesday 8 November 2011

How To Go To Specific Line Number In Nano

Nano is a light-weight command line text editor that will be very useful in many cases such as while editing files on remote server through SSh. Numerous times, you want to jump to the specific line and this is very easy in nano editor.

First we need to know the line number and I usually use grep to do so. The grep -n switch will output the line number. Now if you know the line number, you can use either of the following ways to go to the specific line number.

First way is to open nano directly to the line of the file you want to reach. The syntax is something like below:

nano +104 file.sh

The above command will directly take you the line number 104 of file.sh file. Now, if you are already in nano and you want to reach to some specific line number, use the shortcut Ctrl + _ (underscore == Ctrl + Shift + -). Nano will ask you the line number to go to and enter the line number you want to go to. Another equivalent shortcut is Alt + g which I just discovered today.

I hope this helps. :)



Read more...

Monday 7 November 2011

How To Find And Change Hostname In Linux

Several times,we want to change the hostname we have set during installation. In most cases, we don't care hostname during installation and later we might need to change it to something mandatory. So I will discuss on how we can view the hostname and change it according to our wish.

To simply know the hostname, you can open the terminal(gnome-terminal for ubuntu) where you will find a entry which is something similar to samar@Techgaun: ~$. This entry is in the format user@hostname so in this example, samar is the user and Techgaun is the hostname. So this way you could simply know your hostname.

Also, there is a hostname command which also can be used to know the hostname. It can also be used to edit the hostname of your system.

To view hostname with this command, open terminal and type:

hostname

To view the FQDN, you can type:

hostname -f

Now to change the hostname, just type:

sudo hostname NEW_HOSTNAME

The above might need restart of shell(or simply do Ctrl + Shift + T) to see the effect.

Also, the file containing the host name is /etc/hostname so to change the hostname permanently, you can edit this file as well.

sudo gedit /etc/hostname

and then change the entry for host name as per your requirement. Then you need to reboot your system to see the effect or you could alternatively do:

sudo /etc/init.d/hostname stop

This will perfectly work for debian based systems. For the Redhat and similar variants, you need to edit /etc/sysconfig/network file and set its HOSTNAME field.

I hope this helps you. :)


Read more...