<?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: White Paper - How to Batch Categorize URLs in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92073#M18337</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I seem the script is still not including the categories in the output. I suspect that the result from the curl inside the script has a little different output for you and for me. Is there a way to confirm if the curl output is at it should?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jul 2020 13:57:15 GMT</pubDate>
    <dc:creator>Johnny_L</dc:creator>
    <dc:date>2020-07-21T13:57:15Z</dc:date>
    <item>
      <title>White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/53411#M10640</link>
      <description>&lt;H1&gt;How to Batch Categorize URLs&lt;/H1&gt;
&lt;H3&gt;Author&lt;/H3&gt;
&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/165"&gt;@Sebastien_Rho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can look up the category of a website using Check Point’s URL categorization website (&lt;A href="https://www.checkpoint.com/urlcat/main.htm" target="_blank" rel="noopener"&gt;https://www.checkpoint.com/urlcat/main.htm&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;Since the site allows you to query 1 site at a time, it could be a long process if you have a list of sites you want to query.&amp;nbsp; All commands must be made from the same folder.&lt;/P&gt;
&lt;H3&gt;1. Create a cookie for your session on the website&lt;/H3&gt;
&lt;P&gt;This is how you log into the site with curl and store your session cookie to a file… (replace &lt;A href="mailto:email@domain.com" target="_blank" rel="noopener"&gt;email@domain.com&lt;/A&gt; and “password” with your UserCenter credentials):&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;curl_cli -k -v --cookie-jar ./cookie -X POST -d "&lt;A href="mailto:customer=&amp;amp;g-recaptcha-response=&amp;amp;needCaptcha=false&amp;amp;userName=email@domain.com&amp;amp;password=password&amp;amp;userOriginalURL=" target="_blank" rel="noopener"&gt;customer=&amp;amp;g-recaptcha-response=&amp;amp;needCaptcha=false&amp;amp;userName=email@domain.com&amp;amp;password=password&amp;amp;userOriginalURL=&lt;/A&gt;" &lt;A href="https://www.checkpoint.com/urlcat/login.htm" target="_blank" rel="noopener"&gt;https://www.checkpoint.com/urlcat/login.htm&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;N.B.: If you have special characters in your password which might be misinterpreted by bash you may have to “escape” them with “\”&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E.g. &lt;FONT face="courier new,courier"&gt;Pas$word&lt;/FONT&gt; should be entered as &lt;FONT face="courier new,courier"&gt;Pas\$word&lt;/FONT&gt;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;2. Create the list of the websites you want to query&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;[&lt;FONT face="courier new,courier"&gt;Expert@yourSMS]# vi sites.txt&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="http://www.yahoo.com" target="_blank" rel="noopener"&gt;www.yahoo.com&lt;/A&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="http://www.cnn.com" target="_blank" rel="noopener"&gt;www.cnn.com&lt;/A&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="http://www.gmail.com" target="_blank" rel="noopener"&gt;www.gmail.com&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H4&gt;Then make a bash script with this content (categorize.sh):&lt;/H4&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@yourSMS]# vi categorize.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#!/bin/bash&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;while read p; do&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; result=$(curl_cli -k -v --cookie ./cookie -X POST -d "action=post&amp;amp;actionType=submitURL&amp;amp;urlCategorization=$p" &lt;A href="https://www.checkpoint.com/urlcat/main.htm" target="_blank" rel="noopener"&gt;https://www.checkpoint.com/urlcat/main.htm&lt;/A&gt; 2&amp;gt;/dev/null | grep -A4 "&lt;STRONG&gt;Categories:" | tr -d '\n' | grep -oP '(?&amp;lt;=&lt;/STRONG&gt;).*?(?=&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;)' | sed 's/^[ \t]*//')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; echo $p,$result&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; sleep 1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;done &amp;lt;sites.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;done &amp;lt;sites.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;When running the script, it will return all the categories that the site is associated with:&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@yourSMS]# ./categorize.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;01com.com,Computers / Internet&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;020jbxsgqwpse.changeip.org,Computers / Internet&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;022btrarqcfuk.changeip.org,Computers / Internet&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;026kordzsydup.changeip.org,Computers / Internet&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;1001-love.com,Sex&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;You can also output the script to a file to be able to save and send.&lt;/H4&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@yourSMS]# ./categorize.sh &amp;gt;sites.csv&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the full list of White Papers, &lt;A href="https://community.checkpoint.com/t5/General-Topics/White-Papers-Publishing-Project/m-p/53242#M10603" target="_blank"&gt;go here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 12:58:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/53411#M10640</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2019-07-08T12:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91773#M18306</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im getting some issues when trying to run this script. I can get the cookie, and the script lists the urls i put in the txt file, but there is no categorization of the sites, and i get a syntax error on line 14, which is done&amp;lt;file.txt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on this one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Kai Magnussen&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 08:00:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91773#M18306</guid>
      <dc:creator>Kai_Magnussen</dc:creator>
      <dc:date>2020-07-17T08:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91777#M18308</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think it's an extra done &amp;lt; sites.txt .&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 09:17:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91777#M18308</guid>
      <dc:creator>funkylicious</dc:creator>
      <dc:date>2020-07-17T09:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91778#M18309</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, that was the syntax issue. Now, the only remaining issue, is that its actually not categorizing the url's in the file, it just lists them.&lt;/P&gt;&lt;P&gt;Is there anything else that needs&amp;nbsp; to be done, regarding this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Kai Magnussen&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 09:24:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91778#M18309</guid>
      <dc:creator>Kai_Magnussen</dc:creator>
      <dc:date>2020-07-17T09:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91804#M18315</link>
      <description>&lt;P&gt;There are several issues with this post that might not have existed last year. I used a linux host rather than my management server. However, changing &lt;STRONG&gt;&lt;EM&gt;curl&lt;/EM&gt; &lt;/STRONG&gt;to &lt;STRONG&gt;&lt;EM&gt;curl_cli &lt;/EM&gt;&lt;/STRONG&gt;will allow it to properly run from a management host or gateway.&lt;/P&gt;
