0

顧客向けにプログラムの試用版を作成したいと考えています。私は彼/彼女にプログラムをテストする時間を与えたいです (この場合は 7 日間)。

アプリケーション (*.py ファイル) に次のコマンドがあります。

 if os.path.isfile('some_chars.txt') or datetime.now()<datetime.strptime('30-8-2015','%d-%m-%Y'): 
# DO WHAT application HAS TO DO
else:
    print 'TRIAL EXPIRED'
    quit()

このアプローチが一般的な顧客にとって十分かどうか、または変更する必要があるかどうかに興味があります。問題は、アプリケーションが、たとえば「some_chars.txt」という名前のファイルを見つけなければならないということです。ファイルが見つかった場合、アプリケーションは必要に応じて動作します。見つからない場合は、「試用版の有効期限が切れています」というテキストを返します。

したがって、主な質問は、一般的な顧客にとって十分かということです。それはどこかにあるのでしょうか、それともマシンコードにコンパイルされているので、逆アセンブルする必要がありましたか?

編集:私は非常に重要なことを言及するのを忘れていました.py2exeを使用して、不要なファイルとフォルダーを含む実行可能ファイル(メイン)を作成しています。

4

2 に答える 2

0

Python はインタプリタなので、ソース コードを見て時間制限セクションを確認するだけです。

Python スクリプトを実行可能ファイルに変換するオプションがいくつかあります。私はこれを試して、日付を設定するために外部ファイルを使用せず、スクリプトに保持します。

于 2015-07-28T23:50:27.493 に答える
0

Of course it has everything to do with the target (population) you're aiming: there are some cases when security is an offense (that involves lots of money so it's not our case);

Let's take an example:

  • Have a program that reads plain data from a file(registry,...); e.g. :the date (the program converts the date does a comparison and depending on the trial period close or lets the user go on)

  • Have everything from previous step, but the data is not in plain text, it is encrypted (e.g.: 1 is added to every char in the data so it is not immediately readable)

  • Use some well known encryption algorithms (would make the data unreadable to the user)

But, no matter the method you choose, it's just a matter of time til it will be broken.

A "hard to beat" way would be to have an existing server where the client could connect and "secretly talk" (I'm talking about a SSLed connecion anyway), even for trial period.

"Hiding the obvious info"(delivering a "compiled" .py script) is no longer the way (the most common Google search will point to a Python "decompiler")

于 2015-07-29T00:41:19.363 に答える