• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

'protecting' a dynamic component?

Scheduled Pinned Locked Moved Dynamic Components
sketchup
11 Posts 3 Posters 6.6k Views
Loading More Posts
  • 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.
  • H Offline
    halroach
    last edited by 23 Apr 2016, 20:00

    Is there a way to 'protect' a dynamic component - so as to limit who can use it?
    Sort of like what is done with paid for plugins?

    Maybe a way to integrate the functionality of the dynamic component with that of a ruby script so it would only work when the script is installed/licensed...

    I don't have much experience with scripting, but I am interested in learning!

    FlexTools - Super Quick Windows, Doors, Slats...

    1 Reply Last reply Reply Quote 0
    • D Offline
      driven
      last edited by 23 Apr 2016, 22:54

      Theoretically, you could write a ruby to make the dynamic component for single session use...

      when the user saves or closes the model, the dynamic attributes could be stripped or nobbled...

      if reopened on the same or another licensed computer, the plugin could restore the attributes...

      but, I'm only thinking out loud...

      john

      learn from the mistakes of others, you may not live long enough to make them all yourself...

      1 Reply Last reply Reply Quote 0
      • H Offline
        halroach
        last edited by 28 Jul 2016, 11:31

        Hi John,

        I'm sorry I didn't write earlier. My own question got lost in the depths of the internet 😉.

        Would you know how to program something like what you've suggested, if it's at all feasible...

        I have seen this code by TIG which basically strips all dynamic components in a model of their attributes:
        http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=42923

        It works pretty well, but I wouldn't know how to turn that into something practical and automatic, so to speak + how to connect that with licensing...

        Thanks!

        Yoni

        @driven said:

        Theoretically, you could write a ruby to make the dynamic component for single session use...

        when the user saves or closes the model, the dynamic attributes could be stripped or nobbled...

        if reopened on the same or another licensed computer, the plugin could restore the attributes...

        but, I'm only thinking out loud...

        john

        FlexTools - Super Quick Windows, Doors, Slats...

        1 Reply Last reply Reply Quote 0
        • D Offline
          driven
          last edited by 29 Jul 2016, 13:27

          my thinking is that it's relatively easy to 'break' a DC so that it won't work...

          it is also easy to share encrypted/broken DC's...

          one way is to 'transfer' the attributes to a new 'encrypted' dictionary...

          if you import this 'encrypted' DC into SU, it will not work, but if you 'decrypt' it using you 'secret' key, it will...

          encrypted example stairs DC
          you can check if it has any dynamic attributes and even if you use ruby you won't know what they are...

          i.e. this random example ["_vhMZmDddZ_0dYeZMOmZ", "WhMZmlddZ"]

          if you load this ruby into Ruby Console

          use load for a test...
          and then type

          JcB.fix_dc
          

          the DC will then work as designed...

          click to gif...

          if you use

          JcB.break_dc
          

          it will encrypt all DC's in the model...

          This is only part of the puzzle and you still need to implement a 'License Strategy'...

          it would need to tie the lic to the encryption key and implement 'model observer' triggering of the encryption code...

          think of all the ways people can extract a working version and write code to block it happening...

          john

          learn from the mistakes of others, you may not live long enough to make them all yourself...

          1 Reply Last reply Reply Quote 0
          • H Offline
            halroach
            last edited by 30 Jul 2016, 20:55

            Hi John,

            This looks very interesting!
            I got it to work on my own DC, but not on the one you sent.

            With the 'Frozen' DC you sent:
            I loaded the script. opened the file, and ran the command 'JcB.fix_dc'
            and I get the following in the ruby console:
            #Sketchup::DefinitionList:0x0000000aa37190

            With my own DC it worked, I could see it encrypting and decrypting many lines in the console... though it hung sketchup for like 20-30 seconds during encryption and a little shorter during decryption... That could be a problem.

            Maybe encrypting just a little portion of the DC (specific attributes) would be enough?

            I'll keep playing with it...

            FlexTools - Super Quick Windows, Doors, Slats...

            1 Reply Last reply Reply Quote 0
            • H Offline
              halroach
              last edited by 30 Jul 2016, 21:05

              Also,

              What would prevent if someone just right clicks the DC and "save as" to some folder, before any encryption was taking place...
              I imagine there would need to be some matching done between something in the individual DC and something in the ruby... but could anything like that be done? Could you have a DC searching for code "outside" of "itself"? (I'm not sure I'm making much sense...).

              FlexTools - Super Quick Windows, Doors, Slats...

              1 Reply Last reply Reply Quote 0
              • D Offline
                driven
                last edited by 31 Jul 2016, 00:16

                @halroach said:

                ...I got it to work on my own DC, but not on the one you sent...

                I may have attached the wrong one as it was a quick proof of principle, and I had made a few...

                @unknownuser said:

                What would prevent if someone just right clicks the DC and "save as" to some folder

                there are lots of situations where the 'raw' DC could be 'pirated', but if they start out encrypted they need your ruby for them to work...

                that gives you an advantage as you can add observers. etc... to react to events...

                any copy event is a potential threat and may be the price you have to pay for the convenience you gain using DC's in favour of bespoke geometry creation...

                john

                learn from the mistakes of others, you may not live long enough to make them all yourself...

                1 Reply Last reply Reply Quote 0
                • H Offline
                  halroach
                  last edited by 19 Aug 2016, 11:49

                  @driven said:

                  that gives you an advantage as you can add observers. etc... to react to events...

                  What kind of observers are there? and what kind of events for example could one react to in ruby that would be relevant in our case? (I'm new to this field...)

                  I'm also thinking, assuming one doesn't encrypt all the attributes, but just "necessary ones" - (since it seems to take a very long time just for one DC, and I'm thinking of models with hundreds of DCs of different types...) Would it be possible to target the "plugin" at specific DCs with specific attributes only?

                  FlexTools - Super Quick Windows, Doors, Slats...

                  1 Reply Last reply Reply Quote 0
                  • TNTDAVIDT Offline
                    TNTDAVID
                    last edited by 4 Oct 2016, 13:04

                    Hello,

                    I am delighted to see that a subject is open for the protection of dynamic components.

                    Before asking my questions, here are the results of tests in GIF:

                    http://i.imgur.com/jxFOVeI.gif

                    Driven why it does not work as in your picture?

                    Thank you

                    David

                    [b:8wt9py2i]* Nouveau !!![/b:8wt9py2i] Découvrez notre nouveau Plugin [url=http://www.composant-dynamique.com/:8wt9py2i][color=#40FF00:8wt9py2i]C[/color:8wt9py2i][color=#77FF00:8wt9py2i]l[/color:8wt9py2i][color=#ADFF00:8wt9py2i]i[/color:8wt9py2i][color=#E4FF00:8wt9py2i]c[/color:8wt9py2i][color=#FFDB09:8wt9py2i]k[/color:8wt9py2i][color=#FF921B:8wt9py2i]-[/color:8wt9py2i][color=#FF492E:8wt9py2i]C[/color:8wt9py2i][color=#FF0040:8wt9py2i]u[/color:8wt9py2i][color=#ED2577:8wt9py2i]i[/color:8wt9py2i][color=#DA49AD:8wt9py2i]s[/color:8wt9py2i][color=#C86EE4:8wt9py2i]i[/color:8wt9py2i][color=#AD77FF:8wt9py2i]n[/color:8wt9py2i][color=#8965FF:8wt9py2i]e[/color:8wt9py2i] [color=#4040FF:8wt9py2i]2[/color:8wt9py2i][/url:8wt9py2i], pour créer vos cuisines 3D !

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      driven
                      last edited by 4 Oct 2016, 20:26

                      hi David...

                      are you still running SU v8 ?

                      if so it may be a ruby 2 issue with my example...

                      I've had no time to follow up on this concept [sorry yoni] ...

                      john

                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                      1 Reply Last reply Reply Quote 0
                      • TNTDAVIDT Offline
                        TNTDAVID
                        last edited by 5 Oct 2016, 12:17

                        Hello Driven 😉

                        I work with SketchUp, 2015.

                        [b:8wt9py2i]* Nouveau !!![/b:8wt9py2i] Découvrez notre nouveau Plugin [url=http://www.composant-dynamique.com/:8wt9py2i][color=#40FF00:8wt9py2i]C[/color:8wt9py2i][color=#77FF00:8wt9py2i]l[/color:8wt9py2i][color=#ADFF00:8wt9py2i]i[/color:8wt9py2i][color=#E4FF00:8wt9py2i]c[/color:8wt9py2i][color=#FFDB09:8wt9py2i]k[/color:8wt9py2i][color=#FF921B:8wt9py2i]-[/color:8wt9py2i][color=#FF492E:8wt9py2i]C[/color:8wt9py2i][color=#FF0040:8wt9py2i]u[/color:8wt9py2i][color=#ED2577:8wt9py2i]i[/color:8wt9py2i][color=#DA49AD:8wt9py2i]s[/color:8wt9py2i][color=#C86EE4:8wt9py2i]i[/color:8wt9py2i][color=#AD77FF:8wt9py2i]n[/color:8wt9py2i][color=#8965FF:8wt9py2i]e[/color:8wt9py2i] [color=#4040FF:8wt9py2i]2[/color:8wt9py2i][/url:8wt9py2i], pour créer vos cuisines 3D !

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement