Posts

Showing posts from January 29, 2012

reading e-mail using telnet

Reading an e-mail in telnet is very efficient way if you're in a terminal. Using telnet, this is how we can read e-mail. #> telnet mail.example.com 110 Trying 111.143.22.11... Connected to mail.example.com. Escape character is '^]'. +OK Dovecot ready. user user@example.com +OK pass myPass +OK Logged in. list +OK 336 messages: 1 12235 2 6577 3 14192 4 12238 5 5575 6 16008 7 8474 . retr 2 +OK 6577 octets Return-path: Envelope-to: useranother@ example.com Delivery-date: Thu, 05 Jan 2012 16:17:35 -0700 Received: from ip20-166-235-224.ph.ph.cox.net ([20-166-235-224]:2273 helo=D99DBHK1) by example.com with esmtp (Exim 4.69) (envelope-from ) id 1RiwYw-0006bM-RB for user@ example.com; Thu, 05 Jan 2012 16:17:35 -0700 From: "Mike Batista" < username@ example.com> To: "'My Test anonymous name'" < username@ example.com> Subject: test Date: Thu, 5 Jan 2012 16:17:41 -0700....

tunneling using SSH and connect via MySQL in different port

I use the command below with -f [requests ssh to run in the background], and -N [to not execute a remote command] $> ssh username@example.com -L 3307:example.com:3306 -p 2222 -f -N the -L argument specifies that 3307 is the port to be used locally from example.com [the remote server] on its 3306 port [MySQL default port]. Then run the command below to connect to MySQL with port 3007. $> mysql --host=127.0.0.1 --port=3307 --protocol=TCP -u mysqluser -p Hope this helps.

Benchmarking DSA vs RSA using openssl

I came to the curiosity today with these signing encryption algorithm with DSA and RSA when I was looking for public key based authentication for ssh. So I got this command from openssl to benchmark which of these encryption performs faster. #> openssl speed Doing mdc2 for 3s on 16 size blocks: 1902676 mdc2's in 3.00s Doing mdc2 for 3s on 64 size blocks: 527773 mdc2's in 3.00s Doing mdc2 for 3s on 256 size blocks: 135799 mdc2's in 3.00s Doing mdc2 for 3s on 1024 size blocks: 33896 mdc2's in 3.00s Doing mdc2 for 3s on 8192 size blocks: 4233 mdc2's in 3.00s Doing md4 for 3s on 16 size blocks: 6152933 md4's in 3.00s Doing md4 for 3s on 64 size blocks: 5104109 md4's in 3.00s Doing md4 for 3s on 256 size blocks: 3207656 md4's in 2.99s Doing md4 for 3s on 1024 size blocks: 1344698 md4's in 3.00s Doing md4 for 3s on 8192 size blocks: 205278 md4's in 3.00s Doing md5 for 3s on 16 size blocks: 4881899 md5's in 3.00s Doing md5 for 3