Tuesday, September 24, 2013

Using CONNECT method on a http proxy using telnet

The simplest way to connect to an external server using a proxyserver.

C:\Work>telnet proxyserver 8080
Trying 192.168.1.20...
Connected to proxyserver.
Escape character is '^]'.
CONNECT irc.freenode.org:6667 HTTP/1.1

HTTP/1.1 200 Connection established

:kornbluth.freenode.net NOTICE * :*** Looking up your hostname...
:kornbluth.freenode.net NOTICE * :*** Checking Ident
:kornbluth.freenode.net NOTICE * :*** Found your hostname
:kornbluth.freenode.net NOTICE * :*** No Ident response

In this case we are connecting to a proxyserver on port 8080. After that we open a http tunnel to irc.freenode.org on port 6667. Then you need to press enter twice to establish the connection. After that you have an open socket and you can send the commands accordingly based on the protocol being used. Here we connect to an IRC server.

We could do the same thing by connecting to a HTTP server. You can apply the logic by opening a socket to the proxy server and then sending and receiving over the socket if you are doing socket programming. The only extra things you need to take care is to open the tunnel the rest of the logic remains the same.
 
C:\Work>telnet proxyserver 8080
Trying 192.168.1.20...
Connected to proxyserver.
Escape character is '^]'.
CONNECT www.google.com:80 HTTP/1.0

HTTP/1.1 200 Connection established

GET / HTTP/1.0

HTTP/1.0 200 OK
Date: Tue, 24 Sep 2013 08:34:43 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: [a dozen cookies]
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Alternate-Protocol: 80:quic
.
.
.

Friday, May 10, 2013

The best tool for clipping backgrounds

Been using this amazing tool to clip backgrounds which otherwise is a real pain to do in most other software.

Really like the simplicity of the application. Visit  http://clippingmagic.com to see it in action. Only 4 steps after that.


  1. Upload photo
  2. Select background
  3. Select object to extract 
  4. Wait for magic and you are done.

Monday, December 31, 2012

2012 in a nutshell

This year has been relaxed (lack of a better word) to say the least. Did nothing much besides work. For once in many years I did not work or passionately work on any personal project. The list of personal projects is still there but have not been able to find the right structure to get it done. And for once I really enjoyed being lazy at home. Hopefully I have had enough rest and get something going in 2013 as far as personal projects are concerned.

There is the next version of pics.fefoo, fefoo.com and the windows based twitter client which has been languishing in the dark for the last 3 years now. Not sure if it will ever be used by anyone else but me. I like using it but still need to get the kinks out and reduce the number of features and make a public version that someone else besides me can use and test.

Here is hoping I release something in 2013 and also streamline my webhosting accounts.