Jump to content

Mac Address Changer 1.0

   (1 review)

1 Screenshot

About This File

Did this because i needed, retrieves a list of adapters from the registry, shows you your current Mac Address of the adapter in use, the user simply changes the second input field to the address he wants, then select the adapter on the list, and click 'set', after a reboot, the mac should be changed.

(The field to input the mac to set accepts '-' ':' or no separation character. ex: AA:BB:CC... or AA-BB-CC... or AABBCC...)


What's New in Version 1.0

Released

Now filters some adapters not commonly used.

Other tweaks




User Feedback

You may only provide a review once you have downloaded the file.


TheDcoder

   0 of 1 member found this review helpful 0 / 1 member

Share this review


Link to review
  • Similar Content

    • By HenryJiu
      Hello!
      I have a question , about Mac and Autoit3.
      I want to convert my script to Mac App,but Aut2Exe just convert to EXE!
      So I asked if there was a way to convert scripts to MAC App
      My English isn't very good,so don't laugh please😃
    • By KingOfNothing
      This is for mac address spoofing.
      Before a mod gives me the ban hammer for posting code such as this, id like to explain I recently had a necessity for it.
      A lot of places use mac addresses to identify devices/machines and control internet permissions.
      I myself love the xfinity wifi hotspots placed all around where I live as I can connect to them and save data usage instead of tethering my phone.
      BUT! They use a captive portal with a webpage interface in javascript and (not too much to my surprise), wifey says some of her crap wont open that page.
      I explained she can disable wifi on the device, use computer and spoof to the mac address of what she wants to use. Then sign into the portal as she would normally with computer.
      Once connected, shut the computer down and enable wifi for that device again. Once enabled shes got net access. edit: Wife looked at me like I was speaking latin.....lol
      ; ; ; Function: Set_Mac() ; ; Parameter(s): $s_Desired_Mac = Need I really explain? ; $s_Target_Net_Adapter = Network adapter name (one can use the adapter index as well but thats less "user friendly" ; $b_Toggle_Device = For my wife cuz it needs full automation for her to stop bothering me ; ; Author(s): KingOfNothing credz to google & autoitscript.com members ; ; ;===================================================================== Opt('MustDeclareVars', 0) ;cause its late in the morning and im just gonna trust this should still fly #include <WinApi.au3> $MacAddressRegKey = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007" ; ^^^ After making this I read online that this should be some "CurrentControlSet" ; key instead. However, I watched registry while changing things in adapter properties ; to see that key, which works fine on my 3 test machines.... ;easy example Set_Mac("Wireless Network Connection","",true) ;msgbox(0,"",Get_Mac()) Func Set_Mac($s_Targeted_Adapter, $s_Desired_Mac = "D20000000000", $b_Toggle_Device = true ) Local $sMac, $s_Tmp, $val, $sVar = "" $sMac = Get_Mac() while stringlen($s_Desired_Mac)< 12 and stringlen($s_Desired_Mac)> 0 ;this will append zeros if mac length is too short $s_Desired_Mac = $s_Desired_Mac & "0" wend if stringlen($s_Desired_Mac)> 12 then ;likewise if too many characters entered to function, then we should truincate some $s_Desired_Mac = StringLeft ($s_Desired_Mac,12) endif ;this creates a random mac address with very little actual thought behind it. ;Im sure theres some formal means to devising a valid mac address but this simple crap suits my needs atm.... if $s_Desired_Mac = "" then For $i = 1 To 10 $sVar= Chr(Random(48, 57, 1)) ;0-9 $s_Tmp = $s_Tmp & $sVar Next $s_Desired_Mac = "D2" & $s_Tmp $s_Desired_Mac = StringUpper($s_Desired_Mac) endif $val = RegWrite($MacAddressRegKey, "NetworkAddress", "REG_SZ", $s_Desired_Mac) if $val =0 then MsgBox(0,"Mac Address Changer ","Could not write to registry as needed to change your mac address!" & @CRLF & "Please restart this program with administrator rights!") Exit endif ;in order to benifit from changing the registry, one must disable/re-enable the adapter. ;This cmd line query to wmic prevents the need to do so in device manager manually if $b_Toggle_Device = true then ShellExecuteWait ("C:\Windows\System32\wbem\wmic.exe", "path win32_networkadapter where NetConnectionID=" & chr(34) & $s_Targeted_Adapter & chr(34) & " call disable" ,"",$SHEX_OPEN,@SW_HIDE) ShellExecuteWait ("C:\Windows\System32\wbem\wmic.exe","path win32_networkadapter where NetConnectionID=" & chr(34) & $s_Targeted_Adapter & chr(34) & " call enable" ,"",$SHEX_OPEN,@SW_HIDE) endif ;Would be smart to catch the return of the function there in some varible for error handling, but its too late for me to give a crap atm.... MsgBox(0,"Mac Address Changer", "Old Mac = " & $sMac & @crlf & "New Mac = " & $s_Desired_Mac) clipput($s_Desired_Mac) endfunc Func Get_Mac() Local $xRet $xRet= RegRead($MacAddressRegKey, "NetworkAddress") return $xRet EndFunc  
      Sorry bout the messy penmenship. Aint looked at the tidy thing yet....🧐
    • By ahha
      I'm using the excellent _Excel UDF to read a whole spreadsheet into an array I want to operate on.  I can read a specified range without a problem.  What I'd like to do is allow the user in Excel to select a range (contiguous is fine) and be able to read that range so that I know what range to operate on without having the user input the range via a keyboard.  I'm stuck and any hints greatly appreciated.  The code below uses the Helpfile .xls to illustrate where I crash.
      ; #AutoIt3Wrapper_run_debug_mode=Y ; use this to debug in console window <--- LOOK #include <Excel.au3> #include <MsgBoxConstants.au3> #include <Debug.au3> ;for _DebugArrayDisplay $sExcelFullFileName = "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\Extras\_Excel1.xls" ;use Autoit test for example $oExcel = _Excel_Open() ;Create application object and open an Excel workbook $oWorkbook = _Excel_BookOpen($oExcel, $sExcelFullFileName) $aExcelArray = _Excel_RangeRead($oWorkbook, Default) _DebugArrayDisplay($aExcelArray, $aExcelArray) ;let's look at it $aI5K6 = _Excel_RangeRead($oWorkbook, Default,"I5:K6") ;read a rangeI5:K6 and return value _DebugArrayDisplay($aI5K6, $aI5K6) ;let's look at range it ;rather than defining the range explicity I'd like to read the selection in Excel and use it ;need a function like _Excel_SelectionRead ;try hacking Excel.au3 _Excel_RangeRead to see if can create _Excel_SelectionRead looks like .Selection .Value .Text and .Address possible MsgBox($MB_SYSTEMMODAL, "Info", "Select cells in Excel then click OK") ;ACTUALLY get range of the selection and this will suffice for us to use on the $aExcelArray $vRange = $oWorkbook.ActiveSheet.Selection.Address($vRange) ;tried all sorts of permutations and clearly I need help _DebugArrayDisplay($vRange, $vRange) ;let's look at range it ;$vResult = $oExcel.Transpose($vRange.Value) ;_DebugArrayDisplay($vResult, $vResult) ;let's look at range it _Excel_Close($oExcel, False, True) Exit  
    • By j0kky
      Regular expressions, I hate them, seriously 
      I have a MAC address in this format:
      "A2B3B56B7C3A"
      And I would like to change it in:
      "A2-B3-B5-6B-7C-3A"
      The MAC address can be a little longer than that one, but we are sure that the total digit number is an even number.
      I've tried a lot of patterns but I have not tried the right one.
      This is the closest one I've tried but the output shows a final hyphen (I could cut it through StringTrimLeft but I would like to do it using just RegEx).
      ConsoleWrite(StringRegExpReplace("A2B3B56B7C3A", "(.{2})", "$1-")) I don't understand why this pattern doesn't work
      ConsoleWrite(StringRegExpReplace("A2B3B56B7C3A", "^(?:.{2})(.{2})+?", "-$1")) Thanks in advance 
    • By Danp2
      I could use some help with a Regex pattern. I am attempting to extract some names and addresses (US format) from some free form text. Examples:
      Jane Doe PO Box 1234 Pensacola, FL 32524 Jane Doe 123 Sunset Blvd Apt 456 Pensacola, FL 32524 Jane Doe 555 Any Street Pensacola, FL 32524-1234 Second address line is optional. There are instances where the city or state may be missing. I came up with the following pattern through research / trial & error, but it isn't working exactly as I desire:
      (.+)(?>\r\n)(.+)(?>\r\n)(.+)(?>\r\n)?(.+)?,\h+(\w+)? ([-\d]+) When the second address line is missing, the value for city ends up in the wrong place. Suggestions on how I can fix / improve the pattern?
      TIA, Dan
       
×
×
  • Create New...