Archive > January 2011

SSH Tunneling with Putty

» 27 January 2011 » In Guides, Internet, Python, Security » 2 Comments

Privacy and anonymity, these two does not exist when you’re connected to the internet. Yes, almost all of the internet users think that their actions/history is not recorded. The sad truth is, every single data that passes through your ISP’s cables is recorded. Now, there are still people thinking they can be anonymous, if they’re behind proxies etc. I myself is one of those people, but that was 2 years ago.

I used to be behind SOCKS proxies, and I thought I can do whatever I want. But since they are highly anonymous, SOCKS proxies are uber slow. And then, I was introduced to SSH Tunneling.

What’s the use?

Yes, you might notice, I said privacy and anonymity doesn’t exist in the internet. But now, we are more concerned about the other end of the connection. Since the main purpose of this, is to hide our true geographic information from the other end.

Another reason, is bypassing restrictions on the current network. Using proxies or tunnels, you can access restricted websites and protocols. One example is on school. In our university, there are loads of restricted websites, mostly social networking, and even proxy providers. Though most restricted websites can be accessed with SSL, not all provides encryption, so a tunnel is much more preferable.

Advantages of SSH Tunnels

To summarize, SSH Tunnels are much more secure and faster. And unlike proxies, you have access to the actual server, so you have control over the logs, etc.

How is it done?

Before going to the actual procedures, you must first have the following requirements.

Yes, you need a SSH Account on a remote web server. Luckily for me, my good friend Andy allowed me to have a space on his VPS, and I have my own account there.

So the first thing you need to do is to fire up putty.

Putty Session Page

Putty Session Page

Enter the server’s host address and the assigned SSH port (22 is the default).

Putty SSH Tunnel

Putty SSH Tunnel

Then, on the left side, go to Connection -> SSH -> Tunnels. Add a new forwarded port, I suggest those above 1024, and Click the Dynamic radio button. Then click add. Open the session, login, and you’re done.

Application

Now that we have our set up, we can use this just like a regular SOCKS proxy.

Host: 127.0.0.1
Port: 8080 (or whichever port you forwarded)

You can verify your connection by visiting websites that tells your IP. An example is: whatsmyip.

If you have problems or clarifications about this topic, feel free to comment.

Continue reading...

Tags: , , , , ,

Victories, and Beyond

» 25 January 2011 » In C/C++, Life, Programming » 1 Comment

This time, I will be less technical. No, actually ignore the first sentence. I’ve been coding since 2007, and C was my first language. I use Turbo C back then, and it was a pretty cool compiler back then. It’s now an antique, and you can download it here.

As I was saying, I can still remember the things I’ve been coding in Turbo C. I had that Pythagorean solver, which I posted in planet-source-code. I was so proud, and I even created a general mathematical solver, for a bigger one. Oh, and do you know that I tYpE LiKe tHiS bEfoRe?. Anyway, why am I saying all this stuff? Actually I was just refreshing my memory of what I am before, and comparing it on what I am now.

For the times that have passed, coding became an art for me. It sounds silly, but true. I can safely say I’ve done more than 100 usable programs and scripts just to fulfill my hobby. I used to code for automation, and exploitation. Nobody in my family knows what I’m doing. All they can see, is me, looking at a computer screen for an average of 16+ hours a day. I never felt boredom in coding, as boredom comes when you’re out of ideas on what to code. My ideas are hard to implement. Sometimes thoughts have been passing though my brain in countless numbers of times.

So what did I do to be, here? Almost 4 years of programming experience, I never kept track of myself. Though I somewhat became a little boastful, it has changed. August, last year, I wiped out my old HDD, desperately (see my other post). Alongside with that, is the memories, and codes of my past. So basically I never got to see those stuff again, ever. On the good side, change.

Change is inevitable, this is what I hear from others. I usually, don’t care, but now it’s the opposite. Simple things change, and these leads to greater changes. And you know what? Learning a new language, changes me. When I’m introduced to C++, I was discouraged by a friend in UK. Thinking the iostream library is a bloat, I embraced the C Standard Library. Until one day, I just realized I need to go for C++.

