3 Replies Latest reply on Jul 15, 2015 7:42 AM by rgnanda

    Unable to ignoe block of text

    tikshoret

      Hi

       

      Cattools 3.10.0

       

      I'm comparing Fortigate config on daily basis.

      i have managed to ignore a single line, but i can't ignore a block of text (containing the ssl encrypted keys).

      I have tried [start]-[stop] or {start}-{stop} with or without regex, no go.

       

      I Need your wisdom on this.

      what have i missed?

       

      Thanks

      Eran

        • Re: Unable to ignoe block of text
          rgnanda

          Eran,

           

          Can you please share the config file or atleast portion of it where you want to omit the key. Please remove sensitive info if any

           

          Thanks,

          Nanda

            • Re: Unable to ignoe block of text
              tikshoret

              I actualy managed to get it working, it had something to do with the syntax.

               

              this is what i tried initially, in several variations, even with "." as (and other regex) ,neither of that work:

              {config vpn certificate local}-{config user device-category}

              i even tried simple single word lines, did not work.

               

              after 40+ tries, this is what  actualy worked, cant explain why:

              {^MII}-{=}

               

              this is the text block that needs to be ignored, the key is changing all the time:

              config vpn certificate ca

              end

              config vpn certificate local

                  edit "Fortinet_CA_SSLProxy"

                      set Password ****

                      set comments "certificates."

                      set private-key "-----BEGIN ENCRYPTED PRIVATE KEY-----  

              MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQImjc6qt9NVLQCAggA

              MBQGCCqGSIb3DQMHBAgZaDZIVOwXhwSCBMhB9yMRZBrBU1h1r+5hjc/2JDLs53fY

              iM8RT2EiK7MHYnv61VscQ3rdpaxYOZAVcRVOO6Qf0GyEP6Rvw3dIaDEi6j/msj6w

              7k5HPuFEqgqmHH8ivfvY1nTGrOrUSn/4v4viOIddsQex6n+GZDssINNrRS5XYwW4

              1FdvufGiKH7uKZMUvHjy/NR1y70MmMKq7yRzgP7ajBncYotuXk9u0SaL6nLjvAVY 

              aVgejEWbAe7/FcdXIJjdPE3/JB2VhP1hZ9gwFnRSNY+wOx5cSGrWPz6f1PHn4GjO

              nByZTSdI0tkeQfjReGCxdMwiHzktsXR0F/9iXBnOo37YEBDMgnzx6v/BhBGLcCel

              ut+qHj7MgvCnfUA/TQgTDvCn3gzgYHSDcGmRmNIP5x4NEGKWxWy4H+MtJu32ymIr

              5PAoeFskGmxKxu9vpVqmFttfiou9D3zQj9j7qXyxQShoGgLsW478sdGhLNEMeq4A

              2xc=

              -----END ENCRYPTED PRIVATE KEY-----"

              next

              end

              config user device-category


              thanks