Solved

How to creat Mac Changer Application

Posted on 2008-10-12
4
303 Views
Last Modified: 2012-05-05
HI everyone i wanted to ask you guys if you know how to help me in a vb6 project ive thought about building a software that make it able to Spoof(Change) the Mac Address of a device
Ok my problem is i dont know how to start i know that the network cards Names are stored in the registry here HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318} and that a new string key has to be created when you want to change the MAc address but what i dont understand is how to make it that the mac address will be assigneted to the right NIC Network Internet Card Example what my project should do
Example:

NIC Name: Wireless Lan Adapter1 Current Mac:
                                                            New Mac:

NIC Name: Wireless Lan Adapter2 Current Mac:
                                                            New Mac:

i hope you guys understand what i mean please help if you know how and please explain it cause id like to understand what build i dont want just copy and past it into my project :S

By the way if someone know how to change the IP Configuration too of a NIC in vb6 :P tell
0
Comment
Question by:Mi4night
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Rimvis
ID: 22700540
Take a look here

See and Change your MAC Address in VB.NET
http://forum.codecall.net/visual-basic-programming/10444-see-change-your-mac-address-visual-basic-net.html

Provided source is for VB.NET, but I hope you can translate it. It uses WMI and registry, nothing that can't be achieved with VB6
0
 

Author Comment

by:Mi4night
ID: 22704187
This is not what im looking for sorry i need it in vb6 i dont have much time know to read it writtien in vb .net and convert it isent there anyone who has an answer please help if possible but thx anyway Rimvis
0
 
LVL 31

Accepted Solution

by:
Frosty555 earned 125 total points
ID: 22715947
You can simplify the VB.NET code down to the following:

Enumerate through the keys:
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0000
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0002
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0003
... etc

Looking for the key which has the "DriverDesc" string inside that matches the device you want to change.

Once it finds it, change or set the "NetworkAddress" string to the new MAC address, without colons, e.g. "001354E242F1".

In the registry will be lots of devices that don't support mac addresses/ip addresses but they are still in that key. For that reason, the vb.net program used WMI to list the network devices, but strictly speaking, it isn't necessary.

Unfortunately, registry manipulation in VB6 is a pain in the butt, and you will probably need to ask a new question to get information on that.
0
 

Author Closing Comment

by:Mi4night
ID: 31505530
Thx a lot it helps me a lot now i just got to build a loop to get all the keys :D
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 10 start screen issues 9 55
Saving history changes to sub form 4 48
Spell Check in VB6 13 126
Create Files based on Cell Values in a Range in Excel 12 43
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question