• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Save as application - run only
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save as application - run only


  • Subject: Re: Save as application - run only
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 10 Nov 2015 15:14:19 +1100

On 10 Nov 2015, at 2:52 PM, Deivy Petrescu <email@hidden> wrote:

Here’s a simple script that can prevent that, but it is not the best solution.

property bigSecret : ""

set my bigSecret to text returned of (display dialog "Tell me a secret:" default answer my bigSecret)
set bigSecret to encryptit(bigSecret)

on encryptit(x)
set l to {}
repeat with k in x
set end of l to (id of k) ^ 2
end repeat
return l
end encryptit

OK, but then you can't use bigSecret yourself; your script can only be run once. So you probably add something like this to your script for when you need the value:

on unEncryptit(x)
set l to {}
repeat with k in x
set end of l to k ^ 0.5
end repeat
return string id l
end unEncryptit

And your second line will need to be:

set my bigSecret to text returned of (display dialog "Tell me a secret:" default answer my unEncryptit(bigSecret))

So I look through your script in a text editor, and sure enough, there's an unEncryptit handler. So let's give it a try:

set x to load script (choose file)
set y to (bigSecret of x)
tell x to set z to unEncryptit(y)
display dialog "The bigSecret is: " & z

We can keep playing this game, and I'll lose very soon -- but it's really becoming security by obscurity, and that's not very secure at all.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Save as application - run only (From: Jay Louvion <email@hidden>)
 >Re: Save as application - run only (From: Axel Luttgens <email@hidden>)
 >Re: Save as application - run only (From: Shane Stanley <email@hidden>)
 >Re: Save as application - run only (From: "Stockly, Ed" <email@hidden>)
 >Re: Save as application - run only (From: Shane Stanley <email@hidden>)
 >Re: Save as application - run only (From: Deivy Petrescu <email@hidden>)
 >Re: Save as application - run only (From: "Stockly, Ed" <email@hidden>)
 >Re: Save as application - run only (From: Shane Stanley <email@hidden>)
 >Re: Save as application - run only (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Save as application - run only
  • Next by Date: Re: Save as application - run only
  • Previous by thread: Re: Save as application - run only
  • Next by thread: Re: Save as application - run only
  • Index(es):
    • Date
    • Thread