336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

mac address 에 대해서 질문좀할게요^^
SEQ : 126278 글쓴이 : dark66

작성 포맷 :TEXT 모드, 자동 줄바꿈 사용

제가 스크랩해놓은.. Mac Address 알아내는 소스.. 자알 써먹으세요. ^^;
(참고로 저도 안해봤음.. ㅎㅎ 테스트 하고 손좀 봐야 할터인데..)
내용은 Nbtstat를 이용하여 접속한 IP의 정보를 Text로 저장후 Text를 분석 

strMac = GetMACAddress(Request.ServerVariables("REMOTE_ADDR")) 

function GetMACAddress(strIP) 
Set net = Server.CreateObject("wscript.network") 
Set sh = Server.CreateObject("wscript.shell") 

sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true 

Set sh = nothing 

Set fso = createobject("scripting.filesystemobject") 
Set ts = fso.opentextfile("c:\" & strIP & ".txt") 

macaddress = null 
Do While Not ts.AtEndOfStream 
   data = ucase(trim(ts.readline)) 
   if instr(data,"MAC ADDRESS") Then 
     macaddress = trim(split(data,"=")(1)) 
     Exit Do 
   End if 
loop 
ts.close 
Set ts = nothing 
fso.deletefile "c:\" & strIP & ".txt" 
Set fso = nothing 
GetMACAddress = macaddress 
End function 
mac address 에 대해서 질문좀할게요^^
SEQ : 126278 글쓴이 : dark66

작성 포맷 :TEXT 모드, 자동 줄바꿈 사용

제가 스크랩해놓은.. Mac Address 알아내는 소스.. 자알 써먹으세요. ^^;
(참고로 저도 안해봤음.. ㅎㅎ 테스트 하고 손좀 봐야 할터인데..)
내용은 Nbtstat를 이용하여 접속한 IP의 정보를 Text로 저장후 Text를 분석 

strMac = GetMACAddress(Request.ServerVariables("REMOTE_ADDR")) 

function GetMACAddress(strIP) 
Set net = Server.CreateObject("wscript.network") 
Set sh = Server.CreateObject("wscript.shell") 

sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true 

Set sh = nothing 

Set fso = createobject("scripting.filesystemobject") 
Set ts = fso.opentextfile("c:\" & strIP & ".txt") 

macaddress = null 
Do While Not ts.AtEndOfStream 
   data = ucase(trim(ts.readline)) 
   if instr(data,"MAC ADDRESS") Then 
     macaddress = trim(split(data,"=")(1)) 
     Exit Do 
   End if 
loop 
ts.close 
Set ts = nothing 
fso.deletefile "c:\" & strIP & ".txt" 
Set fso = nothing 
GetMACAddress = macaddress 
End function 

http://www.taeyo.pe.kr/Forum/Content.aspx?SEQ=126278&TBL=ASP

 

제가 스크랩해놓은.. Mac Address 알아내는 소스.. 자알 써먹으세요. ^^;
(참고로 저도 안해봤음.. ㅎㅎ 테스트 하고 손좀 봐야 할터인데..)
내용은 Nbtstat를 이용하여 접속한 IP의 정보를 Text로 저장후 Text를 분석

strMac = GetMACAddress(Request.ServerVariables("REMOTE_ADDR"))

function GetMACAddress(strIP)
Set net = Server.CreateObject("wscript.network")
Set sh = Server.CreateObject("wscript.shell")

sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true

Set sh = nothing

Set fso = createobject("scripting.filesystemobject")
Set ts = fso.opentextfile("c:\" & strIP & ".txt")

macaddress = null
Do While Not ts.AtEndOfStream
   data = ucase(trim(ts.readline))
   if instr(data,"MAC ADDRESS") Then
     macaddress = trim(split(data,"=")(1))
     Exit Do
   End if
loop
ts.close
Set ts = nothing
fso.deletefile "c:\" & strIP & ".txt"
Set fso = nothing
GetMACAddress = macaddress
End function 

Posted by 당양부부34

블로그 이미지
주요 토렌트를 블로깅하고 있습니다. 토렌트 순위 등은 다른 사이트를 찾아보세요. 주요 웹툰 순위도 게재했어요 경제를 좋아하는 일산의 행복한 프로그래머입니다.
당양부부34
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함