Technical Answer - Protecting code in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • flit

    #16
    Re: Technical Answer - Protecting code in python

    I didn´t reply to the last D´Aprano reply just to avoid this kind of
    social war.
    And yes, I know that if I want 100% security I should not distribute
    my code. And there is a better way that is not doing any code to be
    more secure and bug-free (now I am using irony).
    And no, I am not supporter of software patents, RIAA and DRM.

    And Mr. Willems understood very well my problem and my condition. And
    others too in the beginning of the post.
    But look...after mr D´Aprano enters it starts this social warfare.....

    So where is the troll?

    In fact I think the heroes series was based in this thread (Hiros read
    it and come back in time)
    Because there is some people who have special DNAs that give powers to
    see beyond their problems and environments, so they can read the post,
    understand and give technical details, understanding this is not
    comp.lang.pytho n.social-activism-political-be-open-not-evil

    About trolls:

    No way I will do this question only to say to others:
    "Look python can´t do this like xxxx does.."
    or
    "Look now I will active the "pet-people-living-in-welfare-trying-to-be-
    political" in the list and they will join and sing songs about the
    revolution.."

    if you do a search in this group for this problem you will see more
    political whining than answers in this type of questions...

    Just look this post!! Seriously read one by one.... Begining ok.. 2
    ok ,3 ok , 4 ok .. and bang..!!!

    Going back in the beginning I said :

    "So PLEASE, don't try to convince me about the social / economical /
    open source / give to all / be open / all people are honest until
    prove contrary / dance with the rabbits... "

    So who is failing to acknowledge the question? AND AGAIN someone will
    search for "protecting python code" and will see the same whining and
    political threads...
    I think the python community is great, and I love the python language,
    if you search for superflit in this group you will see that I love
    python and the community, I am a newbie, but I am not imposing my
    beliefs I am just saying that my reality is a little different and I
    need a answer for a particular problem.
    That is the reason because I always recommend people to travel out of
    their CONTINENT, and stay more than 5 months living in another
    culture.
    I can elaborate a more "intelectua l" answer but sorry. I have to work
    at 6:00 am to pay my bills, and if I get unemployed there is no
    welfare, nothing , nada, zero.
    I believe in reincarnation, so next time I will aim better :)
    For me this thread is closed, and I think this is the most crazy
    thread in this list.
    Thank you all, for the technical answers, and sorry if I insult anyone
    directly or indirectly ( I am a political incorrect person)
    That´s all folks..finito





    Comment

    • Steven D'Aprano

      #17
      Re: Technical Answer - Protecting code in python

      On Thu, 22 Mar 2007 09:11:51 +1100, Ben Finney wrote:
      "Steven D'Aprano" <steve@REMOVE.T HIS.cybersource .com.auwrites:
      >
      >Is your program valuable? Is it worth money? Then the 90% of script
      >kiddies will just wait three days, and download the program off the
      >Internet after the real hackers have broken your protection.
      >
      The real hackers wouldn't be doing that.
      >
      The crackers, however, might.
      I quote Bruce Schneier:

      [quote]
      For years I have refused to play the semantic "hacker" vs. "cracker" game.
      There are good hackers and bad hackers, just as there are good
      electricians and bad electricians. "Hacker" is a mindset and a skill set;
      what you do with it is a different issue.
      [end quote]

      See his essay on "What is a hacker" here:
      A hacker is someone who thinks outside the box. It’s someone who discards conventional wisdom, and does something else instead. It’s someone who looks at the edge and wonders what’s beyond. It’s someone who sees a set of rules and wonders what happens if you don’t follow them. A hacker is someone who experiments with the limitations of systems for intellectual curiosity. I wrote that last sentence in the year 2000, in my book Secrets and Lies. And I’m sticking to that definition. This is what else I wrote in Secrets and Lies (pages 43-44):...


      In addition, virtually nobody outside of the IT hacker subculture knows
      what you're talking about if you talk about crackers. Out network was
      brought down by a biscuit???



      --
      Steven D'Aprano

      Comment

      • Steven D'Aprano

        #18
        Re: Technical Answer - Protecting code in python

        On Wed, 21 Mar 2007 20:59:57 -0400, Bart Willems wrote:
        Or the consultant wants to be sure that the two dimwitted nimcumpoops at
        the office who /think/ they can write code don't screw up the script
        when they're trying to 'fix' or 'improve' something. And blame the
        consultant if the script all of a sudden stops working 'we did not do
        anything. It just stopped working all of a sudden'.
        Or he doesn't want to expose the passwords needed to logon to the
        database server. Or whatever.
        >
        So, there are reasons enough why someone wants to render his code
        immutable and/or unreadable *to some extent*.
        And that's what I've been asking. How to protect the code depends on what
        you are trying to protect it from. Why is that so hard to understand?

        In the above scenarios, one solution is:

        chmod a-w script.py

        If they don't have write permission, they can't "improve" it by adding
        bugs. If they take the time and effort to give themselves write
        permission, then they have accepted responsibility for breaking it.

        The OP clearly states that he does not want a discussion as to why to
        protect the code.
        The OP might not want such a discussion, but without it, any answers he
        gets are sure to be bad answers except by accident.


        All he wants is something that turns 'readable,
        changeable python' into 'unreadable, immutable python'.
        chown scriptuser script.py # a unique user
        chmod a-rwx script.py
        chmod u+rx script.py

        I believe that fully meets the functional requirements. Where shall I send
        the invoice?


        --
        Steven D'Aprano

        Comment

        • Steven D'Aprano

          #19
          Re: Technical Answer - Protecting code in python

          On Wed, 21 Mar 2007 22:59:46 -0700, flit wrote:
          Going back in the beginning I said :
          >
          "So PLEASE, don't try to convince me about the social / economical /
          open source / give to all / be open / all people are honest until
          prove contrary / dance with the rabbits... "
          I have done NONE of that.

          I've just pointed out, time and time again, that you haven't asked a
          meaningful question.

          Even after all these posts, still won't tell us what you are trying to
          protect against. People copying your program? Competitors infringing your
          patents? Your "corrupt and "bad" government (your words) infringing your
          moral rights as an author? Your customer editing your program and breaking
          it? Who knows? I don't. I wonder whether even you do.

          You keep asking for a technical solution, even if a technical solution
          is not appropriate, but you won't tell us what the problem is. Tell us the
          threat you want to protect against, and we'll suggest meaningful solutions.


          --
          Steven D'Aprano

          Comment

          • Bart Willems

            #20
            Re: Technical Answer - Protecting code in python

            Aaah, *now* we're getting somewhere... :-)
            >All he wants is something that turns 'readable,
            >changeable python' into 'unreadable, immutable python'.
            >
            chown scriptuser script.py # a unique user
            chmod a-rwx script.py
            chmod u+rx script.py
            >
            I believe that fully meets the functional requirements. Where shall I send
            the invoice?
            If it works on the target machine - I am under the assumption that the
            client is some kind of government office - more likely to run Windows
            than it is to run unix/linux/etc.

            Who has a similar solution for windows?

            Comment

            • Thomas Heller

              #21
              Re: Technical Answer - Protecting code in python

              Bart Willems schrieb:
              Aaah, *now* we're getting somewhere... :-)
              >
              >>All he wants is something that turns 'readable,
              >>changeable python' into 'unreadable, immutable python'.
              >>
              >chown scriptuser script.py # a unique user
              >chmod a-rwx script.py
              >chmod u+rx script.py
              >>
              >I believe that fully meets the functional requirements. Where shall I send
              >the invoice?
              >
              If it works on the target machine - I am under the assumption that the
              client is some kind of government office - more likely to run Windows
              than it is to run unix/linux/etc.
              >
              Who has a similar solution for windows?
              python -m py_compile script.py
              del script.py

              Thomas

              Comment

              • Gabriel Genellina

                #22
                Re: Technical Answer - Protecting code in python

                En Thu, 22 Mar 2007 14:04:04 -0300, Bart Willems <b.r.willems@gm ail.com>
                escribió:
                >chown scriptuser script.py # a unique user
                >chmod a-rwx script.py
                >chmod u+rx script.py
                >
                If it works on the target machine - I am under the assumption that the
                client is some kind of government office - more likely to run Windows
                than it is to run unix/linux/etc.
                >
                Who has a similar solution for windows?
                cacls /help

                --
                Gabriel Genellina

                Comment

                • Gabriel Genellina

                  #23
                  Re: Technical Answer - Protecting code in python

                  En Thu, 22 Mar 2007 14:04:04 -0300, Bart Willems <b.r.willems@gm ail.com>
                  escribió:
                  >chown scriptuser script.py # a unique user
                  >chmod a-rwx script.py
                  >chmod u+rx script.py
                  >
                  If it works on the target machine - I am under the assumption that the
                  client is some kind of government office - more likely to run Windows
                  than it is to run unix/linux/etc.
                  >
                  Who has a similar solution for windows?
                  cacls /help

                  --
                  Gabriel Genellina

                  Comment

                  Working...