<?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: Am I doing something wrong? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10423#M809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my TPAPI.ini:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;tex_api_enabled = TRUE&lt;BR /&gt;scrub_service_portal_enabled = FALSE&lt;BR /&gt;logs_api_enabled = TRUE&lt;BR /&gt;api_key =&amp;nbsp;&amp;lt;an API Key&amp;gt;&lt;BR /&gt;allowed_networks[]=0.0.0.0/0&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I enable the scrub service portal I can connect and use it, but this is for extraction only. I need emulation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2018 08:09:32 GMT</pubDate>
    <dc:creator>cstueckrath</dc:creator>
    <dc:date>2018-10-29T08:09:32Z</dc:date>
    <item>
      <title>unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10421#M807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using a small Threat Emulation Appliance configured as an MTA to emulate and extract incoming e-mail attachments. It is currently running R80.20 with engine version&amp;nbsp;57.990002817.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to have the ability to upload files to this appliance using e.g. powershell, so I tried to use&amp;nbsp;the &lt;A href="https://sc1.checkpoint.com/documents/TPAPI/CP_1.0_R80xx_ThreatPreventionAPI_APIRefGuide/html_frameset.htm"&gt;Threat Prevention API 1.0 Reference Guide&lt;/A&gt;&amp;nbsp;to craft some JSON and upload a test file to be emulated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At &lt;A href="https://sc1.checkpoint.com/documents/TPAPI/CP_1.0_R80xx_ThreatPreventionAPI_APIRefGuide/189781.htm"&gt;Accessing the API&lt;/A&gt;&amp;nbsp;I learned, that I had to use port 18194, but my TE appliance doesn't even listen on this port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the &lt;STRONG&gt;&lt;EM&gt;Enable API&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;box under Threat Extraction enabled the &lt;EM&gt;&lt;STRONG&gt;enable_scrub_web_service &lt;/STRONG&gt;&lt;/EM&gt;field&amp;nbsp;following &lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk113599"&gt;sk113599&lt;/A&gt;, but I'm not sure if this is even related to my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this machine to listen to my requests? Is there some magic involved besides acceptibg traffic on this port?&lt;/P&gt;&lt;P&gt;Is&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;/opt/CPUserCheckPortal/phpincs/conf/TPAPI.ini&lt;/STRONG&gt;&lt;/EM&gt; related to&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;&lt;A class="jive-link-external-small" rel="nofollow"&gt;https://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;service_address&amp;gt;/tecloud/api/1/file/&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;in any way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 12:37:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10421#M807</guid>
      <dc:creator>cstueckrath</dc:creator>
      <dc:date>2018-10-26T12:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10422#M808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://supportcontent.checkpoint.com/solutions?id=sk113599" title="http://supportcontent.checkpoint.com/solutions?id=sk113599"&gt;SandBlast Agent for Browsers - working with Security Gateway or SandBlast Threat Emulation appliance&lt;/A&gt;&amp;nbsp;specifies&amp;nbsp;a couple things:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Setting enable_scrub_web_service to true via guidbedit (all instances of it)&lt;/LI&gt;&lt;LI&gt;Additional commands and modifications to&amp;nbsp;TPAPI.ini depending on the version of software loaded on the Threat Emulation appliance.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Sounds like you did #1 but not #2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 22:00:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10422#M808</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-10-26T22:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10423#M809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my TPAPI.ini:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;tex_api_enabled = TRUE&lt;BR /&gt;scrub_service_portal_enabled = FALSE&lt;BR /&gt;logs_api_enabled = TRUE&lt;BR /&gt;api_key =&amp;nbsp;&amp;lt;an API Key&amp;gt;&lt;BR /&gt;allowed_networks[]=0.0.0.0/0&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I enable the scrub service portal I can connect and use it, but this is for extraction only. I need emulation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2018 08:09:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10423#M809</guid>
      <dc:creator>cstueckrath</dc:creator>
      <dc:date>2018-10-29T08:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10424#M810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So how are you calling the API?&lt;BR /&gt;What endpoint and what data are you passing?&lt;/P&gt;&lt;P&gt;Sounds like you're calling it with scrub_options (for Threat Extraction) instead of te_options (Threat Emulation).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2019 23:20:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10424#M810</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-02-08T23:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10425#M811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, we used te_options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a (incomplete) PS I used to pass a file to TE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;DIV style="color: #333333; background-color: #fffffe; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Usage: Emulate-TransferFile.ps1 -TEFile Path-To-File -Action action&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# action can be: upload, query, report&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# return exit codes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;1 == invalid arguments&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;2 == invalid action&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;3 == file invalid or does not exist&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;4 == AV only verdict without TE report&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;5 == Unknown verdict - report download failed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;CmdletBinding&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #00008b;"&gt;Param&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Parameter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;Mandatory&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;HelpMessage&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;Path to file to be emulated in TE.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;String&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Parameter&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;Mandatory&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;HelpMessage&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;upload, query or report&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;String&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;Action&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#def&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# TE emulator API&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEServer&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'FQDN of TE&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;:18194&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEApiKey&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;&amp;lt;our API Key&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# TE images to be used for emulation&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# add multiple images by adding GUIDs seperated by comma to TEIMAGES variable below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Look for currently available images using [Expert@cp-te-1:0]# tecli s d i&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win10 64-bit, Office2016: 10b4a9c6-e414-425c-ae8b-fe4dd7b25244&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win7, Office 2013: 5e5de275-a103-4f67-b55b-47532918fa59 (available)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# WinXP, Office 2003/7: e50e99f3-5963-4573-af9e-e3f4750b55e2 (available)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win7, Office 2003/7: 7e6fe36e-889e-4c25-8704-56378f0830df&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win7, Office 2010: 8d188031-1010-4466-828b-0cd13d4303ff&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win7 64-bit, Office 2013: 3ff3ddae-e7fd-4969-818c-d5f1a2be336d&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# Win8.1 64-bit, Office 2013: 6c453c9b-20f7-471a-956c-3198a868dc92&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEImages&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;e50e99f3-5963-4573-af9e-e3f4750b55e2,5e5de275-a103-4f67-b55b-47532918fa59&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEImageRev&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-not&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Test-Path&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;throw&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;System.IO.FileNotFoundException&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt; not found.&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# do magic byte check on filename&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# ToDo: we need Get-FileSignature.ps1 from Skript Repository as psm1 on the Management Server&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFileType&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-FileSignature&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Path &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#We do not support Executables&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;($&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFileType.HexSignature&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-eq&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;4D5A&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;throw&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;System.IO.FileFormatException&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt; is an executable&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# we should have excluded all unsupported files and filesizes by now!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;# calculate SHA1 from file&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TESHA1&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-FileHash&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Path &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEFile&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Algorithm SHA1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #006400;"&gt;#Case Query (forums don't support formatting, the real ps1 is correctly formatted here):&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;QueryBody&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;request&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;sha1&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TESHA1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;file_type&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;zip&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;features&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;te&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;av&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;te&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;reports&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;pdf&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff;"&gt;Invoke-RestMethod&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Method Post &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Uri &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;https://&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEServer&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;/tecloud/api/v1/file/query&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Header &lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;Authorization&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;TEApiKey&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;Body &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;ConvertTo-Json&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;QueryBody&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;SkipCertificateCheck&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 07:55:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10425#M811</guid>
      <dc:creator>cstueckrath</dc:creator>
      <dc:date>2019-02-11T07:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10426#M812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly do you get back from the API when you&amp;nbsp;run this script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 21:48:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10426#M812</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-02-11T21:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10427#M813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Invoke-RestMethod : Authentication failed because the remote party has closed the transport stream.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;btw: You'll need PS 6 to run this, because we need&amp;nbsp;&lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt;SkipCertificateCheck in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Invoke-RestMethod&lt;/SPAN&gt;&lt;SPAN style="color: #333333; "&gt;&amp;nbsp;(see my other post here:&amp;nbsp;&lt;A href="https://community.checkpoint.com/thread/5596"&gt;How do I change the https certificate for Sandblast API?&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; "&gt;For&amp;nbsp;&lt;/SPAN&gt;Get-FileSignature you'll need&amp;nbsp;&lt;A class="link-titled" href="https://gallery.technet.microsoft.com/scriptcenter/Get-FileSignature-f5ae19f5" title="https://gallery.technet.microsoft.com/scriptcenter/Get-FileSignature-f5ae19f5"&gt;Script Get-FileSignature&lt;/A&gt;, but you could just comment this out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2019 07:42:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10427#M813</guid>
      <dc:creator>cstueckrath</dc:creator>
      <dc:date>2019-02-12T07:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10428#M814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What will be most helpful is to see:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What your script sent the API (what the&amp;nbsp;raw JSON/HTTP Request looks like)&lt;/LI&gt;&lt;LI&gt;What the API actually responded with&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There may be a log file on the Threat Emulation appliance we can look at--checking on this.&lt;/P&gt;&lt;P&gt;But if you can make your script log the raw API calls/responses somehow, that will help tremendously as well.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2019 17:53:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10428#M814</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-02-12T17:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: unsolved :( - Am I doing something wrong?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10429#M815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;never mind, I just figured out that I posted the wrong version of the script.&lt;/P&gt;&lt;P&gt;And I found&amp;nbsp;sk137032, which I was not aware of when I initially started to work on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to follow the examples there and will report later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 08:48:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/unsolved-Am-I-doing-something-wrong/m-p/10429#M815</guid>
      <dc:creator>cstueckrath</dc:creator>
      <dc:date>2019-02-13T08:48:36Z</dc:date>
    </item>
  </channel>
</rss>

