<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Lan enumeration in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369731#M35425</link>
    <description>As said earlier, not properly tested :P&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;x=0&lt;BR /&gt;IFS="&lt;BR /&gt;"&lt;BR /&gt;for i in $(/sbin/ifconfig -a | egrep "(HWaddr|inet addr|^lo)"); do&lt;BR /&gt;        array[$x]=$i&lt;BR /&gt;        let x=x+1&lt;BR /&gt;done&lt;BR /&gt;IFS=""&lt;BR /&gt;x=0&lt;BR /&gt;while [ $x -lt ${#array[*]} ]; do&lt;BR /&gt;        devname=$(echo ${array[$x]} | awk {'print $1'})&lt;BR /&gt;        macaddr=$(echo ${array[$x]} | awk {'print $5'})&lt;BR /&gt;&lt;BR /&gt;        let y=x+1&lt;BR /&gt;        ipaddr=$(echo ${array[$y]} | awk {'print $2'} | cut -d':' -f2)&lt;BR /&gt;&lt;BR /&gt;        echo $ipaddr | egrep "^[0-9]" &amp;amp;&amp;gt; /dev/null&lt;BR /&gt;        [ $? -eq 0 ] || ipaddr="None"&lt;BR /&gt;        echo $macaddr | egrep "^[0-9]" &amp;amp;&amp;gt; /dev/null&lt;BR /&gt;        [ $? -eq 0 ] || macaddr="None"&lt;BR /&gt;&lt;BR /&gt;        echo "$devname has MAC $macaddr and IP $ipaddr"&lt;BR /&gt;        let x=x+2&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This version works atleast for me :)&lt;BR /&gt;Guess it would break if you have some dodgy interface output :)&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
    <pubDate>Tue, 03 Mar 2009 14:45:25 GMT</pubDate>
    <dc:creator>Fredrik.eriksson</dc:creator>
    <dc:date>2009-03-03T14:45:25Z</dc:date>
    <item>
      <title>Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369728#M35422</link>
      <description>Hi Guys&lt;BR /&gt;&lt;BR /&gt;I need to make a list of all the network devices, their mac addresess and IP addresses.&lt;BR /&gt;&lt;BR /&gt;Could you please tell me what programs are you using to enumerate the network ?&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;PEter</description>
      <pubDate>Mon, 02 Mar 2009 14:40:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369728#M35422</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2009-03-02T14:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369729#M35423</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;ifconfig and ethtool do the job</description>
      <pubDate>Mon, 02 Mar 2009 15:19:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369729#M35423</guid>
      <dc:creator>smatador</dc:creator>
      <dc:date>2009-03-02T15:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369730#M35424</link>
      <description>&lt;!--!*#--&gt;I believe something like this would print out everything you were searching for :)&lt;BR /&gt;&lt;BR /&gt;It's untested since I don't have a machine to try it on.&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;IFS="&lt;BR /&gt;"&lt;BR /&gt;for i in $(ifconfig -a | egrep "^(HWaddr|inet addr)"); do&lt;BR /&gt;   case $i in&lt;BR /&gt;      ^[a-z])&lt;BR /&gt;         devname=$(echo $i | awk {'print $1'})&lt;BR /&gt;         macaddr=$(echo $i | awk {'print $7'})&lt;BR /&gt;      ;; &lt;BR /&gt;      *)&lt;BR /&gt;         ipaddr=$(echo $i | awk {'print $3'})&lt;BR /&gt;      ;;&lt;BR /&gt;   esac&lt;BR /&gt;   echo "$devname has MAC $macaddr and IP $ipaddr"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik eriksson</description>
      <pubDate>Mon, 02 Mar 2009 15:55:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369730#M35424</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-03-02T15:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369731#M35425</link>
      <description>As said earlier, not properly tested :P&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;x=0&lt;BR /&gt;IFS="&lt;BR /&gt;"&lt;BR /&gt;for i in $(/sbin/ifconfig -a | egrep "(HWaddr|inet addr|^lo)"); do&lt;BR /&gt;        array[$x]=$i&lt;BR /&gt;        let x=x+1&lt;BR /&gt;done&lt;BR /&gt;IFS=""&lt;BR /&gt;x=0&lt;BR /&gt;while [ $x -lt ${#array[*]} ]; do&lt;BR /&gt;        devname=$(echo ${array[$x]} | awk {'print $1'})&lt;BR /&gt;        macaddr=$(echo ${array[$x]} | awk {'print $5'})&lt;BR /&gt;&lt;BR /&gt;        let y=x+1&lt;BR /&gt;        ipaddr=$(echo ${array[$y]} | awk {'print $2'} | cut -d':' -f2)&lt;BR /&gt;&lt;BR /&gt;        echo $ipaddr | egrep "^[0-9]" &amp;amp;&amp;gt; /dev/null&lt;BR /&gt;        [ $? -eq 0 ] || ipaddr="None"&lt;BR /&gt;        echo $macaddr | egrep "^[0-9]" &amp;amp;&amp;gt; /dev/null&lt;BR /&gt;        [ $? -eq 0 ] || macaddr="None"&lt;BR /&gt;&lt;BR /&gt;        echo "$devname has MAC $macaddr and IP $ipaddr"&lt;BR /&gt;        let x=x+2&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This version works atleast for me :)&lt;BR /&gt;Guess it would break if you have some dodgy interface output :)&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Tue, 03 Mar 2009 14:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369731#M35425</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-03-03T14:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369732#M35426</link>
      <description>You can use nmap (nmap -sP 10.1.1.*) or a front end like cheops-ng if you prefer GUIs</description>
      <pubDate>Mon, 09 Mar 2009 16:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369732#M35426</guid>
      <dc:creator>Ciro  Iriarte</dc:creator>
      <dc:date>2009-03-09T16:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lan enumeration</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369733#M35427</link>
      <description>ip addr show</description>
      <pubDate>Mon, 09 Mar 2009 18:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lan-enumeration/m-p/4369733#M35427</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2009-03-09T18:51:59Z</dc:date>
    </item>
  </channel>
</rss>

