<?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: Python modules in checkpoint in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14687#M1040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok&amp;nbsp;but I am trying to install the modules locally but i cant, because when I try to install requests module the system asks me for the setuptools modules and when I try to install the setuptools&amp;nbsp; it asks me for distutils.core and when I try to install distutils it asks me for distutils so I cant continue. I´m trying to convert the python file in executable, but the .spec file that I have generated cannot be run by the mgmt server so I am a little bit blocked(I have generated it in a Fedora in order to get a similar enviroment).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The use case is the following, we are trying to disable a group of policies which have a determinate comment, If we would have a problem, we disable the rules that could generate them(critical service) and we solve the problem quickly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried to install pip with the get_pip.py script but it doesnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2018 08:17:14 GMT</pubDate>
    <dc:creator>DPB_Point</dc:creator>
    <dc:date>2018-11-09T08:17:14Z</dc:date>
    <item>
      <title>Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14685#M1038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI!&lt;/P&gt;&lt;P&gt;I am trying to install the requests python module in a R80.10 Management server, and as I have seen, it hasnt the pip utility. Does anyone know how to install the module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 09:29:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14685#M1038</guid>
      <dc:creator>DPB_Point</dc:creator>
      <dc:date>2018-11-08T09:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14686#M1039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no pip and never will be I guess. You can try to import module locally, meaning upload .py files to management station and import in script. What's the use case to run python script from mgmt station?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 10:47:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14686#M1039</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2018-11-08T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14687#M1040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok&amp;nbsp;but I am trying to install the modules locally but i cant, because when I try to install requests module the system asks me for the setuptools modules and when I try to install the setuptools&amp;nbsp; it asks me for distutils.core and when I try to install distutils it asks me for distutils so I cant continue. I´m trying to convert the python file in executable, but the .spec file that I have generated cannot be run by the mgmt server so I am a little bit blocked(I have generated it in a Fedora in order to get a similar enviroment).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The use case is the following, we are trying to disable a group of policies which have a determinate comment, If we would have a problem, we disable the rules that could generate them(critical service) and we solve the problem quickly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried to install pip with the get_pip.py script but it doesnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 08:17:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14687#M1040</guid>
      <dc:creator>DPB_Point</dc:creator>
      <dc:date>2018-11-09T08:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14688#M1041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The python that is available on Check Point appliances is not meant to be used for general purpose.&lt;/P&gt;&lt;P&gt;As a result, we only put the specific modules and features we explicitly use and disable&amp;nbsp;everything else.&lt;/P&gt;&lt;P&gt;In fact, any script has to be&amp;nbsp;explicitly whitelisted before running.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 23:41:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14688#M1041</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-11-09T23:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14689#M1042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't the case anymore in R80. You can run any python files without whitelist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Nov 2018 02:40:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14689#M1042</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2018-11-10T02:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14690#M1043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, but it's still a pretty stripped down Python &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Nov 2018 05:42:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14690#M1043</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-11-10T05:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14691#M1044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So do you think that I couldnt work with libraries such as requests? the thing is that I need to include the python script in the management server either way. So that would generate a problem to me, do you know if there is a way to become the script in a executable? I have tried pyinstaller utility in a Fedora that is a similar to the Checkpoint enviroment but I cannot execute the executable which is generated as I have told before. Any solution would be welcomed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2018 08:14:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14691#M1044</guid>
      <dc:creator>DPB_Point</dc:creator>
      <dc:date>2018-11-12T08:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14692#M1045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is it you are actually trying to do?&lt;/P&gt;&lt;P&gt;Clearly run some sort of python script, but to do what exactly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2018 13:41:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14692#M1045</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-11-12T13:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14693#M1046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You aren't going to be able to install non-standard library with a package manager. I've never tried it but it should work, you will need to copy in requests + all it's dependencies to the management server and it might work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't had much luck with pyinstaller with Check Point myself, I did try it once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2018 14:06:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14693#M1046</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2018-11-12T14:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14694#M1047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I have done remotely is cretae a python script which through web services, disables a group of rules by the comment they have. Doing that we can disable&amp;nbsp;each rule which&amp;nbsp;has a critical service by the execution of the script. But, I need to have the ability of executing the script in the management server because of the proyect details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/migrated-users/41895"&gt;Joshua Hatter&lt;/A&gt;, I have added all the dependencies but when i am trying to execute their setup.py they ask me for more dependencies as I have commented before. I reached at one point in which I&amp;nbsp;couldnt install the distutils module which is needed for the rest of the modules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 08:21:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14694#M1047</guid>
      <dc:creator>DPB_Point</dc:creator>
      <dc:date>2018-11-13T08:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14695#M1048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, you should do your best to not have to run this from the management server. The API can accept remote calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, as I mentioned you cannot install packages from the Management server itself, which is what the setup.py does. It reads from a dict the 'install_requires' fields and tries to install through distUtils the dependencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just tested to verify for you, that this indeed does work. Once you move requests and all it's dependencies to the machine you can execute against them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/74166_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 13:36:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/14695#M1048</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2018-11-13T13:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python modules in checkpoint</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/77618#M4552</link>
      <description>&lt;P&gt;This python is 32bit.&lt;/P&gt;&lt;P&gt;Is it possible and how to install python2 x86_64?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 13:43:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-modules-in-checkpoint/m-p/77618#M4552</guid>
      <dc:creator>lennyb</dc:creator>
      <dc:date>2020-03-08T13:43:31Z</dc:date>
    </item>
  </channel>
</rss>

