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的插件。