C++ is the superset of C, and as I became open to the object oriented environment, I became open to a new environment in real life as well. Though, I do not wish to put things in detail, I can simply say that this is one of the most remarkable changes in me. And praise God for that.

Few hours ago (January 25, 2010), I won a regional C++ programming competition. Before the awarding, I was shaking because of the cold air + the excitement I felt. This, is what I can call “Victory”. And even if I lose, it still is a victorious fight. I was very grateful for what God has made me. I started this year with a brand new prayer life. And these victories I’ve been experiencing, is a way of God telling me.. “There’s more..“.

It’s not only victories that I should prepare for, failures and discouragements will arise. But, faith will still remain. And if I fall, I fall forward, plus, God will catch me. God bless.

Continue reading...

Tags: , , , , ,

Protecting Public E-mail Address from Spam

» 23 January 2011 » In Internet, Security » 3 Comments

One of the greatest problems of individuals or group of people is spam. Most of the time, they have their e-mail addresses posted on their public websites for contact purposes. And the addresses is in plain text. This, is one of the most common mistakes, which leads to spam. Encoding contact information in plain text.

I found a solution for this. Well actually two solutions. For a brief summary of how it works, for the first one, the e-mail address is encoded in html entities. The second one includes CSS code direction, the e-mail is somewhat reversed.

All credits to where it is due.

Wanna see it in action? Here is my own e-mail address, this is valid, and you can use this to contact me.

em.leur@leur

The Process

Actually, it’s not so hard. For the first one, encode your e-mail address to html entities. If you have an e-mail called: me@somedomain.com, the equivalent is:

me@somedomain.com

You can convert them here. And then you can just paste it on your html code.

For the second one, you need to reverse it. For reversing, what I did, is coded a C++ program. Well, you can find tools online, but I found it harder. Yes. So here is the source code if you’re interested.

#include <iostream>
#include <algorithm>
#include <string>
int main() {
	std::string inStr;

	//Take input
	std::cin >> inStr;

	//Reverse it
	std::reverse(inStr.begin(), inStr.end());

	std::cout << inStr << std::endl;
	return 0;
}

Actually, you can do the same in python, as it’s much easier. But I’ve been practicing, so I did this on C++. The output will be:

moc.niamodemos@em

Then, CSS code direction:

<style type="text/css">
	span.codedirection { unicode-bidi:bidi-override; direction: rtl; }
</style>

Basically it will reverse our reversed string. And then wrap it in html span tags (as defined in the CSS above).

<span class="codedirection">moc.niamodemos@em</span>

And, goodbye spam!

Continue reading...

Tags: , , , , ,

Welcome, New Generation

» 12 January 2011 » In Life, Technology » 2 Comments

I feel so old. Actually, one of the most interesting questions I have ever seen was posted in superuser. I can’t believe that this kind of question will come this early. Well if you’re wondering what that question is..

What are the Windows A: and B: drives used for?

I was like, seriously? I got this from the Hacker News. And it’s very surprising that a question (like I said earlier) like this will be this early. And this was asked 2 days ago, January 10, 2011. I’ll remember that date, and I’m pretty sure there are a lot more people with questions like this.

Floppy Drives

I can remember using floppy disks when I was in the sixth grade. And my uncle, have loads of floppy disks to store their thesis material. I even encountered my first virus alert when I inserted a neighbor’s floppy disk! It made me panic, and that afternoon I was about to cry. Don’t blame me, blame Norton (Yes, I use norton back then).

Drives A: and B: is obsolete in modern computer packages these days. And who would even need one? Average USB thumb drives has gigabytes of storage capacity, and don’t you just love that?

New Generation

I’m afraid this marks the new generation. They’re maybe too young but learning doesn’t choose an age bracket. And honestly, I wish to read more questions like this. Got a link to one? Comment it here!

Continue reading...

Tags: , , , ,