How to spoof the mac address programmatically

Mac Address or Physical Address:

The MAC address uniquely identifies the network card within the current network segment. It consists of a vendor id that is unique among all network vendors, and a relative id that is unique to the vendor. The address is hard-coded onto the network adapter. But since most of the drivers were developed with the Windows Driver Development kit, the MAC address is read from the Windows registry, when the card is initialized. Now when you are launching any hacking attempt your MAC address is registered at your ISP that your physical address has accessed the particular website and you can be easily identified as MAC address is always unique.

Actually overall concept is that : Our windows operating system adds an extra layer of device conventions with the help of registry and then whenever some tool or website tries to inquire your physical address it picks it from registry. So in reality your device’s physical address or Mac address will remain same and unique but Device’s Physical address or Mac address at windows user level will be spoofed or changed. 

The below technique of changing Mac address is converted into an Automated C program by me(haktuts).

Now let us see how to write a C program to Spoof Mac address or Change window’s level Machine address i.e. Physical address or Mac address.
#include <windows.h>
#include <iostream>
#include <conio.h>
using namespace std;

void readregistry();
char* spoofmac();
int main(int argc, char* argv[])
{
readregistry();
spoofmac();
}
char* spoofmac()
{
    char buffer[60];
    unsigned long size = sizeof(buffer);
    HKEY software;
    LPCTSTR location;
    char adapternum[10]=””;
    char numbers[11]=”0123456789″;
    char editlocation[]=”System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0000″;
    char macaddress[60];
      ……….CONTINUED