Programming relationship with hacking - 1

When it comes to computers and everything related to them, programming is the mind and body, heart and soul. Without software, any piece of hardware is nothing but a random collection of metal and plastic. But with a beautiful stream of 1’s and 0’s it can almost literally be pumped full of life. Everything we see and everything we do on our mobiles and computers and really every fancy new gadgets these days, was created by someone, somewhere who night after night tirelessly wrote a program in code to create something wonderful.

The users often don’t fully comprehend exactly what goes on behind the scenes of any decent piece of software. For this reason, here’s a little reality check before we get to the main topic. A line of code is a single average line in a program and usually contains around 40-50 characters. The Unix 1.0 OS (1970) contained about 10,000 lines of code (LoC). Today, an average iOS or android app has approximately 50,000. That is 50,000 lines typed word by word by someone, and we’re just getting started. Photoshop CS6 clocks in at a freaky 5 million LoC and the Firefox browser? – 10 million. Moving on to the big players, we’ve got Windows 7 at 40 million and guess what? Microsoft office is actually bigger than the parent OS itself (about 45 million LoC). Now that you’re gaining a little perspective, let’s blow it to hell. The website healthcare.gov (reportedly) has an unbelievable 500 million lines of code. To put that into perspective, if a decent and immortal programmer started making this website in the last ice age 10,000 years ago, they’d still be going today, while of course cursing their destiny.

What’s the point of telling you all this?

Programming is not for the faint hearted. It takes effort (but not that much). Truth be told, lines of code is a very poor measure for difficulty. It’s like measuring a person’s success by counting the number of words they’ve spoken, ridiculous and not really related. The point of all that was to prove wrong the ones who overstate and exaggerate the difficuty of learning programming. It’s almost always pictured as something unbelievably boring, dry, dull and plain geeky. According to movies, a programmer is a fat nerdy guy with huge spectacles sitting in front of the computer mindlessly typing away while all that s/he accomplishes is something facetious and laughable. This could not be more wrong. Undoubtedly, programming can only be done by someone who thoroughly enjoys it. Being a programmer myself, I can honestly say there’s simply no way to describe it. It’s different for everyone which is why to truly find out if programming is for you, you will just have to try it out for yourself.

Programming teaches you how to think. It teaches you how to solve any problem, whether it is considered possible or not is irrelevant.

Moving On, let’s take a look at how exactly programming can help a hacker. First of all, it is what differentiates you from script kiddies. If the only hacks someone can do are made by others, then that person really cannot be called a “Hacker”. If you ever tried googling about hacking and gave up soon without finding an answer, you’re not alone. The main reason most hackers are not big on helping others is because they start getting bombarded by noobs asking them to hack (fb) accounts and explain something so basic and silly that they just give up and start ignoring them. Programming helps you understand how everything in your smarter idiot box comes together. It gives you better knowledge about how to identify and solve any problems by yourself. By knowing programming, you get a better understanding about how vulnerabilities and exploits work. Most importantly you can code your own tools, scripts, exploits, shell codes, entire applications and modify existing ones according to your own needs. No need to learn it from others, you can simply make it your own. You get to explore and pioneer in uncharted territory.

What all can you expect to do with programming? Sky’s not the limit, when there are footprints on the Moon. Everything, literally everything you can think of. But that’s the big picture stuff. Let’s take a sneak peek of the programming world with an example of this website itself. Press a button in the sub menu up top, you’ll see a further menu pop up. What I did to make that happen is I wrote a simple function (set of commands) that should be executed when the user presses the menu button. Similarly hovering your mouse over the button changes it’s color. To make that happen I wrote a small JS script that looks for the event of mouse hover over the button and then changes the color.

These were just a couple of examples in an infinite ocean of possibilities. In programming, you can expect to find and identify problems and find your way through them with logical thinking.

So that’s that for an introduction to programming. The next question that comes is where to start?

All you have to do is pick a language and dive in. Which one? There’s simply no right or wrong answer to this question. Fair warning, you’ll have to learn quite a few languages for hacking, preferably as many as possible. Even if you will not need to write in every language, you should know how to at least read it. Nobody is perfect, least of all, programming languages. Each one has it’s pros and cons. You can do the same thing in a million different ways with a dozen prorgamming languages. The time spent analyzing these useless facts could better be spent actually learning something. There is nothing to gain from comparing languages. Knowing quite a few myself, I can tell you the difference between languages is almost like the difference between “Hello”, “Hi” and “Hey”. Although languages like HTML, SQL, Java are used for different things, it really doesn’t matter where you start since you should learn as many languages as you can. For making a webpage you’ll need HTML, for making applications – Visual Basic, for data storage – SQL, for complex programs – C++ (just an example). Clearly, every single one of these and others as well are useful to a hacker. So, for the last time, start wherever you want to (or randomly).

The final destination is the same, below are a few of the different paths (languages) for a programming beginner to follow. It is generally advised to stick to mainstream languages when beginning and these are some of them:

  • C++, Java, C# :
    These are the most used high level general purpose languages. Most of what you’ll ever do on a computer would not be possible without these. Almost every software, tools, applications is made by these. You are bound to run into these one day or another. They require a fair amount of effort but yield the greatest rewards. These are generally not recommended as a first language. My first language was C++, and it made learning every consequent language much easier. Once more, it’s up to you.
  • HTML/SQL/XML :
    These are so easy, they’re almost not even worth learning. But they offer great rewards for very little effort, something you’ll never hear in the rest of the programming world. Actually, you can learn these just to tell people that you know so many computer languages. You can easily absorb the basics of these three, for example, in under a day. SQL is particularly important for hackers as it can, in some cases provide an easy way into a server’s database (SQL injection) – Definitely worth knowing, considering we’re all lazy and proud. (JavaScript also deserves a mention here, but it’s a bit bigger and deeper)
  • Python, Ruby :
    These are two more quite powerful languages. Python is pretty much the best and most widely used scripting language out there, although it can be used generally also. Ruby is another general purpose language.

These were just a few examples, there are several languages out there. Check out “Part 2” for a compilation of the best sources and websites to start learning programming right away. Keep calm and code on.


Join our telegram channel
Like our Facebook page
Back to home page

Comments