13 个解决方案
#1
gz
帮你up
帮你up
#2
你相干吗?黑别人吗?
#3
顶
#4
我要做个网管软件,不用去其他机器就能知道他的情况。比如,如果它被黑了,黑客往往做个自己的帐号,如果能远程知道,就可以。。。
#5
难道没人会吗?
#6
net user \\X.X.X.X
用WMI可以实现,自己找1下吧
用WMI可以实现,自己找1下吧
#7
http://www.zpcity.com/arli/ 我站上有个
trueeye 可以帮你
trueeye 可以帮你
#8
string hostname = System.Net.Dns.GetHostByAddress("IP地址").HostName;
我站上的 trueeye 包含一个netscan.exe 强的很,你可以试下
我站上的 trueeye 包含一个netscan.exe 强的很,你可以试下
#9
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
namespace 获取网络主机名
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label2
//
this.label2.Location = new System.Drawing.Point(80, 174);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 23);
this.label2.TabIndex = 9;
this.label2.Text = "网络计算机名称:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(72, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 23);
this.label1.TabIndex = 8;
this.label1.Text = "请输入网络计算机IP地址:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(81, 198);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(120, 20);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(108, 119);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(68, 36);
this.button1.TabIndex = 6;
this.button1.Text = "获取";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 72);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(123, 20);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label2,
this.label1,
this.textBox2,
this.button1,
this.textBox1});
this.Name = "Form1";
this.Text = "获取网络计算机名称";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
IPAddress myIP;
//判断IP地址的合法性
try
{
myIP = IPAddress.Parse(textBox1.Text);
}
catch
{
MessageBox.Show("输入的IP地址不合法!" ,"警告!");
return;
}
//通过给定的IP地址,进行DNS查询,得到远程主机名
try
{
IPHostEntry myHost = Dns.GetHostByAddress(myIP);
textBox2.Text = myHost.HostName;
}
catch
{
MessageBox.Show( "错误信息:IP地址为" + textBox1.Text + "的主机没有响应" ,"警告!");
}
}
}
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
namespace 获取网络主机名
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label2
//
this.label2.Location = new System.Drawing.Point(80, 174);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 23);
this.label2.TabIndex = 9;
this.label2.Text = "网络计算机名称:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(72, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 23);
this.label1.TabIndex = 8;
this.label1.Text = "请输入网络计算机IP地址:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(81, 198);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(120, 20);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(108, 119);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(68, 36);
this.button1.TabIndex = 6;
this.button1.Text = "获取";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 72);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(123, 20);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label2,
this.label1,
this.textBox2,
this.button1,
this.textBox1});
this.Name = "Form1";
this.Text = "获取网络计算机名称";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
IPAddress myIP;
//判断IP地址的合法性
try
{
myIP = IPAddress.Parse(textBox1.Text);
}
catch
{
MessageBox.Show("输入的IP地址不合法!" ,"警告!");
return;
}
//通过给定的IP地址,进行DNS查询,得到远程主机名
try
{
IPHostEntry myHost = Dns.GetHostByAddress(myIP);
textBox2.Text = myHost.HostName;
}
catch
{
MessageBox.Show( "错误信息:IP地址为" + textBox1.Text + "的主机没有响应" ,"警告!");
}
}
}
}
#10
学习
#11
用户名我误解成主机名了,抱歉。。
不过我最近有个项目中有一个功能与你的功能相同,你可以前往参阅:
http://www.zpcity.com/arli/ 有个true eye 该程序有一个netscan 就可以做到
至于它的核心代码可以参见
http://expert.csdn.net/Expert/TopicView1.asp?id=2339233
不过我最近有个项目中有一个功能与你的功能相同,你可以前往参阅:
http://www.zpcity.com/arli/ 有个true eye 该程序有一个netscan 就可以做到
至于它的核心代码可以参见
http://expert.csdn.net/Expert/TopicView1.asp?id=2339233
#12
WMI不行,要先输入用户名密码才能用。
#13
既然是网管软件就一定有客户端安装在被管理的机器上,客户端可以列举本机用户名提供给控制端,他也不用来提这个问题了。
所以他给出的理由无效。他一定是想写病毒,大家别帮他
所以他给出的理由无效。他一定是想写病毒,大家别帮他
#1
gz
帮你up
帮你up
#2
你相干吗?黑别人吗?
#3
顶
#4
我要做个网管软件,不用去其他机器就能知道他的情况。比如,如果它被黑了,黑客往往做个自己的帐号,如果能远程知道,就可以。。。
#5
难道没人会吗?
#6
net user \\X.X.X.X
用WMI可以实现,自己找1下吧
用WMI可以实现,自己找1下吧
#7
http://www.zpcity.com/arli/ 我站上有个
trueeye 可以帮你
trueeye 可以帮你
#8
string hostname = System.Net.Dns.GetHostByAddress("IP地址").HostName;
我站上的 trueeye 包含一个netscan.exe 强的很,你可以试下
我站上的 trueeye 包含一个netscan.exe 强的很,你可以试下
#9
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
namespace 获取网络主机名
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label2
//
this.label2.Location = new System.Drawing.Point(80, 174);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 23);
this.label2.TabIndex = 9;
this.label2.Text = "网络计算机名称:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(72, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 23);
this.label1.TabIndex = 8;
this.label1.Text = "请输入网络计算机IP地址:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(81, 198);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(120, 20);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(108, 119);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(68, 36);
this.button1.TabIndex = 6;
this.button1.Text = "获取";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 72);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(123, 20);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label2,
this.label1,
this.textBox2,
this.button1,
this.textBox1});
this.Name = "Form1";
this.Text = "获取网络计算机名称";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
IPAddress myIP;
//判断IP地址的合法性
try
{
myIP = IPAddress.Parse(textBox1.Text);
}
catch
{
MessageBox.Show("输入的IP地址不合法!" ,"警告!");
return;
}
//通过给定的IP地址,进行DNS查询,得到远程主机名
try
{
IPHostEntry myHost = Dns.GetHostByAddress(myIP);
textBox2.Text = myHost.HostName;
}
catch
{
MessageBox.Show( "错误信息:IP地址为" + textBox1.Text + "的主机没有响应" ,"警告!");
}
}
}
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
namespace 获取网络主机名
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label2
//
this.label2.Location = new System.Drawing.Point(80, 174);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 23);
this.label2.TabIndex = 9;
this.label2.Text = "网络计算机名称:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(72, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 23);
this.label1.TabIndex = 8;
this.label1.Text = "请输入网络计算机IP地址:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(81, 198);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(120, 20);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(108, 119);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(68, 36);
this.button1.TabIndex = 6;
this.button1.Text = "获取";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(80, 72);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(123, 20);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label2,
this.label1,
this.textBox2,
this.button1,
this.textBox1});
this.Name = "Form1";
this.Text = "获取网络计算机名称";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
IPAddress myIP;
//判断IP地址的合法性
try
{
myIP = IPAddress.Parse(textBox1.Text);
}
catch
{
MessageBox.Show("输入的IP地址不合法!" ,"警告!");
return;
}
//通过给定的IP地址,进行DNS查询,得到远程主机名
try
{
IPHostEntry myHost = Dns.GetHostByAddress(myIP);
textBox2.Text = myHost.HostName;
}
catch
{
MessageBox.Show( "错误信息:IP地址为" + textBox1.Text + "的主机没有响应" ,"警告!");
}
}
}
}
#10
学习
#11
用户名我误解成主机名了,抱歉。。
不过我最近有个项目中有一个功能与你的功能相同,你可以前往参阅:
http://www.zpcity.com/arli/ 有个true eye 该程序有一个netscan 就可以做到
至于它的核心代码可以参见
http://expert.csdn.net/Expert/TopicView1.asp?id=2339233
不过我最近有个项目中有一个功能与你的功能相同,你可以前往参阅:
http://www.zpcity.com/arli/ 有个true eye 该程序有一个netscan 就可以做到
至于它的核心代码可以参见
http://expert.csdn.net/Expert/TopicView1.asp?id=2339233
#12
WMI不行,要先输入用户名密码才能用。
#13
既然是网管软件就一定有客户端安装在被管理的机器上,客户端可以列举本机用户名提供给控制端,他也不用来提这个问题了。
所以他给出的理由无效。他一定是想写病毒,大家别帮他
所以他给出的理由无效。他一定是想写病毒,大家别帮他