&lt;P&gt;1.) The login process needs to be updated since the login URL is different.&lt;/P&gt;
&lt;PRE&gt; curl -k -v --cookie-jar ./cookie -d "usersOriginalURL=&amp;amp;customer=&amp;amp;needCaptcha=false&amp;amp;userName=&lt;STRONG&gt;user%40domain.com&lt;/STRONG&gt;&amp;amp;password=&lt;STRONG&gt;ENTERPASSWORDHERE&lt;/STRONG&gt;" https://urlcat.checkpoint.com/urlcat/login.htm&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;2.) I had to adjust the script as well. The grep command in the initial script did not work properly for me so I had to play around with the sed/grep/tr options to present it how I wanted. I also had to adjust the options for &lt;EM&gt;curl&lt;/EM&gt; as the script kept overwriting my cookie file rather than using it. &lt;/P&gt;
&lt;PRE&gt;#!/bin/bash&lt;BR /&gt;while read p;&lt;BR /&gt;do&lt;BR /&gt;result=$(curl -k -q&lt;STRONG&gt; -b&lt;/STRONG&gt; ./cookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=$p&amp;amp;ticketIDToLookFor=" https://urlcat.checkpoint.com/urlcat/main.htm 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:" | tr -d '\n' | tr '\t' ' ' | tr -s ' ' | grep -oP '&amp;lt;\/b&amp;gt;.*&amp;lt;\/p&amp;gt; &amp;lt;d' | sed -e 's/^&amp;lt;\/b&amp;gt; //' -e 's/ &amp;lt;.*$//')&lt;BR /&gt;echo $p, $result&lt;BR /&gt;sleep 1&lt;BR /&gt;done &amp;lt; sites.txt&lt;/PRE&gt;
&lt;P&gt;When run, it outputs as expected:&lt;/P&gt;
&lt;PRE&gt;linux$ ./categories.sh&lt;BR /&gt;www.google.com, Search Engines / Portals&lt;BR /&gt;www.yahoo.com, Search Engines / Portals&lt;BR /&gt;www.checkpoint.com, Computers / Internet&lt;BR /&gt;www.amazon.com, Shopping&lt;BR /&gt;&lt;BR /&gt;linux$ &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 16:53:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/91804#M18315</guid>
      <dc:creator>masher</dc:creator>
      <dc:date>2020-07-17T16:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92021#M18333</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tested this script with Security Gateway but I didn't get the expected output. I changed only &lt;STRONG&gt;curl&lt;/STRONG&gt; to &lt;STRONG&gt;curl_cli&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Getting below output when run the script. How can we get associated site category in this case?&lt;/P&gt;&lt;P&gt;[Expert@Test_Gateway:0]# ./categorize.sh&lt;BR /&gt;&lt;A href="http://www.yahoo.com" target="_blank"&gt;www.yahoo.com&lt;/A&gt;,&lt;BR /&gt;&lt;A href="http://www.google.com" target="_blank"&gt;www.google.com&lt;/A&gt;,&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 07:53:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92021#M18333</guid>
      <dc:creator>Nandhakumar</dc:creator>
      <dc:date>2020-07-21T07:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92073#M18337</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I seem the script is still not including the categories in the output. I suspect that the result from the curl inside the script has a little different output for you and for me. Is there a way to confirm if the curl output is at it should?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 13:57:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92073#M18337</guid>
      <dc:creator>Johnny_L</dc:creator>
      <dc:date>2020-07-21T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92094#M18338</link>
      <description>&lt;P&gt;I was run this on my R80.40 management successfully.&amp;nbsp; Once you have run the login command, you could run the curl command itself and trim off the grep/sed/tr from the command to make sure you're receiving data back correctly.&lt;/P&gt;
