Sunday, 19 October 2014

How To Extract Page(s) From A Single PDF File Using Command Line

PDFtk allows users to perform common pdf tasks from the command line such as merging or splitting PDF files and pages.

To install the program:
sudo apt-get install pdftk

To extract a page from an existing pdf file. For instance just the first page (A1):
pdftk A=/home/user/Desktop/cv.pdf  cat A1 output outfile.pdf

Wednesday, 8 October 2014

How To Install sqlmap on Debian (or Ubuntu)

sqlmap is an open-source pentesting tool that automates the exploitation of SQL injection flaws.

The tool makes it pretty easy for anyone with basic command line knowledge to exploit and break into databases.

sudo apt-get install git
git clone sqlmap-dev
cd sqlmap-dev
To list available options:
python -h
Fetch database names of vulnerable url:
python -u --dbs
Enumerate tables of a website's database (e.g.: test)
python -u -D test --tables
Dump all data in database (test) and table (e.g.: costumer_data)
python -u -D test -T costumer_data --dump
More examples are available here: