Sinisterly
Tutorial How to make a IP Grabber - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: Tutorial How to make a IP Grabber (/Thread-Tutorial-How-to-make-a-IP-Grabber)

Pages: 1 2


How to make a IP Grabber - Nefarious - 11-21-2012

Create a New Project.
Spoiler:
[Image: 2014ecb1a7f7b8942a082a5936a36dd2.png]


Add one button and two text box's.
Spoiler:
[Image: b58a85d0afb4a356e900930a34f5d34b.png]


Double click button1 and add this code.
PHP Code:
Dim hostname As IPHostEntry = Dns.GetHostByName(TextBox1.Text) 'this makes the program know that textbox 1 is the hostname Dim ip As IPAddress() = hostname.AddressList 'This Grabs the ip address from the host TextBox2.Text = ip(0).ToString() 'This displays the ip address in Textbox 2

That is it, debug and test it, i am using visual studio 2010.


Thanks to Cyber-Savage


RE: How to make a IP Grabber - Bannedshee - 11-21-2012

Nice! The only way to make this better is if you can explain the code,

Dim hostname As IPHostEntry = Dns.GetHostByName(TextBox1.Text) this makes the program know that textbox 1 is the hostname ( website )

Dim ip As IPAddress() = hostname.AddressList This Grabs the ip address from the host

TextBox2.Text = ip(0).ToString() This displays the ip address in Textbox 2

Anyway AWESOME thread Biggrin


RE: How to make a IP Grabber - Nefarious - 11-21-2012

I didin't know how to explain the code, the way my friend taught me was telling me it executes a server ping and grabs the ip, i do not know if he was correct.
I am not great at coding, i'm trying to learn.

Sorry =/

Mind if i add your explanation to the original post?


RE: How to make a IP Grabber - Adorapuff - 12-07-2012

I might add this to a multi-tool i'm working on. Smile


RE: How to make a IP Grabber - YP. - 12-07-2012

I almost understood everything Smile
But what program do you use to make a "new project"?
Biggrin Ich bin ein big god damn noob.


RE: How to make a IP Grabber - Nefarious - 12-07-2012

You use visual basic 2010 and up.
I dont think this works in 2008


RE: How to make a IP Grabber - YP. - 12-07-2012

does visual 2012 work?
Smile just wondering


RE: How to make a IP Grabber - Nefarious - 12-07-2012

As far as I know it should work.


RE: How to make a IP Grabber - YP. - 12-07-2012

uhm, i dont even know how to save it so i can load it..
When i saved it and opened it went back to the visual 2010 program.
Ich bin ein nub.


RE: How to make a IP Grabber - Nefarious - 12-07-2012

Debug it then build it then click save all go into the folder and run the exe