<?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 Using SandBlast API from commandline in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40312#M2655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started writing a bash script to use TEAPI with a simple commandline syntax.&lt;/P&gt;&lt;P&gt;The attached bash script has the following pre-requisites (which can be installed on GAiA also):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Prerequisites to install&lt;/STRONG&gt;&lt;BR /&gt;1) &lt;EM&gt;JQ&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;curl -o /tmp/jq -k -L &lt;A href="https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86"&gt;https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv /tmp/jq /usr/bin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;chmod +x /usr/bin/jq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Changes according to your environment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Within the beginning of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Set &lt;EM&gt;TESERVER&lt;/EM&gt; variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.g. TESERVER=127.0.0.1:18194 if you run the script directly on a TE appliance&lt;/P&gt;&lt;P&gt;2) Set&amp;nbsp;&lt;EM&gt;TEIMAGES&lt;/EM&gt; variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;change the variable content to your available images&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usage of the script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# ./TEAPIcli.sh &lt;EM&gt;&amp;lt;filename&amp;gt; &amp;lt;action&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;EM&gt;&amp;lt;action&amp;gt;&lt;/EM&gt; can be:&lt;/P&gt;&lt;P&gt;1) &lt;EM&gt;query&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;queries the API for a result of &amp;lt;filename&amp;gt;´s hash and returns verdict if found&lt;/P&gt;&lt;P&gt;2) &lt;EM&gt;upload&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;upload the file &amp;lt;filename&amp;gt;&lt;/P&gt;&lt;P&gt;3) &lt;EM&gt;report&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;queries the API for&amp;nbsp;available reports of &amp;lt;filename&amp;gt;´s hash. If reports are available they will be downloaded to separate files calles &amp;lt;filename sha1&amp;gt;_&amp;lt;reportid&amp;gt;.report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The files contain the XML data of the TE forensic report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have fun ! Any comments and additions are highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS-Disclaimer:This script has no official Check Point TAC support&amp;nbsp;&lt;IMG src="https://community.checkpoint.com/legacyfs/online/checkpoint/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 13:37:05 GMT</pubDate>
    <dc:creator>Thomas_Werner</dc:creator>
    <dc:date>2018-08-20T13:37:05Z</dc:date>
    <item>
      <title>Using SandBlast API from commandline</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40312#M2655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started writing a bash script to use TEAPI with a simple commandline syntax.&lt;/P&gt;&lt;P&gt;The attached bash script has the following pre-requisites (which can be installed on GAiA also):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Prerequisites to install&lt;/STRONG&gt;&lt;BR /&gt;1) &lt;EM&gt;JQ&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;curl -o /tmp/jq -k -L &lt;A href="https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86"&gt;https://github.com/stedolan/jq/releases/download/jq-1.4/jq-linux-x86&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv /tmp/jq /usr/bin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;chmod +x /usr/bin/jq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Changes according to your environment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Within the beginning of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Set &lt;EM&gt;TESERVER&lt;/EM&gt; variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.g. TESERVER=127.0.0.1:18194 if you run the script directly on a TE appliance&lt;/P&gt;&lt;P&gt;2) Set&amp;nbsp;&lt;EM&gt;TEIMAGES&lt;/EM&gt; variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;change the variable content to your available images&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usage of the script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# ./TEAPIcli.sh &lt;EM&gt;&amp;lt;filename&amp;gt; &amp;lt;action&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;EM&gt;&amp;lt;action&amp;gt;&lt;/EM&gt; can be:&lt;/P&gt;&lt;P&gt;1) &lt;EM&gt;query&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;queries the API for a result of &amp;lt;filename&amp;gt;´s hash and returns verdict if found&lt;/P&gt;&lt;P&gt;2) &lt;EM&gt;upload&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;upload the file &amp;lt;filename&amp;gt;&lt;/P&gt;&lt;P&gt;3) &lt;EM&gt;report&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;queries the API for&amp;nbsp;available reports of &amp;lt;filename&amp;gt;´s hash. If reports are available they will be downloaded to separate files calles &amp;lt;filename sha1&amp;gt;_&amp;lt;reportid&amp;gt;.report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The files contain the XML data of the TE forensic report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have fun ! Any comments and additions are highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS-Disclaimer:This script has no official Check Point TAC support&amp;nbsp;&lt;IMG src="https://community.checkpoint.com/legacyfs/online/checkpoint/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 13:37:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40312#M2655</guid>
      <dc:creator>Thomas_Werner</dc:creator>
      <dc:date>2018-08-20T13:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using SandBlast API from commandline</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40313#M2656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice! I will test it right now.&lt;/P&gt;&lt;P&gt;Without TAC support &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/migrated-users/55229"&gt;Heiko&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:41:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40313#M2656</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2018-08-20T14:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using SandBlast API from commandline</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40314#M2657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I´ll support&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:09:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Using-SandBlast-API-from-commandline/m-p/40314#M2657</guid>
      <dc:creator>Thomas_Werner</dc:creator>
      <dc:date>2018-08-20T16:09:27Z</dc:date>
    </item>
  </channel>
</rss>

