Showing posts from January, 2014

Installing Latest LibreOffice in Debian stable

To get the latest version of libreoffice, do the following:

sudo su
echo 'deb wheezy-backports main contrib non-free' >> /etc/apt/sources.list
echo 'deb-src wheezy-backports main contrib non-free' >> /etc/apt/sources.list

apt-get update && apt-get -t wheezy-backports install libreoffice

Installing Skype On Debian (64bit)

There is no 64bit version, so we need to install the 32bit version.sudo dpkg --add-architecture i386
sudo apt-get update

wget -O /tmp/skype.deb
sudo dpkg -i /tmp/skype.deb
sudo apt-get install -f

That's it!

Retrieving historical financial data with python

Here is the sample python code, which will retrieve historical data from yahoo on any financial instrument (e.g. Google).

Displaying hashed passwords in Linux (Debian, Ubuntu etc.)

Simply run

sudo cat /etc/shadow

How to hash and crack UNIX passwords in python

Crypt module I am using the crypt module here, which is a one-way hash function based upon a modified DES algorithm. You can easily adjust the script to crack secure hash algorithms (SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA’s MD5 algorithm ) by using the hashlib  module.

Crypt Overviewimport crypt
crypt.crypt("user", "AD")

AD is the salt, which is a random two-character string which will be used to perturb the DES algorithm in one of 4096 ways.
The python password cracking script importcryptdeftestPass(hashpass):salt=hashpass[0:2]dictionary=open('dictionary.txt','r')#this is our dictionary fileforwordindictionary.readlines():word=word.strip('\n')crypto=crypt.crypt(word,salt)ifcrypto==hashpass:print"[+] Password: "+word+"\n"returnprint"[-] Password Not Found.\n"returndefmain():hashpass=open('passwords.txt','r')#file with hashed passwordf…

Installing Metasploit on Debian (or Ubuntu)

sudo su   apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-dev   apt-get install git-core postgresql curl ruby1.9.3 nmap gem   gem install wirble sqlite3 bundler   cd /opt   git clone   cd metasploit-framework   bundle install   ./msfconsole  

msfconsole tutorial: click