Hack Forums
[.NET] IP Info Grabber Source - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] IP Info Grabber Source (/showthread.php?tid=4947330)



IP Info Grabber Source - Burakku Kenshi - Aug 13, 2015

This is the source code for my simple little program that you can see here: https://hackforums.net/showthread.php?tid=4947331

Here is the download link: http://www.mediafire.com/download/o3dklpnf4ynk674/IP_Info.rar


* - Neos07 - Aug 13, 2015

(Aug 13, 2015 12:09 AM)Asuna Yuukii Wrote:  This is the source code for my simple little program that you can see here: https://hackforums.net/showthread.php?tid=4947331

Here is the download link: http://www.mediafire.com/download/o3dklpnf4ynk674/IP_Info.rar

It's simplier than I expected, try to get those informations from a website as geoiptool.com.


* - nathan72389 - Aug 13, 2015

dont really need a whole source for 1 line of code.
Code
CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")

Code
Public Class Form1
    Private Sub CarbonFiberButton1_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton1.Click
      Dim T As New Threading.Thread(AddressOf GrabInfo)
      T.IsBackground = True
      T.Start()
    End Sub
    Sub GrabInfo()
      CarbonFiberButton1.Enabled = False
      CarbonFiberTextBox1.Enabled = False
      CarbonFiberTextBox2.Enabled = False
      CarbonFiberTextBox2.Text = ""
      Using Wc As New Net.WebClient
      CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")
      End Using
      CarbonFiberButton1.Enabled = True
      CarbonFiberTextBox1.Enabled = True
      CarbonFiberTextBox2.Enabled = True
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
      CheckForIllegalCrossThreadCalls = False
    End Sub
    Private Sub CarbonFiberButton2_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton2.Click
      Process.Start("http://www.whatismyipaddress.com/ip/" & CarbonFiberTextBox1.Text)
    End Sub
End Class

p.s. haha, you suck
Code
CheckForIllegalCrossThreadCalls = False



* - ShittyAdvice - Aug 13, 2015

(Aug 13, 2015 04:36 AM)nathan72389 Wrote:  dont really need a whole source for 1 line of code.
Code
CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")

Code
Public Class Form1
    Private Sub CarbonFiberButton1_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton1.Click
      Dim T As New Threading.Thread(AddressOf GrabInfo)
      T.IsBackground = True
      T.Start()
    End Sub
    Sub GrabInfo()
      CarbonFiberButton1.Enabled = False
      CarbonFiberTextBox1.Enabled = False
      CarbonFiberTextBox2.Enabled = False
      CarbonFiberTextBox2.Text = ""
      Using Wc As New Net.WebClient
      CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")
      End Using
      CarbonFiberButton1.Enabled = True
      CarbonFiberTextBox1.Enabled = True
      CarbonFiberTextBox2.Enabled = True
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
      CheckForIllegalCrossThreadCalls = False
    End Sub
    Private Sub CarbonFiberButton2_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton2.Click
      Process.Start("http://www.whatismyipaddress.com/ip/" & CarbonFiberTextBox1.Text)
    End Sub
End Class

p.s. haha, you suck
Code
CheckForIllegalCrossThreadCalls = False

No need to be so rude, but using CheckForIllegalCrossThreadCalls is indeed bad!


* - Burakku Kenshi - Aug 13, 2015

(Aug 13, 2015 04:36 AM)nathan72389 Wrote:  dont really need a whole source for 1 line of code.
Code
CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")

Code
Public Class Form1
    Private Sub CarbonFiberButton1_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton1.Click
      Dim T As New Threading.Thread(AddressOf GrabInfo)
      T.IsBackground = True
      T.Start()
    End Sub
    Sub GrabInfo()
      CarbonFiberButton1.Enabled = False
      CarbonFiberTextBox1.Enabled = False
      CarbonFiberTextBox2.Enabled = False
      CarbonFiberTextBox2.Text = ""
      Using Wc As New Net.WebClient
      CarbonFiberTextBox2.Text = Wc.DownloadString("http://ip-api.com/csv/" & CarbonFiberTextBox1.Text).Replace(",", vbNewLine).Replace("""", "")
      End Using
      CarbonFiberButton1.Enabled = True
      CarbonFiberTextBox1.Enabled = True
      CarbonFiberTextBox2.Enabled = True
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
      CheckForIllegalCrossThreadCalls = False
    End Sub
    Private Sub CarbonFiberButton2_Click(sender As Object, e As EventArgs) Handles CarbonFiberButton2.Click
      Process.Start("http://www.whatismyipaddress.com/ip/" & CarbonFiberTextBox1.Text)
    End Sub
End Class

p.s. haha, you suck
Code
CheckForIllegalCrossThreadCalls = False

(Aug 13, 2015 04:45 AM)ShittyAdvice Wrote:  No need to be so rude, but using CheckForIllegalCrossThreadCalls is indeed bad!

Care to explain another way to do it?


* - Neos07 - Aug 13, 2015

(Aug 13, 2015 06:28 AM)Asuna Yuukii Wrote:  Care to explain another way to do it?

That's why I told you to try making it with another complicate website as geoiptool.com. It will be harder.


* - Odus - Aug 13, 2015

(Aug 13, 2015 06:28 AM)Asuna Yuukii Wrote:  Care to explain another way to do it?

Delegates. Invoke those motherfuckers!


* - Burakku Kenshi - Aug 13, 2015

(Aug 13, 2015 07:49 AM)Odus Wrote:  Delegates. Invoke those motherfuckers!

Okay i'll check that out.
I only recently started coding so thanks for the advice 🙂