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;
using System.Net.Sockets;
using System.Threading;
using System.Net.NetworkInformation;
namespace eye
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static string host;
static int port;
int four2,four;
string one, two, three;
private void Form1_Load(object sender, EventArgs e)
{
this.ShowInTaskbar = true;
this.Text = "Df's eye!";
this.Location = new Point(100,100);
button2.Text = "Exit";
label1.Text = " 到 ";
label2.Text = "";
textBox1.Text = "存活主机\r\n";
textBox5.Text = "端口状态\r\n";
button1.Text = "Hunt";
textBox4.Text = "23";
timer1.Interval = 1500;
string hostname = System.Net.Dns.GetHostName();
System.Net.IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(hostname);
string ip = ipEntry.AddressList[1].ToString();
string ipo = ip.Split('.')[0].Trim();
string iptw = ip.Split('.')[1].Trim();
string ipth = ip.Split('.')[2].Trim();
textBox2.Text = ipo + "." + iptw + "." + ipth + "." + "1";
textBox3.Text = ipo + "." + iptw + "." + ipth + "." + "255";
label2.Text =ip;
}
public void x()
{
host = one + "." + two + "." + three + "." + four;
Ping p = new Ping();
PingReply r = p.Send(host);
if (r.Status == IPStatus.Success)
{
textBox1.Text += host + " is connecting\r\n";
scan();
}
else
{
textBox1.Text += host + " can't connect\r\n";
}
four++;
}
public void scan()
{
CheckForIllegalCrossThreadCalls = false;
TcpClient tc = new TcpClient();
tc.SendTimeout = tc.ReceiveTimeout = 1000;
try
{
tc.Connect(host, port);
if (tc.Connected)
{
textBox5.Text +=host+":" + port.ToString().PadRight(6)+" is open";
}
}
catch
{
textBox5.Text += host+":" + port.ToString().PadRight(6) + " is Close";
}
finally
{
tc.Close();
tc = null;
textBox5.Text += "\r\n";
}
}
bool t = true; bool xx = true;
private void button1_Click(object sender, EventArgs e)
{
if (t)
{
one = textBox2.Text.Split('.')[0].Trim();
two = textBox2.Text.Split('.')[1].Trim();
three = textBox2.Text.Split('.')[2].Trim();
four = Convert.ToInt32(textBox2.Text.Split('.')[3].Trim());
four2 = Convert.ToInt32(textBox3.Text.Split('.')[3].Trim());
port = Convert.ToInt32(textBox4.Text);
timer1.Start();
button1.Text = "...";
t = false;
}
else {
timer1.Stop();
button1.Text = "Hunt";
t = true;
four = 1;
textBox1.Text = "存活主机\r\n";
textBox5.Text = "端口状态\r\n";
}
}
private void timer1_Tick(object sender, EventArgs e)
{
x();
}
private void button2_Click(object sender, EventArgs e)
{
this.Dispose();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (xx)
{
timer1.Stop();
xx = false;
}
else
{
timer1.Start();
xx = true;
}
}
private void label3_Click(object sender, EventArgs e)
{
MessageBox.Show("3389:xp远程登录\n135:rpc漏洞","各端口的利用:");
}
}
}
- 刚毕业的时候觉得黑客很酷,于是自己写了个扫描器
- 那时想做黑客
- 后来慢慢的就真的成黑客了
- 结果是招来一大堆人找我盗号的