<?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>Pario TechnoBlob &#187; nslookup</title>
	<atom:link href="http://pario.no/tag/nslookup/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Mon, 30 Aug 2010 15:49:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>nslookup-scan of IP-range/subnet</title>
		<link>http://pario.no/2007/09/04/nslookup-scan-of-ip-rangesubnet/</link>
		<comments>http://pario.no/2007/09/04/nslookup-scan-of-ip-rangesubnet/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 09:57:45 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[nslookup]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/09/04/nslookup-scan-av-ip-rangesubnett/</guid>
		<description><![CDATA[#!/bin/bash # nslookup-scan of IP-range # It's possible to add more networks separated with space NETS="192.168.0" IPRange="1 254" for NET in $NETS; do for n in $(seq $IPRange); do ADDR=${NET}.${n} echo "${ADDR},`nslookup ${ADDR} &#124; awk -F "=" '{ print $2 }'&#124;sed 's/^[ t]*//' &#124; sed '/^$/d' &#124; &#124;sed 's/.$//'`" done done Result 192.168.0.1,cba.infra.no 192.168.0.2,bca.infra.no 192.168.0.3,abc.infra.no [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/bin/bash
# nslookup-scan of IP-range

# It's possible to add more networks separated with space
NETS="192.168.0"

IPRange="1 254"
for NET in $NETS; do
  for n in $(seq $IPRange); do
        ADDR=${NET}.${n}
        echo "${ADDR},`nslookup ${ADDR} | awk -F "=" '{ print $2 }'|sed 's/^[ t]*//' | sed '/^$/d' | |sed 's/.$//'`"
  done
done</pre>
<p><strong>Result</strong></p>
<pre>
192.168.0.1,cba.infra.no
192.168.0.2,bca.infra.no
192.168.0.3,abc.infra.no
192.168.0.4,
192.168.0.5,
192.168.0.6,
192.168.0.7,
192.168.0.8,</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDkvMDQvbnNsb29rdXAtc2Nhbi1vZi1pcC1yYW5nZXN1Ym5ldC88d3B0Yj5uc2xvb2t1cC1zY2FuIG9mIElQLXJhbmdlL3N1Ym5ldDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/09/04/nslookup-scan-of-ip-rangesubnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
