If you are serious about hacking, you will learn a programming language. If you are looking for instant results, I suggest you look else where because there will be no instant hacking here. There are no one click applications that will make you a hacker. To quote a fellow moderator, “Hacking is process, not a product”, and he is absolutely correct. Blah, I’m babbling again, but I think you get the idea. I’m sure you are here to get started with programming anyways, so let’s begin.
The main reason why you see me pushing C around the forums more than C++ is because the main difference between the two is OOP, something you rarely need for hacking. C++ has objects and classes (good ol’ OOP) that are necessary in larger projects but aren’t really necessary at all in our exploit code and small scripts that we will write as hackers. These are some concepts you will learn as you start actually learning the languages. I prefer C, but I will provide links to tutorials for both of these languages and let you decide which one you want to learn. But remember my words, “A good C programmer will be a good C++ programmer, but not the other way around.” *cough* Choose C *cough*
The first thing you want to do is to get yourself a compiler. A compiler is basically what turns your source code into an executable (there’s more to it than that but it’s not necessary for me to discuss that here).
If you are on a Windows platform (which I assume most of you are), you can download a good IDE that comes with the Mingw compiler at:
http://www.bloodshed.net/devcpp.html
It compiles both C and C++ code (most compilers do). It’s extremely easy to use, so I’m sure most of you won’t have any problems with it. If you do, don’t be afraid to post your problems on the forums.
another compiler for Windows:
http://www.digitalmars.com/
If you are on Linux, then you should already know how to compile under gcc. If not, shame on you.
Now on to the good stuff. Here are all of the possible tutorials you would ever need to get started on your journey to learn C or C++.
-----------------------------
Tutorials for both C and C++, I suggest starting here and continuing on:
http://www.cprogramming.com/tutorial.html
-----------------------------
-----------------------------
A series of tutorials written by a friend of mine (lovepump) for C. Programming for Hackers:
http://www.mmdhaven.com/NoUse//tuts/P4HI.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HIII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HIV.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HV.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVI.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVIII.pdf
-----------------------------
-----------------------------
A very good introduction to C++:
http://cplusplus.com/doc/tutorial/
-----------------------------
-----------------------------
Best socket programming guide out there :
http://www.ecst.csuchico.edu/~beej/guid ... intro.html
-----------------------------
-----------------------------
Here is the personal site of Bjarne Stroustrup, the creator of the C++ language. It has a lot of Q & A’s and a lot of background info on the language.
http://www.research.att.com/~bs/homepage.html
-----------------------------
Just to note, the syntax of C and C++ are really similar. Here's an example:
C:
Code: Select all
#include <stdio.h>
int main(void)
{
printf("I'm learning a programming language today!\n");
return 0;
}
C++:
Code: Select all
#include <iostream>
using namespace std;
int main(void)
{
cout << "C pwns my C++ ass\n";
return 0;
}
If you have any questions, feel free to ask.
-NoUse