<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Muzaffer AKYIL (Victorious) &#187; Module</title>
	<atom:link href="http://muzaffer.akyil.net/category/makale/yazilim/visual-basic/module/feed" rel="self" type="application/rss+xml" />
	<link>http://muzaffer.akyil.net</link>
	<description></description>
	<lastBuildDate>Fri, 16 Apr 2010 12:35:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Mac Adresi Bulma</title>
		<link>http://muzaffer.akyil.net/2007/03/28/makale/yazilim/visual-basic/module/admin/mac-adresi-bulma.aspx</link>
		<comments>http://muzaffer.akyil.net/2007/03/28/makale/yazilim/visual-basic/module/admin/mac-adresi-bulma.aspx#comments</comments>
		<pubDate>Wed, 28 Mar 2007 12:18:20 +0000</pubDate>
		<dc:creator>muzaffer</dc:creator>
				<category><![CDATA[Module]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[adres]]></category>
		<category><![CDATA[bulma]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[visualbasic]]></category>

		<guid isPermaLink="false">http://www.muzafferakyil.com/2007/03/28/module/admin/mac-adresi-bulma.aspx</guid>
		<description><![CDATA[Şimdi vericeğim kodlarla uzak bir sistemin ethernet donanımının fiziksel adresini (Mac Address) bulacağız. Öncelikle Fiziksel Adresler donanıma özgü degerlerdir. Eş denk gelme oranı oldukça düşüktür. Dolayısıyla programcılar tarafından yazılımlarının lisanslandırılmasında kullanılırlar. Ama artık günümüzde mac adresleri değiştirilebilir adresler oldugundan yinede tam güvenlik sağlamazlar. Caydırma amaçlı olarak kullanılabilirler. Aşağıdaki kodları bir Module içine yazın. Option Explicit [...]]]></description>
			<content:encoded><![CDATA[<p>Şimdi vericeğim kodlarla uzak bir sistemin ethernet donanımının fiziksel adresini (Mac Address) bulacağız.<br />
<span id="more-61"></span><br />
Öncelikle Fiziksel Adresler donanıma özgü degerlerdir. Eş denk gelme oranı oldukça düşüktür. Dolayısıyla programcılar tarafından yazılımlarının lisanslandırılmasında kullanılırlar. Ama artık günümüzde mac adresleri değiştirilebilir adresler oldugundan yinede tam güvenlik sağlamazlar. Caydırma amaçlı olarak kullanılabilirler.</p>
<p>Aşağıdaki kodları bir Module içine yazın.</p>
<pre class="brush: vb; ">

Option Explicit
Public Const NO_ERROR = 0
Public Declare Function inet_addr _
Lib &quot;wsock32.dll&quot; (ByVal s As String) As Long
Public Declare Function SendARP _
Lib &quot;iphlpapi.dll&quot; (ByVal DestIP As Long, _
ByVal SrcIP As Long, _
pMacAddr As Long, _
PhyAddrLen As Long) As Long
Public Declare Sub CopyMemory _
Lib &quot;kernel32&quot; _
Alias &quot;RtlMoveMemory&quot; (dst As Any, _
src As Any, _
ByVal bcount As Long)
Public Function GetRemoteMACAddress(ByVal sRemoteIP As String, _
sRemoteMacAddress As String) As Boolean
Dim dwRemoteIP As Long
Dim pMacAddr As Long
Dim bpMacAddr() As Byte
Dim PhyAddrLen As Long
Dim cnt As Long
Dim tmp As String
dwRemoteIP = inet_addr(sRemoteIP)
If dwRemoteIP &lt;&gt; 0 Then
PhyAddrLen = 6
If SendARP(dwRemoteIP, 0&amp;, pMacAddr, PhyAddrLen) = NO_ERROR Then
If pMacAddr &lt;&gt; 0 And PhyAddrLen &lt;&gt; 0 Then
ReDim bpMacAddr(0 To PhyAddrLen - 1)
CopyMemory bpMacAddr(0), pMacAddr, ByVal PhyAddrLen
For cnt = 0 To PhyAddrLen - 1
If bpMacAddr(cnt) = 0 Then
tmp = tmp &amp; &quot;00-&quot;
Else
tmp = tmp &amp; Hex$(bpMacAddr(cnt)) &amp; &quot;-&quot;
End If
Next
If Len(tmp) &gt; 0 Then
sRemoteMacAddress = left$(tmp, Len(tmp) - 1)
GetRemoteMACAddress = True
End If
Exit Function
Else
GetRemoteMACAddress = False
End If
Else
GetRemoteMACAddress = False
End If
Else
GetRemoteMACAddress = False
End If
End Function
</pre>
<p>Şimdi bu modülümüzü kullanalım.</p>
<pre class="brush: vb; ">

Dim MacAdres As String
Dim sRemoteMacAddress As String
If GetRemoteMACAddress(&quot;192.168.1.1&quot;, sRemoteMacAddress) Then
MacAdres = sRemoteMacAddress
Else
MacAdres = &quot;0&quot;
End If
If MacAdres &lt;&gt; &quot;0&quot; Then
MsgBox MacAdres
Else
MsgBox &quot;Adrese Ulaşılamadı&quot;
End If
</pre>
<p>Modülümüzü yukarıdaki gibi kullanabiliriz. <font color="red">192.168.1.1</font> ipsini fiziksel adresini öğrenmek istediğiniz donanımın ipisi ile değiştirerek fiziksel adresi öğrenebilirsiniz.</p>
<p>Kolay Gelsin.</p>
<img class="colorbox-61"  src="http://muzaffer.akyil.net/?ak_action=api_record_view&id=61&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://muzaffer.akyil.net/2007/03/28/makale/yazilim/visual-basic/module/admin/mac-adresi-bulma.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
