1、如何获取客户端IP和MAC地址,我获取的是服务器的!!! C#
<FORM id= "formfoo " name= "formbar " action= "index.do " method= "post "> <INPUT value= "00-11-11-B4-52-EF " name= "txtMACAddr "> <INPUT value= "210.42.38.50 " name= "txtIPAddr "> <INPUT value= "zhupan " name= "txtDNSName "> </FORM> 如何传值,只要客户端访问立即传客户端IP和MAC 不要客户端任何操作
2、如何获取客户端IP和MAC地址,我获取的是服务器的,C
M
3、java怎么获取用户客户端mac地址
以下代码实现浏览器中获取mac地址放入一个输入框或隐藏域,随登录信息一起提交到服务器。因为安全级别的关系可能会出现警告,可选择允许执行。长期使用的话建议用户将改站点加入信任站点或把安全级别调低。
<HTML><HEAD><TITLE>WMI Scripting HTML</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
document.forms[0].txtMACAddr.value=unescape(MACAddr);
document.forms[0].txtIPAddr.value=unescape(IPAddr);
document.forms[0].txtDNSName.value=unescape(sDNSName);
//document.formbar.submit();
</SCRIPT>
<SCRIPT language=JScript event=OnObjectReady(objObject,objAsyncContext) for=foo>
if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
{
if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
MACAddr = objObject.MACAddress;
if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined")
IPAddr = objObject.IPAddress(0);
if(objObject.DNSHostName != null && objObject.DNSHostName != "undefined")
sDNSName = objObject.DNSHostName;
}
</SCRIPT>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
<OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>
<SCRIPT language=JScript>
var service = locator.ConnectServer();
var MACAddr ;
var IPAddr ;
var DomainAddr;
var sDNSName;
service.Security_.ImpersonationLevel=3;
service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
</SCRIPT>
<FORM id="formfoo" name="formbar" action="index.do" method="post"><INPUT value="00-11-11-B4-52-EF" name="txtMACAddr"> <INPUT value="210.42.38.50" name="txtIPAddr"> <INPUT value="zhupan" name="txtDNSName"> </FORM></BODY></HTML>
4、java如何获取客户端mac地址?
以下代码实现浏览器中获取mac地址放入一个输入框或隐藏域,随登录信息一起提交到服务器。因为安全级别的关系可能会出现警告,可选择允许执行。长期使用的话建议用户将改站点加入信任站点或把安全级别调低。
<HTML><HEAD><TITLE>WMI Scripting HTML</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
document.forms[0].txtMACAddr.value=unescape(MACAddr);
document.forms[0].txtIPAddr.value=unescape(IPAddr);
document.forms[0].txtDNSName.value=unescape(sDNSName);
//document.formbar.submit();
</SCRIPT>
<SCRIPT language=JScript event=OnObjectReady(objObject,objAsyncContext) for=foo>
if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
{
if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
MACAddr = objObject.MACAddress;
if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined")
IPAddr = objObject.IPAddress(0);
if(objObject.DNSHostName != null && objObject.DNSHostName != "undefined")
sDNSName = objObject.DNSHostName;
}
</SCRIPT>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
<OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>
<SCRIPT language=JScript>
var service = locator.ConnectServer();
var MACAddr ;
var IPAddr ;
var DomainAddr;
var sDNSName;
service.Security_.ImpersonationLevel=3;
service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
</SCRIPT>
<FORM id="formfoo" name="formbar" action="index.do" method="post"><INPUT value="00-11-11-B4-52-EF" name="txtMACAddr"> <INPUT value="210.42.38.50" name="txtIPAddr"> <INPUT value="zhupan" name="txtDNSName"> </FORM></BODY></HTML>
5、java服务器怎么获取客户端请求的mac
获取 Mac 只能在本地网络里才能获取,过了路由器就不能获取了
6、使用网页如何获得客户端的mac地址
<%
strIP = Request.Servervariables("REMOTE_ADDR")
strMac = GetMACAddress(strIP)
%>
asp的获得方法。
7、linux建立TCP服务器后,TCP客户端与服务器连接成功后,怎样获取客户端的MAC地址?
我认为你是从 socket中取不到这部分的信息的.
你得再操作 arp的缓存部分才行. ARP那部分如果在特殊情况,很乱套.比如有攻击或是IP地址设置有冲突啥地.
---
详细的C语言怎么操作ARP缓存我不太清楚. 但你如果想知道.就得查一下这部分怎么做了.
高层的socket操作是得不到的.
只有直连网段的计算机有MAC地址信息.经过路由来的数据包.取不到.
8、如何在服务器获得正在通信的客户端的mac地址
可以通过登录无线路由器进行查看(IP与MAC的映射表),或者通过Wireshark软件抓包看。
9、如何获取客户端MAC地址
<HTML>
<HEAD>
<TITLE>获取客户端mac地址</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
document.forms[0].txtMACAddr.value=unescape(MACAddr);
document.forms[0].txtIPAddr.value=unescape(IPAddr);
document.forms[0].txtDNSName.value=unescape(sDNSName);
//document.formbar.submit();
</SCRIPT>
<SCRIPT language=JScript event=OnObjectReady(objObject,objAsyncContext) for=foo>
if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
{
if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
MACAddr = objObject.MACAddress;
if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined")
IPAddr = objObject.IPAddress(0);
if(objObject.DNSHostName != null && objObject.DNSHostName != "undefined")
sDNSName = objObject.DNSHostName;
}
</SCRIPT>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
</HEAD>
<BODY>
<OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
<OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>
<SCRIPT language=JScript>
var service = locator.ConnectServer();
var MACAddr ;
var IPAddr ;
var DomainAddr;
var sDNSName;
service.Security_.ImpersonationLevel=3;
service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
</SCRIPT>
<FORM id=formfoo name=formbar action=NICPost.asp method=post>
<INPUT value=00:05:5D:0E:C7:FA name=txtMACAddr>
<INPUT value=192.168.0.2 name=txtIPAddr>
<INPUT value=typ name=txtDNSName>
</FORM>
</BODY>
</HTML>
10、服务器端如何获取客户端的mac地址
放在服务器上当然获取不到,必须要在本地。
所以很多网站说为了安全,一般都说要安装什么插件之类,这些插件中,有的就包含了mac的插件。