• 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: Hiding user/password credentials in a script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding user/password credentials in a script


  • Subject: Re: Hiding user/password credentials in a script
  • From: Peter Baxter <email@hidden>
  • Date: Tue, 16 Sep 2008 08:01:06 +1000

The usual way to retrieve a password from the Keychain is something like this:

tell application "Keychain Scripting"
set myTestPassword to the name of every key of keychain 1 whose name is "myTestPassword"
end tell
tell application "Keychain Scripting"
tell keychain 1
set chosenKey to the first generic key whose name is (myTestPassword as string)
set chosenPassword to the password of chosenKey
end tell
end tell
-- do something with your password
tell application "SystemUIServer"
display dialog chosenPassword
end tell
I haven't done anything with a password in this way for a long time so I suspect there are much better scripts written.  I hope this helps.

On 16/09/2008, at 3:33 AM, John C. Welch wrote:

On 9/14/08 12:18 PM, "Jim Skibbie" <email@hidden> wrote:

Is there a good method for doing something like this where the user credentials are not visible/snoop-able?

The Keychain and Keychain Scripting come to mind

--


Peter Baxter
email@hidden


There is hardly anything in the world that some man can't make a little worse and sell a little cheaper, and the people who consider price only are this man's lawful prey.-- John Ruskin


 _______________________________________________
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

  • Follow-Ups:
    • Re: Hiding user/password credentials in a script
      • From: Peter Baxter <email@hidden>
References: 
 >Re: Hiding user/password credentials in a script (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Re. FileMaker Object Not Found Error
  • Next by Date: Re: Hiding user/password credentials in a script
  • Previous by thread: Re: Hiding user/password credentials in a script
  • Next by thread: Re: Hiding user/password credentials in a script
  • Index(es):
    • Date
    • Thread