Hack Forums
[.NET] IP Address Example - 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 Address Example (/showthread.php?tid=788132)

Pages: Pages 1 2


IP Address Example - Pulser - Nov 2, 2010

IP Example


[IMG]http://i56.[censored].com/2agky1e.gif[/IMG]

Hey all of my fellow C# coders. I threw together this fairly basic "IP Address Example" for all of you to work with. Anyone coding some sort of shell booter or DDoS client may be able to use some of the examples shown in this program.

At the end of the thread I will post a link to the source code as well as an executable.

There are two options on the main form of the program.

- The first option simply displays your own IP address.
- The second option will display information about the website.

You can search a website in any form E.G.

www.Google.com
Google.com

The program will resolve the IP address and display it in the box. To get a websites IP address, simply type the URL into the box and press Enter on your keyboard.

If you want information on an IP address, click on the resolved IP inside of the box, and from the drop down menu, click "Get IP Information".

Pictures:

Main Form
[IMG]http://i1125.photobucket.com/albums/l583/alwayspredictable/MainForm.jpg[/IMG]

Different Options
[IMG]http://i1125.photobucket.com/albums/l583/alwayspredictable/Options.jpg[/IMG]

My IP Option
[IMG]http://i1125.photobucket.com/albums/l583/alwayspredictable/MYIP.jpg[/IMG]

Resolve IP
[IMG]http://i1125.photobucket.com/albums/l583/alwayspredictable/IPlookup.jpg[/IMG]

Download
http://www.multiupload.com/5J4THBPDE1

I really hope someone finds a use for this source!


* - Pulser - Nov 2, 2010

Quick B*ump guys, simply because I added a gif.


* - Deceptive - Nov 2, 2010

So all this really does is the get the IP from the website that is input but the user?


* - Positive - Nov 2, 2010

Good work. I have PMed you a ? though.


* - Pulser - Nov 2, 2010

(Nov 2, 2010 04:50 PM)TheMist Wrote:  So all this really does is the get the IP from the website that is input but the user?

Actually in the thread I said:

It gets the specified website IP address.
Gets the users IP address.
Gets whois information on the IP addresses listed in the box.

:O


(Nov 2, 2010 04:54 PM)Positive Wrote:  Good work. I have PMed you a ? though.

Thank you for the positive comment, I have PMed you back.


* - Ace of Spades - Nov 2, 2010

Beautiful work mate :] I love seeing more C# coders, not enough here on HF :]


* - Pulser - Nov 2, 2010

(Nov 2, 2010 05:45 PM)()_() Wrote:  Beautiful work mate :] I love seeing more C# coders, not enough here on HF :]

Yeah, I do my best to post a lot of C# examples and tutorials.

Trying to build up the C# community a bit.


* - namename - Dec 6, 2010

I downloaded the ip example, I wrote the site I want to hack, I have the ip, how do I hack the site? maybe do the thing were the site just says hacked ,

or go to the admins computer, and make the admins computer not work, and so the admin buys a new computer, then I make that computer not work too


* - Pulser - Dec 6, 2010

(Dec 6, 2010 09:09 AM)namename Wrote:  I downloaded the ip example, I wrote the site I want to hack, I have the ip, how do I hack the site? maybe do the thing were the site just says hacked ,

or go to the admins computer, and make the admins computer not work, and so the admin buys a new computer, then I make that computer not work too

I think you are just a troll. Go back to your bridge.


* - Pulser - Dec 6, 2010


Hey, thanks for the positive comment! 👍


* - Mr. Anderson - Dec 6, 2010

Thanks for posting! Hopefully the "how do I get site ip" threads will stop now!


* - namename - Dec 6, 2010

predictable im not a troll,

other person wtf, , these things are possible, the other person talked about doing it in the other threads but I didnt get it


what happened to the persons post the flammed me


* - Pulser - Dec 6, 2010

(Dec 6, 2010 12:43 PM)namename Wrote:  predictable im not a troll,

other person wtf, , these things are possible, the other person talked about doing it in the other threads but I didnt get it


what happened to the persons post the flammed me

Your post was ridiculous and made no sense.


* - ISwearSheWas18 - Dec 6, 2010

Easy to do, is like 3lines or something.
Anyways good job :)


* - Pulser - Dec 6, 2010

(Dec 6, 2010 01:26 PM)ISwearSheWas18 Wrote:  Easy to do, is like 3lines or something.
Anyways good job :)

Much more than 3 lines.

Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;

namespace Webclient
{
    public partial class Form1 : Form
    {

  string dl;
  string IPLU;

  public Form1()
  {
    InitializeComponent();

  }

  private void button1_Click(object sender, EventArgs e)
  {
  }

  private void button2_Click(object sender, EventArgs e)

  {

  }

  private void yourIPToolStripMenuItem_Click(object sender, EventArgs e)
  {

    WebClient ipdl = new WebClient();

    dl = ipdl.DownloadString("http://www.showmyip.com/simple/");

    MessageBox.Show("Your IP Address is:" + " " + dl);
  }

  private void textBox1_KeyDown(object sender, KeyEventArgs e)
  {
    if (e.KeyCode == Keys.Enter)
    {
    string hostaddy = textBox1.Text;
    string invurl = hostaddy.Replace("http://", "");

    try
    {

    IPAddress[] getip = Dns.GetHostAddresses(invurl);

    foreach (IPAddress IP in getip)
    {
    IPLU = IP.ToString();
    listBox1.Items.Add("An IP Address For" + " " + textBox1.Text + " " + "is" + " " + IPLU);
    }

    }

    catch (Exception ex)
    {
    MessageBox.Show(ex.Message);
    }

    }
  }

  private void getIPInformationToolStripMenuItem_Click(object sender, EventArgs e)
  {

    try
    {
    if (listBox1.SelectedItem == null)
    {
    MessageBox.Show("Please Search a Website First!");
    }
    else
    {
     System.Diagnostics.Process.Start("http://whois.domaintools.com/" + IPLU);
    }

    }

    catch (Exception ex)
    {
    MessageBox.Show(ex.Message);
    }

  }

  private void textBox1_MouseClick(object sender, MouseEventArgs e)
  {
    textBox1.Text = "";
  }

    }
}

Thanks for the good comment.