Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Can QML files be obfuscated before bundling it in a sis file
Forum Updated to NodeBB v4.3 + New Features

Can QML files be obfuscated before bundling it in a sis file

Scheduled Pinned Locked Moved QML and Qt Quick
19 Posts 5 Posters 14.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kamalakshantv
    wrote on last edited by
    #1

    I noticed that on opening a sis file you can get the qml files as its is. Can it be obfuscated? or is there any plans for that in future.

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xsacha
      wrote on last edited by
      #2

      I guess it'd be the same as distributing any non binary. Use your C++ wrapper to decode the qmls. Before you load the main source.

      • Sacha
      1 Reply Last reply
      0
      • K Offline
        K Offline
        kamalakshantv
        wrote on last edited by
        #3

        I was wondering if this could be built in to the wrapper template provided by Qt creator.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kamalakshantv
          wrote on last edited by
          #4

          [quote author="tamhanna" date="1291451390"]
          [quote author="xsacha" date="1291451183"]I guess it'd be the same as distributing any non binary. Use your C++ wrapper to decode the qmls. Before you load the main source.[/quote]

          Use a somewhat safe algorithm, though. And rename the file extensions.[/quote]

          Yes that option is always open. But if built in to Qt Creator everyone will benefit from it.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on last edited by
            #5

            [quote author="tamhanna" date="1291451829"]
            [quote author="QtK" date="1291451773"]
            [quote author="tamhanna" date="1291451390"]
            [quote author="xsacha" date="1291451183"]I guess it'd be the same as distributing any non binary. Use your C++ wrapper to decode the qmls. Before you load the main source.[/quote]

            Use a somewhat safe algorithm, though. And rename the file extensions.[/quote]

            Yes that option is always open. But if built in to Qt Creator everyone will benefit from it. [/quote]

            But then it is also easier to break.

            I wiull never forget the Astraware Superpatcher for Palm.- If every developer rolls his own scheme, well, not all of them will get hit. There is security in numbers here[/quote]

            What if you can generate a binary out of qml files instead of just obfuscating it?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenisKormalev
              wrote on last edited by
              #6

              As a quick solution just pack them as resource and apply some crypto on it. At loading simply uncrypto it and load as resource.
              Or as quickest solution simply use as internal resources (inside binary).

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kamalakshantv
                wrote on last edited by
                #7

                [quote author="Denis Kormalev" date="1291464214"]As a quick solution just pack them as resource and apply some crypto on it. At loading simply uncrypto it and load as resource.
                Or as quickest solution simply use as internal resources (inside binary).[/quote]

                Even I had thought of that but in that case I thought there might be a resource decompiler already present. But then this should work good as a quick solution. thank you.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kamalakshantv
                  wrote on last edited by
                  #8

                  [quote author="tamhanna" date="1291464425"]Hi,
                  not sure if the internal resource is so save though...[/quote]

                  But still seems to be a quick and good workaround .

                  1 Reply Last reply
                  0
                  • X Offline
                    X Offline
                    xsacha
                    wrote on last edited by
                    #9

                    If it doesn't already exist, it will soon. Where there's a will, there is a way.
                    Unfortunately it seems you're stuck in a game of cat and mouse. However, if you make it too difficult, the cat may not bother to chase.

                    • Sacha
                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xsacha
                      wrote on last edited by
                      #10

                      I'm sure it's quite easy to identify how they are aligned in your program.

                      • Sacha
                      1 Reply Last reply
                      0
                      • X Offline
                        X Offline
                        xsacha
                        wrote on last edited by
                        #11

                        They all have their own signature I'm sure.
                        How do you think Symbian decodes it?

                        • Sacha
                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          fcrochik
                          wrote on last edited by
                          #12

                          [quote author="tamhanna" date="1291512396"]
                          [quote author="xsacha" date="1291484250"]If it doesn't already exist, it will soon. Where there's a will, there is a way.
                          Unfortunately it seems you're stuck in a game of cat and mouse. However, if you make it too difficult, the cat may not bother to chase.[/quote]

                          Don't challenge me.

                          It would seriously be a cool project . Qt Resource Decompiler.

                          The only issue I see is that every compiler aligns his C arrays differently into the binary. So such a decompiler would always be limited to one or two configurations at a time.[/quote]

                          If you need/want a real challenge I have a good one: a qml compiler! Or even better a QML to c++ generator.

                          Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                          1 Reply Last reply
                          0
                          • X Offline
                            X Offline
                            xsacha
                            wrote on last edited by
                            #13

                            That would be quite awesome! Not only do you get to keep the benefit of coding fast, you can skip the whole interpretive stuff, have the code in pure Qt C++ and you don't have to worry about obfuscating the code :).

                            But I mean a lot of the code practices we use in QML are based around the fact that it is going to be interpreted. This would be hard to convert :.

                            Maybe a .pyc or similar where it compiles the javascript but not in to C++.

                            • Sacha
                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              fcrochik
                              wrote on last edited by
                              #14

                              [quote author="xsacha" date="1291528204"]That would be quite awesome! Not only do you get to keep the benefit of coding fast, you can skip the whole interpretive stuff, have the code in pure Qt C++ and you don't have to worry about obfuscating the code :).

                              But I mean a lot of the code practices we use in QML are based around the fact that it is going to be interpreted. This would be hard to convert :.

                              Maybe a .pyc or similar where it compiles the javascript but not in to C++.[/quote]

                              It doesn't need to be a 100% conversion or for every project.

                              It will convert optimize anything it can but it can still make use of the "script" run-time environment. I don't think converting the "qml" would be a problem. Converting the javascript "portions" may prove not feasible.

                              The idea would be to use the qml as a replacement for the designer forms on c++ applications. For projects mostly based on qml/javascript it probably doesn't make sense anyway.

                              Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tobias.hunger
                                wrote on last edited by
                                #15

                                tamhanna: What makes you think resources are in any way safe? There are tools available to introspect Qt applications that do quite a lot of neat things, including extraction of resources.

                                You might want to give "this tool":http://gitorious.org/basyskom-inspector a try. In addition to resources it can help to examine the widget tree, etc. It is really amazing what you can do with Qt introspection.

                                1 Reply Last reply
                                0
                                • F Offline
                                  F Offline
                                  fcrochik
                                  wrote on last edited by
                                  #16

                                  [quote author="Tobias Hunger" date="1291568814"]tamhanna: What makes you think resources are in any way safe? There are tools available to introspect Qt applications that do quite a lot of neat things, including extraction of resources.

                                  You might want to give "this tool":http://gitorious.org/basyskom-inspector a try. In addition to resources it can help to examine the widget tree, etc. It is really amazing what you can do with Qt introspection.[/quote]

                                  Somehow since I started dealing with Qt I had this idea in the back of my mind that such tool would exist. Thanks for exposing it.

                                  By the way, do you know of any good references of how to use "introspection" on your code? Introspection is widely used on java and .net projects but I haven't seen much about how much can be done with Qt.

                                  Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    DenisKormalev
                                    wrote on last edited by
                                    #17

                                    Tobias, so using external crypted resources is the only way for someone who use some valuable files in resources.

                                    1 Reply Last reply
                                    0
                                    • X Offline
                                      X Offline
                                      xsacha
                                      wrote on last edited by
                                      #18

                                      [quote author="fcrochik" date="1291567674"]
                                      It doesn't need to be a 100% conversion or for every project.

                                      It will convert optimize anything it can but it can still make use of the "script" run-time environment. I don't think converting the "qml" would be a problem. Converting the javascript "portions" may prove not feasible.

                                      The idea would be to use the qml as a replacement for the designer forms on c++ applications. For projects mostly based on qml/javascript it probably doesn't make sense anyway.[/quote]
                                      Don't know why I hadn't thought of it. Makes sense. The Type's are directly translatable to classes with read/write/notify functions. So this could be compiled in and the app could possibly run faster :) Or at least load faster.

                                      • Sacha
                                      1 Reply Last reply
                                      0
                                      • F Offline
                                        F Offline
                                        fcrochik
                                        wrote on last edited by
                                        #19

                                        @Sacha: now this knowledge will hunt you! :)
                                        I don't think is something that we will see any time soon if ever...

                                        Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved