Jump to content

arlanne2

Member
  • Posts

    11
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Philippines

Posts posted by arlanne2

  1. Its has some bugs , but i cant fix the bugs any one can fix this for me? TIA


    Imports Microsoft.Win32
    Public Class Form1


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim networkcard As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}")
    Try
    'Get all the network cards names and add it to Combo Box


    For Each netcard In networkcard.GetSubKeyNames

    Dim networkcard2 As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netcard, False, Security.AccessControl.RegistryRights.ReadKey)
    Dim networkcardname As String = networkcard2.GetValue("DriverDesc")

    ComboBox2.Items.Add(netcard)
    ComboBox1.Items.Add(networkcardname)

    networkcard2.Close()
    Next
    networkcard.Close()
    ComboBox1.SelectedIndex = 0
    Catch ex As Exception
    networkcard.Close()
    ComboBox1.SelectedIndex = 0
    End Try
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

    'Get the MAC Address of the selected network card
    Dim netcardnumber As String = ComboBox2.Items.Item(ComboBox1.SelectedIndex)


    Dim getmac As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netcardnumber, False, Security.AccessControl.RegistryRights.ReadKey)
    Dim mac As String = getmac.GetValue("NetworkAddress")

    TextBox1.Text = mac
    getmac.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Try


    Dim netcardnumber As String = ComboBox2.Items.Item(ComboBox1.SelectedIndex)
    'Using integer in the above will not work

    Dim chmac As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netcardnumber, True)
    Dim textmac As String = TextBox1.Text

    If textmac.Contains("-") Then
    textmac.Replace("-", "")
    End If

    chmac.SetValue("NetworkAddress", textmac)

    chmac.Close()

    'Shell("Command.com /c IPConfig/all")

    MsgBox("MAC Address changed successfully" & vbNewLine & vbNewLine & "To effect changing MAC Address you need to Disable and Renable the Network card you selected", MsgBoxStyle.Information)
    Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.Critical)
    End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Try
    Dim netcardnumber As String = ComboBox2.Items.Item(ComboBox1.SelectedIndex)

    My.Computer.Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netcardnumber, True).DeleteValue("NetworkAddress")
    'Shell("Command.com /c IPConfig/all")

    MsgBox("MAC Address succesfully resetted" & vbNewLine & vbNewLine & "To effect changing MAC Address you need to Disable and Renable the Network card you selected", MsgBoxStyle.Information)
    Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.Critical)
    End Try

    End Sub
    End Class

    MacAddressChanger.png

  2. Hi to all i need help how to fix this error (InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.

    Parameter name: SelectedIndex) this a mac changer code. thanks for any help.



    Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim networkcard As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}")
    Try
    'Get all the network cards names and add it to Combo Box


    For Each netcard In networkcard.GetSubKeyNames

    Dim networkcard2 As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netcard, False, Security.AccessControl.RegistryRights.ReadKey)
    Dim networkcardname As String = networkcard2.GetValue("DriverDesc")

    ComboBox2.Items.Add(netcard)
    ComboBox1.Items.Add(networkcardname)

    networkcard2.Close()
    Next
    networkcard.Close()
    ComboBox1.SelectedIndex = 0
    Catch ex As Exception
    networkcard.Close()
    ComboBox1.SelectedIndex = 0
    End Try
    End Sub

  3. here you go, copy this text to notepad and save this file to .vbs

    Set cloner = CreateObject("WScript.Shell")

    cloner.run"cmd"

    WScript.Sleep 500

    cloner.SendKeys"telnet 0.0.0.0"

    cloner.SendKeys("{Enter}")

    WScript.Sleep 500

    cloner.SendKeys"username here"

    cloner.SendKeys("{Enter}")

    WScript.Sleep 500

    cloner.SendKeys"password here"

    cloner.SendKeys("{Enter}")

    WScript.Sleep 500

    cloner.SendKeys"exit"

    cloner.SendKeys("{Enter}")

    WScript.Sleep 300

    cloner.SendKeys"exit"

    cloner.SendKeys("{Enter}")

  4. to all coders i need help, i need a .vbs code that can insert an inputed key from the first line insert to the second line between the link

    mac=Inputbox("Enter MAC here","EXAMPLE","001f1f658279")

    ie.navigate("http://169.254.1.1/main.cgi?mac_esn=(I WANT TO INSERT THE MAC HERE)a&catindex=3&pageindex=1&Session=1979932169")

    ex. outcome it looks like this

    ie.navigate("http://169.254.1.1/main.cgi?mac_esn=001f1f658279a&catindex=3&pageindex=1&Session=1979932169")

    and this i dont know how to code this input a key without the colon but then the autcome will include the colon.

    ESN=Inputbox("Enter Canopy ESN","EXAMPLE","d8813a")

    oShell.SendKeys "d8:81:3a"

    ex. outcome it looks like this d8:81:3a

    once again thanks for any help. TIA

×
×
  • Create New...