[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to creat Mac Changer Application

Posted on 2008-10-12
4
Medium Priority
?
314 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 375 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 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