Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to fetch actual Jumbo Hotfix take details

Hugo_vd_Kooij
Advisor

There was a serious itch  had to scratch where I want to get a fast overview of the current General Availability and Ongoing Jumbo Hotfix details.

Due to the restructuring of information I had to redesign my tool and it ended up to be a relative simple bash script.

 

 

 


   #!/bin/bash # Fetch Check Point HFA details # Design by Hugo van der Kooij CURL="curl -s" BASE="https://sc1.checkpoint.com/documents/Jumbo_HFA" for VER in R80.20 R80.30 R80.40 R81 R81.10 do if [ $VER = 
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




0 Kudos
5 Replies

Hugo_vd_Kooij
Advisor

I had to fix the script a bit and the script above has been changed about 30 minutes after the original post to resolve the issue with R81

It now runs well ....

 


    *** Version R80.20 *** Take 205 - General Availability Take 211 - Ongoing *** Version R80.30 *** Take 246 - General Availability Take 251 - Ongoing *** Version R80.40 *** Take 158 - General Availability Take 153 - Ongoing *** Version R81 *** Take 65 - General Availability Take 68 - Ongoing *** Version R81.10 *** Ta
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


Hugo_vd_Kooij
Advisor

Well. It didn't take Check point that long to break my script. So I am back to hacking my way back in. Stay tuned.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Hugo_vd_Kooij
Advisor

New version:


   #!/bin/bash # Fetch Check Point HFA details # Design by Hugo van der Kooij CURL="curl -s" BASE="https://sc1.checkpoint.com/documents/Jumbo_HFA" for VER in R80.20 R80.30 R80.40 R81 R81.10 do if [ $VER = "R81" ]; then VER2="R81.00" else VER2=$VER fi echo " *** Version $VER ***" $CURL "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" | \ grep "Take" | \ grep -v "Archive" | \ grep "General" | \ sed "s/.*\">//g" | \ sed "s/<.*//g" | \ head -1 # $CURL "${BASE}
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Duane_Toler
Advisor

You can replace your collection of sed/grep with some parsing via xmllint.  You'll need to save the output from curl to a file and do an ugly force-feeding to xmllint to get pretty-ish output:

 


   $CURL "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" |\ xmllint --html --xpath '//table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[1]' - 2>/dev/null ;echo 
  

et voilà:

 


   for VER in R80.20 R80.30 R80.40 R81 R81.10 do if [ $VER = "R81" ];
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Duane_Toler
Advisor

To make it closer to your original:


   curl -s -k https://sc1.checkpoint.com/documents/Jumbo_HFA/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm |\ xmllint --html --xpath 'concat(//table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[(contains(.//td[3]/p/text(),"-"))][1]/td[1]/p/a/text()," Ongoing ", //table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[not (contains(.//td[3]/p/text(),"-"))][1]/td[1]/p/a/text(), " Recommended ")' - 2>/dev/null 
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free