<?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: Extracting PSK from Spark in Spark Firewall (SMB)</title>
    <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/266978#M13536</link>
    <description>&lt;P&gt;Updated with corrections&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char *argv[]) {&lt;BR /&gt;char HASH[]="-ODIFIED&amp;amp;W0ROPERTY3HEET7ITH/+4HE3HEET)$3?,$!0?!5?02/0%24)%3.5,,";&lt;BR /&gt;int max=strlen(HASH),dlen,hp=0;&lt;BR /&gt;int i;&lt;BR /&gt;unsigned char c,v,*data;&lt;/P&gt;&lt;P&gt;if (argc&amp;lt;2) {&lt;BR /&gt;printf("Error: argument missing\n");&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;data=argv[1]; dlen=strlen(data);&lt;/P&gt;&lt;P&gt;if ((dlen%2)!=0) {&lt;BR /&gt;printf("Hash data has odd number of characters\n");&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;for (i=dlen; (hp&amp;lt;max)&amp;amp;&amp;amp;(i&amp;gt;0); i-=2) {&lt;BR /&gt;c=data[i-2];&lt;BR /&gt;switch(c) {&lt;BR /&gt;case 'a' ... 'f':&lt;BR /&gt;c=10+(c-'a');&lt;BR /&gt;break;&lt;BR /&gt;case 'A' ... 'F':&lt;BR /&gt;c=10+(c-'A');&lt;BR /&gt;break;&lt;BR /&gt;case '0' ... '9':&lt;BR /&gt;c=c-'0';&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;printf("Invalid char '%c' in string\n",c);&lt;BR /&gt;return 2;&lt;BR /&gt;}&lt;BR /&gt;v=(16*c);&lt;BR /&gt;c=data[i-1];&lt;BR /&gt;switch(c) {&lt;BR /&gt;case 'a' ... 'f':&lt;BR /&gt;c=10+(c-'a');&lt;BR /&gt;break;&lt;BR /&gt;case 'A' ... 'F':&lt;BR /&gt;c=10+(c-'A');&lt;BR /&gt;break;&lt;BR /&gt;case '0' ... '9':&lt;BR /&gt;c=c-'0';&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;printf("Invalid char '%c' in string\n",c);&lt;BR /&gt;return 2;&lt;BR /&gt;}&lt;BR /&gt;v+=c;&lt;BR /&gt;printf("%c",(v==255?0:v)^HASH[hp]);&lt;BR /&gt;hp++;&lt;BR /&gt;}&lt;BR /&gt;printf("\n\n");&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jan 2026 00:15:30 GMT</pubDate>
    <dc:creator>stallwoodj</dc:creator>
    <dc:date>2026-01-12T00:15:30Z</dc:date>
    <item>
      <title>Extracting PSK from Spark</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/229625#M11571</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I had a situation where I needed to get PSK's from a Spark to install on a big boy Quantum we're migrating to.&lt;/P&gt;&lt;P&gt;The encoded strings are in CLISH "show configuration" and can be reversed using the attached (clunky) C code.&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="courier new,courier"&gt;./reverse 26272b2428252e4c&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;aaaabbbb&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;Might be useful for someone else.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 16:18:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/229625#M11571</guid>
      <dc:creator>stallwoodj</dc:creator>
      <dc:date>2024-10-14T16:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting PSK from Spark</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/266978#M13536</link>
      <description>&lt;P&gt;Updated with corrections&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char *argv[]) {&lt;BR /&gt;char HASH[]="-ODIFIED&amp;amp;W0ROPERTY3HEET7ITH/+4HE3HEET)$3?,$!0?!5?02/0%24)%3.5,,";&lt;BR /&gt;int max=strlen(HASH),dlen,hp=0;&lt;BR /&gt;int i;&lt;BR /&gt;unsigned char c,v,*data;&lt;/P&gt;&lt;P&gt;if (argc&amp;lt;2) {&lt;BR /&gt;printf("Error: argument missing\n");&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;data=argv[1]; dlen=strlen(data);&lt;/P&gt;&lt;P&gt;if ((dlen%2)!=0) {&lt;BR /&gt;printf("Hash data has odd number of characters\n");&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;for (i=dlen; (hp&amp;lt;max)&amp;amp;&amp;amp;(i&amp;gt;0); i-=2) {&lt;BR /&gt;c=data[i-2];&lt;BR /&gt;switch(c) {&lt;BR /&gt;case 'a' ... 'f':&lt;BR /&gt;c=10+(c-'a');&lt;BR /&gt;break;&lt;BR /&gt;case 'A' ... 'F':&lt;BR /&gt;c=10+(c-'A');&lt;BR /&gt;break;&lt;BR /&gt;case '0' ... '9':&lt;BR /&gt;c=c-'0';&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;printf("Invalid char '%c' in string\n",c);&lt;BR /&gt;return 2;&lt;BR /&gt;}&lt;BR /&gt;v=(16*c);&lt;BR /&gt;c=data[i-1];&lt;BR /&gt;switch(c) {&lt;BR /&gt;case 'a' ... 'f':&lt;BR /&gt;c=10+(c-'a');&lt;BR /&gt;break;&lt;BR /&gt;case 'A' ... 'F':&lt;BR /&gt;c=10+(c-'A');&lt;BR /&gt;break;&lt;BR /&gt;case '0' ... '9':&lt;BR /&gt;c=c-'0';&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;printf("Invalid char '%c' in string\n",c);&lt;BR /&gt;return 2;&lt;BR /&gt;}&lt;BR /&gt;v+=c;&lt;BR /&gt;printf("%c",(v==255?0:v)^HASH[hp]);&lt;BR /&gt;hp++;&lt;BR /&gt;}&lt;BR /&gt;printf("\n\n");&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2026 00:15:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/266978#M13536</guid>
      <dc:creator>stallwoodj</dc:creator>
      <dc:date>2026-01-12T00:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting PSK from Spark</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/266979#M13537</link>
      <description>&lt;P&gt;If I get a hold of actual smb appliance, would be interesting to test this out.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2026 00:33:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Extracting-PSK-from-Spark/m-p/266979#M13537</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2026-01-12T00:33:48Z</dc:date>
    </item>
  </channel>
</rss>

