mercoledì 22 marzo 2017

BUSYBOX - SSHing to a W-Gate Router

I had to ssh ing to this box running a a stripped version of BusyBox witha really tiny ssh server support with Dropbear that wasn't accepting connection from a regular ssh client on Ubuntu.
After succesfully trying connecting with the dbclient (the dropbear client that acts more or less as a ssh client) , dbclient that is available in ubuntu official software I have noticed that thas box need a specific kind of MAC (Message Authentication Code) algorithm to connect.



Using this option ( -o MACs=hmac-sha1 ) the ssh client connected succesfully letting me make the tunnel that I wanted:


ssh -o MACs=hmac-sha1 -vvvl user ip


mercoledì 15 marzo 2017

UBUNTU - pdftk to join 2 pdf, one wiht odd pages and one with even pages

I have 2 files resulting from my network scanner yet in pdf format.
One file has all even pages with correct order ( Pari.pdf ).
The other has all odd pages but with inverted order (Dispari_invertite.pdf)
The document will start with an even page and then I have to shuffle page one by one from every source file.

This is the (impressive for me) one command solution:




pdftk A=Pari.pdf B=Dispari_invertite.pdf shuffle A Bend-1 output collated.pdf


I assume that you have been entered in the working folder before. The "Bend-1" option reverse the order of B file; so if you need to join 2 ordered odd and even files will use "B" instead. Collated.pdf is the output file of course. For me its an impressive one line command that make me love linux terminal to make things quicker and better than installing a lot of dedicated software. Bye