<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to get the MAC address of a remote computer with its IP address with perl</title>
	<atom:link href="http://dev.pulsed.net/wp/?feed=rss2&#038;p=18" rel="self" type="application/rss+xml" />
	<link>http://dev.pulsed.net/wp/?p=18</link>
	<description>projects, diy</description>
	<lastBuildDate>Sun, 28 Nov 2010 08:56:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dr.FarFar</title>
		<link>http://dev.pulsed.net/wp/?p=18&#038;cpage=1#comment-14202</link>
		<dc:creator>Dr.FarFar</dc:creator>
		<pubDate>Wed, 21 May 2008 12:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=18#comment-14202</guid>
		<description>Thanks Bro ...</description>
		<content:encoded><![CDATA[<p>Thanks Bro &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nils</title>
		<link>http://dev.pulsed.net/wp/?p=18&#038;cpage=1#comment-5618</link>
		<dc:creator>Nils</dc:creator>
		<pubDate>Tue, 08 May 2007 18:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=18#comment-5618</guid>
		<description>use Win32::API;
use strict;
my $SendARP = new Win32::API(&quot;IPHLPAPI&quot;, &quot;SendARP&quot;, &quot;NNPP&quot;, &quot;N&quot;);
  
if(not defined $SendARP) {
  die &quot;Kan de API SendARP niet gebruiken/vinden: $!\n&quot;;
  exit;
}

my $inet_addr = new Win32::API(&quot;wsock32&quot;, &quot;inet_addr&quot;, &quot;P&quot;, &quot;N&quot;);
if(not defined $inet_addr) {
  die &quot;Kan de API inet_addr niet gebruiken/vinden: $!\n&quot;;
  exit;
}

my $mac=pack(&#039;CCCCCC&#039;,0);

print &quot;Gebruik e of exit als IP om te stoppen.\n&quot;;

while(1) {
  print &quot;IP? &quot;;
  my $ip_address = ;
  chomp($ip_address);
  $ip_address =~ tr/A-Z/a-z/;
  print &quot;-----------------\n&quot;;
  if($ip_address eq &#039;e&#039; or $ip_address eq &#039;exit&#039; or $ip_address eq &#039;quit&#039;) { last }
  if($SendARP-&gt;Call($inet_addr-&gt;Call($ip_address),0,$mac,pack(&#039;L&#039;,6))==0) {
    my $mac_address=join &quot;:&quot;, map {uc sprintf(&quot;%02lx&quot;, $_%256 )} unpack(&#039;CCCCCC&#039;,$mac);
    print &quot;IP: $ip_address\n&quot;;
	print &quot;MAC: $mac_address\n&quot;;
	print &quot;-----------------\n\n&quot;;
  } else {
    print &quot;Geen antwoord van $ip_address&quot;;
	print &quot;-----------------\n\n&quot;;
  } 
}

print &quot;Danku om IP2MAC te gebruiken!&quot;;

------
It&#039;s in dutch but, whatever!
I have made the arp.pl script a little better, now it asks for the IP if you run the script. It also has an infinite loop(unless you use the option e, exit or quit) so you can always keep IP2MAC&#039; ing!</description>
		<content:encoded><![CDATA[<p>use Win32::API;<br />
use strict;<br />
my $SendARP = new Win32::API(&#034;IPHLPAPI&#034;, &#034;SendARP&#034;, &#034;NNPP&#034;, &#034;N&#034;);</p>
<p>if(not defined $SendARP) {<br />
  die &#034;Kan de API SendARP niet gebruiken/vinden: $!\n&#034;;<br />
  exit;<br />
}</p>
<p>my $inet_addr = new Win32::API(&#034;wsock32&#034;, &#034;inet_addr&#034;, &#034;P&#034;, &#034;N&#034;);<br />
if(not defined $inet_addr) {<br />
  die &#034;Kan de API inet_addr niet gebruiken/vinden: $!\n&#034;;<br />
  exit;<br />
}</p>
<p>my $mac=pack(&#039;CCCCCC&#039;,0);</p>
<p>print &#034;Gebruik e of exit als IP om te stoppen.\n&#034;;</p>
<p>while(1) {<br />
  print &#034;IP? &#034;;<br />
  my $ip_address = ;<br />
  chomp($ip_address);<br />
  $ip_address =~ tr/A-Z/a-z/;<br />
  print &#034;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\n&#034;;<br />
  if($ip_address eq &#039;e&#039; or $ip_address eq &#039;exit&#039; or $ip_address eq &#039;quit&#039;) { last }<br />
  if($SendARP-&gt;Call($inet_addr-&gt;Call($ip_address),0,$mac,pack(&#039;L&#039;,6))==0) {<br />
    my $mac_address=join &#034;:&#034;, map {uc sprintf(&#034;%02lx&#034;, $_%256 )} unpack(&#039;CCCCCC&#039;,$mac);<br />
    print &#034;IP: $ip_address\n&#034;;<br />
	print &#034;MAC: $mac_address\n&#034;;<br />
	print &#034;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\n\n&#034;;<br />
  } else {<br />
    print &#034;Geen antwoord van $ip_address&#034;;<br />
	print &#034;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\n\n&#034;;<br />
  }<br />
}</p>
<p>print &#034;Danku om IP2MAC te gebruiken!&#034;;</p>
<p>&#8212;&#8212;<br />
It&#039;s in dutch but, whatever!<br />
I have made the arp.pl script a little better, now it asks for the IP if you run the script. It also has an infinite loop(unless you use the option e, exit or quit) so you can always keep IP2MAC&#039; ing!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