&lt;PRE&gt;curl_cli -k -q&lt;STRONG&gt; -b&lt;/STRONG&gt; ./cookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=&lt;EM&gt;&lt;STRONG&gt;$p&lt;/STRONG&gt;&lt;/EM&gt;&amp;amp;ticketIDToLookFor=" https://urlcat.checkpoint.com/urlcat/main.htm 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:" &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Replace the&lt;EM&gt;&lt;STRONG&gt; $p&lt;/STRONG&gt; &lt;/EM&gt;with a proper host.&lt;/P&gt;
&lt;PRE&gt;curl_cli -k -q&lt;STRONG&gt; -b&lt;/STRONG&gt; ./cookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=www.google.com&amp;amp;ticketIDToLookFor=" https://urlcat.checkpoint.com/urlcat/main.htm 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:" &lt;/PRE&gt;
&lt;P&gt;You should see something similar to what I have below:&lt;/P&gt;
&lt;PRE&gt;$ curl_cli -k -q -b ./cookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=&lt;EM&gt;&lt;STRONG&gt;www.google.com&lt;/STRONG&gt;&lt;/EM&gt;&amp;amp;ticketIDToLookFor=" https://urlcat.checkpoint.com/urlcat/main.htm 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:"&lt;BR /&gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Categories:&amp;lt;/b&amp;gt;&lt;BR /&gt;Search Engines / Portals&lt;BR /&gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;div id="categoryListDetails"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Suggested Categories: null,null &amp;lt;br/&amp;gt;&lt;BR /&gt;Comment: null &amp;lt;br/&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 17:50:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92094#M18338</guid>
      <dc:creator>masher</dc:creator>
      <dc:date>2020-07-21T17:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92096#M18339</link>
      <description>&lt;P&gt;I put the login and query all in a quick script that might make it simpler. It prompts for UC email/password and for a file with the host name.&lt;/P&gt;
