arlanne2
Content Type
Profiles
Forums
Events
Posts posted by arlanne2
-
-
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 Class0 -
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 Sub0 -
hello guys, just a few question about vb.net how to send keystrokes to cmd.exe using vb.net command line?
ex. cmd.exe
telnet 169.254.1.1 (enter)
username (enter)
password (enter)
mac aa:bb:cc (enter)
TIA
0 -
thank you boss...
0 -
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}")
0 -
1. i want to insert a inputed key from the first line to the second line but i dont know how to do it.
2. input a key without the cologne then the final outcome with separate colonge ex. aabbcc aa:bb:cc
0 -
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
0 -
@gunsmokingman, thanks this is it. how to convert this code into .vbs file?
0 -
ups...
inside the window box you can enter your name, your middle name address etc. any help woulb be prety much appreciated. TIA
ex. inside the box
Enter Your Name:
Enter Your Middle Name:
Enter Your Address:
0 -
hi, can any one code me a vbscript that can input a multiple entry of name, username, middlename in one box or window. TIA
0
Mac Changer
in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Posted
thanks jaclas. here is the error
ln31 col13 ch13
InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex