Saturday, August 25, 2012

the easiest way to get aircack-ng and reaver working on ubuntu 12.04

neither aircack-ng nor reaver is in the repos in ubuntu 12.04. aircrack was dropped in the precise cycle because it was dropped by debian temporarily in order to sort out some licensing and maintenance issues, and reaver is fairly new and just didn't make it in time. fortunately both packages are in 12.10. by far the easiest way to get these packages to work in 12.04 is to download the quantal versions and install them in precise. i've done so, and i haven't run into any problems. :) the packages can be found here:

http://packages.ubuntu.com/quantal/aircrack-ng

http://packages.ubuntu.com/quantal/reaver

once installed, run:

ifconfig

to figure out your wifi interface. then put it in monitor mode:

sudo airmon start wlan1

next, run 'airodump' to figure out the BSSID of the network you are aiming to penetrate:

sudo airodump mon0

when you have found it, cntr-c to exit. then run 'wash' on it to see if reaver is possibly going to be successful.

sudo wash -i mon0

if so, then let reaver do its magic :)

sudo reaver -i mon0 -b BSSID -v


Thursday, August 23, 2012

making a high quality djvu file/ebook from somewhat crappy pdf scans

i am assuming you either you have a hard copy of an article/book/etc., or else a pdf file of a scanned in document that you wish you clean up and make into a high quality djvu file. also, i am a linux user, i have no idea (and couldn't care less) how to do it on windows/mac. here is how i do it.

tools

gscan2pdf (my fav scanning program presently)
scan tailor (brilliant piece of software)

steps

if you have a hardcopy, i recommend using gscan2pdf (the name is deceiving, it also outputs djvu). it may, in fact, do almost everything you need to get your documents cleaned up. play with it; it is a powerful tool.

 if you have a pdf file, the first thing you need to do is to convert it to a multipage tiff file. the highest quality way to convert it that I have found is by using the following ghostscript command:

gs -SDEVICE=tiffg3 -r600x600 -sPAPERSIZE=a4 -sOutputFile="output.tif" -dNOPAUSE -dBATCH -- "input.pdf"

this seems to output a much higher quality tiff file than the easy to use "convert" command:

convert input.pdf output.tif

now create a work folder that you put the tiff file you created into, open up scan tailor and open up this work folder. scan tailor is an amazingly powerful application. it will split pages, straighten things out, center the content, de-speckle, and more. again, play around. by the time you are done, you will be able to output a very nice, clean djvu file.

recommendations for using scan tailor

even for books, i recommend looking at each page briefly to make sure that the content is properly selected (often it selects more than is needed on marked up pages).

after the content is selected, i center the content on each page, so the margins are the same.

i output in 600dpi.

next

scan tailor creates an "out" folder in the work folder you created. there are a number of ways you could convert the output files (one for each page) into a single djvu file. this is not my preferred way, but here is a command line way of doing this:

for i in *tif; do cjb2 $i ${i%tif}djvu; echo $i; done

instead, i prefer to re-open gscan2pdf, and select all of the tiff file you just generated in the "out" folder. this way, i can see the output files in a scrollable way and notice any corrections i need to make back in scan tailor before producing my final product.

when things are ready, select the djvu output option, and you should have a really nice djvu file.

post-processing

it is often nice to have both a djvu file and a pdf file. to make this conversion, in my experience the best method is the following command:

ddjvu -format=pdf input.djvu output.pdf

finally, when i print a document, i often want to save paper by creating a "2x1" document, where each page i print has two documents printed side-by-side in landscape orientation. unfortunately, i only know how to do this with pdf files.(p.s., i wish i knew how to output such a document directly into another djvu document. i do not. if anyone has any tips, please leave a comment!). you need "pdfjam" installed, and then run the following command:

pdfjam --nup 2x1 --landscape input.pdf

this will output a file of the same name with "-pdfjam" appended to it.

other resources

here are some very helpful resources i used to figure things out:

http://www.danielstender.com/granthinam/564/
http://askubuntu.com/questions/46233/converting-djvu-to-pdf

Tuesday, August 21, 2012

t-moble short prompt vs. standard prompt?

anyone know the difference between the two? does it cut out all the rubbish before someone can actually leave a message?