&lt;PRE&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;echo -n "Enter usercenter email: "&lt;BR /&gt;read ucemail&lt;BR /&gt;echo -n "Enter usercenter password: "&lt;BR /&gt;read -s ucpw&lt;BR /&gt;echo&lt;BR /&gt;echo -n "Enter file with domain list: "&lt;BR /&gt;read filename&lt;BR /&gt;echo&lt;BR /&gt;&lt;BR /&gt;echo "Logging into UC"&lt;BR /&gt;curl_cli -k -v --cookie-jar ./cookie -d "usersOriginalURL=&amp;amp;customer=&amp;amp;needCaptcha=false&amp;amp;userName=${ucemail}&amp;amp;password=${ucpw}" https://urlcat.checkpoint.com/urlcat/login.htm 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;while read p;&lt;BR /&gt;do&lt;BR /&gt;result=$(curl_cli -k -q -b ./cookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=$p&amp;amp;ticketIDToLookFor=" https://urlcat.checkpoint.com/urlcat/main.htm 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:" | tr -d '\n' | tr '\t' ' ' | tr -s ' ' | grep -oP '&amp;lt;\/b&amp;gt;.*&amp;lt;\/p&amp;gt; &amp;lt;d' | sed -e 's/^&amp;lt;\/b&amp;gt; //' -e 's/ &amp;lt;.*$//')&lt;BR /&gt;echo $p, $result&lt;BR /&gt;sleep 1&lt;BR /&gt;done &amp;lt; $filename&lt;BR /&gt;rm ./cookie&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Results:&lt;/P&gt;
&lt;PRE&gt;[Expert@vMgmt01:0]# ./categories.sh&lt;BR /&gt;Enter usercenter email: myemail@domain.com&lt;BR /&gt;Enter usercenter password:&lt;BR /&gt;Enter file with domain list: sites.txt&lt;BR /&gt;&lt;BR /&gt;Logging into UC&lt;BR /&gt;www.yahoo.com, Search Engines / Portals&lt;BR /&gt;www.google.com, Search Engines / Portals&lt;BR /&gt;facebook.com, Social Networking&lt;BR /&gt;porn.com, Sex, Pornography&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 18:23:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92096#M18339</guid>
      <dc:creator>masher</dc:creator>
      <dc:date>2020-07-21T18:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92157#M18348</link>
      <description>&lt;P&gt;I tried this script in both Security gateway and management server from expert mode but the response would be same as I only got url's as output not the site category.&lt;/P&gt;&lt;P&gt;Management server I tried is MDS R80.30.&lt;/P&gt;&lt;P&gt;Can you let me know if I am miss something here?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 12:25:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92157#M18348</guid>
      <dc:creator>Nandhakumar</dc:creator>
      <dc:date>2020-07-22T12:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92612#M18417</link>
      <description>&lt;P&gt;The script working as expected in R80.30 and R80.40 Management server &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 11:26:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/92612#M18417</guid>
      <dc:creator>Nandhakumar</dc:creator>
      <dc:date>2020-07-28T11:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/172661#M28794</link>
      <description>&lt;P&gt;Thanks Masher,&lt;/P&gt;&lt;P&gt;This took a few attempts to get working but can confirm this works on Ubuntu 22 LTS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Steps taken:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Create Cookie:&lt;BR /&gt;&lt;/STRONG&gt;curl -k -v --cookie-jar ./checkpointcookie -d "usersOriginalURL=&amp;amp;customer=&amp;amp;needCaptcha=false&amp;amp;userName=username%40domain.com&amp;amp;password=PasswordHere" &lt;A href="https://urlcat.checkpoint.com/urlcat/login.htm" target="_blank"&gt;https://urlcat.checkpoint.com/urlcat/login.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Create Script:&lt;/STRONG&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;while read p;&lt;BR /&gt;do&lt;BR /&gt;result=$(curl -k -q -b ./checkpointcookie -d "action=post&amp;amp;actionType=submitURL&amp;amp;needCaptchaForMiscat=true&amp;amp;urlCategorization=$p&amp;amp;ticketIDToLookFor=" &lt;A href="https://urlcat.checkpoint.com/urlcat/main.htm" target="_blank"&gt;https://urlcat.checkpoint.com/urlcat/main.htm&lt;/A&gt; 2&amp;gt;&amp;amp;1 | grep -A4 "Categories:" | tr -d '\n' | tr '\t' ' ' | tr -s ' ' | grep -oP '&amp;lt;\/b&amp;gt;.*&amp;lt;\/p&amp;gt; &amp;lt;d' | sed -e 's/^&amp;lt;\/b&amp;gt; //' -e 's/ &amp;lt;.*$//')&lt;BR /&gt;echo $p, $result&lt;BR /&gt;sleep 1&lt;BR /&gt;done &amp;lt; sites.txt&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Make script executable:&lt;/STRONG&gt;&lt;BR /&gt;chmod u+x FilenameHere&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Create Site List as Sites.txt with one domain per line&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;5. Run script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 13:30:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/172661#M28794</guid>
      <dc:creator>DataMole</dc:creator>
      <dc:date>2023-02-24T13:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/178915#M29819</link>
      <description>&lt;P&gt;Hi, this script has worked for several years, but now it fails. Anyone else have problems with it recently?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 11:19:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/178915#M29819</guid>
      <dc:creator>selst</dc:creator>
      <dc:date>2023-04-24T11:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: White Paper - How to Batch Categorize URLs</title>
      <link>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/246861#M41286</link>
      <description>&lt;P&gt;Does anybody know, how to change the script to insert the OTP (one-time-password) during the login process, which is now required?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Apr 2025 12:52:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/White-Paper-How-to-Batch-Categorize-URLs/m-p/246861#M41286</guid>
      <dc:creator>Jimmy_Noel</dc:creator>
      <dc:date>2025-04-19T12:52:53Z</dc:date>
    </item>
  </channel>
</rss>

