<?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 Ping scan to host objects creation in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Ping-scan-to-host-objects-creation/m-p/38735#M2316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;expert. After the creation of&amp;nbsp;my script for host discovery, I get asked if it's possible to extend the script to scan&amp;nbsp;&amp;nbsp;remote subnet. HostDiscvovey use arp command and create csv file out of it. It can only find directly connected IP/MAC.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class="" data-object-id="2167" data-object-type="102"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For remote network, I've created this other&amp;nbsp;script: PingScan to host objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You provide the &amp;nbsp;subnet as an argument, &amp;nbsp;I'll do a ping scan, resove IP to hostname, added a group and create a csv file from replying hosts.The CSV file is then imported into the management database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can run it either from expert mode in cli or directly from the SmartConsole with the run script option in GATEWAYS &amp;amp; SERVERS view:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57885_1.png" style="width: 620px; height: 133px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: PingScanToHostsObjects.sh 192.168.2 BellSide&lt;/P&gt;&lt;P&gt;This will ping scan 192.168.2.1 to 254, create the group BellSide and will add newly discovered hosts into that group. If the group doesn’t exist, it will create it.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57886_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57887_3.png" style="width: 620px; height: 789px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-4 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57888_4.png" style="width: 620px; height: 328px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy scripting! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 19:13:05 GMT</pubDate>
    <dc:creator>Nicolas_Boisse</dc:creator>
    <dc:date>2017-08-09T19:13:05Z</dc:date>
    <item>
      <title>Ping scan to host objects creation</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Ping-scan-to-host-objects-creation/m-p/38735#M2316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;expert. After the creation of&amp;nbsp;my script for host discovery, I get asked if it's possible to extend the script to scan&amp;nbsp;&amp;nbsp;remote subnet. HostDiscvovey use arp command and create csv file out of it. It can only find directly connected IP/MAC.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class="" data-object-id="2167" data-object-type="102"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For remote network, I've created this other&amp;nbsp;script: PingScan to host objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You provide the &amp;nbsp;subnet as an argument, &amp;nbsp;I'll do a ping scan, resove IP to hostname, added a group and create a csv file from replying hosts.The CSV file is then imported into the management database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can run it either from expert mode in cli or directly from the SmartConsole with the run script option in GATEWAYS &amp;amp; SERVERS view:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57885_1.png" style="width: 620px; height: 133px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: PingScanToHostsObjects.sh 192.168.2 BellSide&lt;/P&gt;&lt;P&gt;This will ping scan 192.168.2.1 to 254, create the group BellSide and will add newly discovered hosts into that group. If the group doesn’t exist, it will create it.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57886_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57887_3.png" style="width: 620px; height: 789px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-4 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57888_4.png" style="width: 620px; height: 328px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy scripting! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 19:13:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Ping-scan-to-host-objects-creation/m-p/38735#M2316</guid>
      <dc:creator>Nicolas_Boisse</dc:creator>
      <dc:date>2017-08-09T19:13:05Z</dc:date>
    </item>
  </channel>
</rss>

