Westi Posted July 26, 2004 Share Posted July 26, 2004 Hi,if you're in a secure network environment only network adapters with privilegedMAC addresses have access to the network.If you don't know what i mean browse away. If you want to connect with a new/portable computer such an intranet/WLAN you have to use a valid MAC address.The script changes the MAC address for all adapters up to 32 to the given address.You've to know what you do.There are a lot of companies who sell software for this.Freeware not available but:http://www.autoitscript.com/fileman/users/public/Westi/tempmac.au3AutoItSetOption("TrayIconHide", 1) If @OSVersion = "WIN_NT4" Then MsgBox(16, "Wrong OS ", "Program needs NT5!") Exit EndIf $REG = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\00" $NAM = "MAC-Address 1.0 by Westi" $VAR1 = InputBox($NAM, "Please enter the new temporary MAC-Address." & @LF & "12 digit needed!" & @LF & "i.e. '12 AB 3f 00 dc 65' or " & @LF & "ab32DF451bCa") If @error = 0 Then $VAR1 = StringUpper($VAR1) $VAR1 = StringStripWS($VAR1, 8) If StringLen($VAR1) = 12 Then For $I = 0 To 32 If $I > 9 Then $VAR = $I Else $VAR = "0" & $I EndIf If RegRead($REG & $VAR, "ProviderName") = "Microsoft" Then RegWrite($REG & $VAR, "NetworkAddress", "REG_SZ", $VAR1) EndIf Next MsgBox(16, $NAM, "If you click 'OK' ," & @LF & "your original MAC-Address will rebuild.") For $I = 0 To 32 If $I > 9 Then $VAR = $I Else $VAR = "0" & $I EndIf If RegRead($REG & $VAR, "ProviderName") = "Microsoft" Then RegDelete($REG & $VAR, "NetworkAddress") EndIf Next EndIf EndIfThe AU3 script it's not perfect but it works and i wrote a full function program in http://www.autoitscript.com/fileman/users/public/Westi/mackie.zip.It needs the service winmgmt.Who benefits?I wrote it for an admin to connect all VPN/subnet/WLAN.Westi Link to comment Share on other sites More sharing options...
ezzetabi Posted July 26, 2004 Share Posted July 26, 2004 Nice. If it works it if great. Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 5, 2004 Share Posted October 5, 2004 Hi,if you're in a secure network environment only network adapters with privilegedMAC addresses have access to the network.If you don't know what i mean browse away. If you want to connect with a new/portable computer such an intranet/WLAN you have to use a valid MAC address.The script changes the MAC address for all adapters up to 32 to the given address.You've to know what you do.There are a lot of companies who sell software for this.Freeware not available but:http://www.autoitscript.com/fileman/users/public/Westi/tempmac.au3AutoItSetOption("TrayIconHide", 1) If @OSVersion = "WIN_NT4" Then MsgBox(16, "Wrong OS ", "Program needs NT5!") Exit EndIf $REG = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\00" $NAM = "MAC-Address 1.0 by Westi" $VAR1 = InputBox($NAM, "Please enter the new temporary MAC-Address." & @LF & "12 digit needed!" & @LF & "i.e. '12 AB 3f 00 dc 65' or " & @LF & "ab32DF451bCa") If @error = 0 Then $VAR1 = StringUpper($VAR1) $VAR1 = StringStripWS($VAR1, 8) If StringLen($VAR1) = 12 Then For $I = 0 To 32 If $I > 9 Then $VAR = $I Else $VAR = "0" & $I EndIf If RegRead($REG & $VAR, "ProviderName") = "Microsoft" Then RegWrite($REG & $VAR, "NetworkAddress", "REG_SZ", $VAR1) EndIf Next MsgBox(16, $NAM, "If you click 'OK' ," & @LF & "your original MAC-Address will rebuild.") For $I = 0 To 32 If $I > 9 Then $VAR = $I Else $VAR = "0" & $I EndIf If RegRead($REG & $VAR, "ProviderName") = "Microsoft" Then RegDelete($REG & $VAR, "NetworkAddress") EndIf Next EndIf EndIfThe AU3 script it's not perfect but it works and i wrote a full function program in http://www.autoitscript.com/fileman/users/public/Westi/mackie.zip.It needs the service winmgmt.Who benefits?I wrote it for an admin to connect all VPN/subnet/WLAN.Westi<{POST_SNAPBACK}>I don't know if this has worked for anyone else but there is no way that the code will work on my WinXP Home box. I was just reviewing the code and was trying to find the registry key that you edit in the script, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\00##:NetworkAddress, it doesn't exist under any of the keys you search for. This will just add reg trash which noone needs. This box has 4 ethernet cards in it so I don't even want to try to run this becuase if it did find the cards it would change all of their MAC addresses to the same number... now that would be a mess.*** Matt @ MPCS Link to comment Share on other sites More sharing options...
Westi Posted October 6, 2004 Author Share Posted October 6, 2004 I don't know if this has worked for anyone else but there is no way that the code will work on my WinXP Home box. I was just reviewing the code and was trying to find the registry key that you edit in the script, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\00##:NetworkAddress, it doesn't exist under any of the keys you search for. This will just add reg trash which noone needs. This box has 4 ethernet cards in it so I don't even want to try to run this becuase if it did find the cards it would change all of their MAC addresses to the same number... now that would be a mess.As you see it changes all MAC addresses to the same value.Original AU3-code was tested on XP Pro SP1 and 2003 Server with one adapter 'cause of the restricted network support maybe it don't work on XP Home. VB6 application tested on XP Pro SP1 and 2003 Server with more than one adapter and should work on XP Home.I found another free app with a nice gui and many more options:http://www.gorlani.com/publicprj/macmakeup/macmakeup.asp Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 6, 2004 Share Posted October 6, 2004 As you see it changes all MAC addresses to the same value.Original AU3-code was tested on XP Pro SP1 and 2003 Server with one adapter 'cause of the restricted network support maybe it don't work on XP Home. VB6 application tested on XP Pro SP1 and 2003 Server with more than one adapter and should work on XP Home.I found another free app with a nice gui and many more options:http://www.gorlani.com/publicprj/macmakeup/macmakeup.asp<{POST_SNAPBACK}>It isn't that the network support is restricted... I just can't find the registry values you are editting. I use MacMakeup constantly and I even have source for a C application that does this... I was just commenting b/c I thought it was interesting because someone did this in AutoIt. If it works for someone then more power to you. Good Job I guess.*** Matt @ MPCS Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now