Re: Odd result parsing keychain password
Re: Odd result parsing keychain password
- Subject: Re: Odd result parsing keychain password
- From: "John C. Welch" <email@hidden>
- Date: Sun, 07 Dec 2003 00:26:47 -0600
On 12/6/03 11:06 PM, "Gnarlodious" <email@hidden> wrote:
>
> Um...why are you doing this? I just use the password as it comes from the
>
> keychain, and it works fine. No need to parse it at all.
>
What keychain are you using? Because mine uses a 64 bit string with all
>
invisible characters ASCII nul character:
>
>
count of items of thePassword
>
>
The volume won't mount with a password containing nul characters but wants a
>
password each time. And once you're stalled on the logon dialog you have to
>
do the rest of the formality.
>
If you've found some shortcut around the nul characters lay it on me. Always
>
willing to get rid of a line!
I just use the password variable as it is.. Are you entering the passwords
*into* the keychain in that state?
This is part of a script I've used for over a year now:
using terms from application "Keychain Scripting"
--this is required so that the handler is still talking to Keychain
--Scripting
on mountOps(theKey)
set theUser to account of theKey
--these just grab the information needed to get the mount info
set thePassword to the password of theKey
--this way, the only way to sniff the password is to monitor the apple
--events
set theServer to the server of theKey
set thePath to the path of theKey
set thePort to the port of theKey
set theProtocol to the protocol of theKey as string
--this is needed because smb is part of a constant,
if theProtocol contains "smb" then
--so you have to snag the 'smb' from the raw event
set theProtocol to "smb"
end if
--you can also include options for the NT/W2K domain if necessary,
--and the authentication type
--that's up to you for your needs
set theURL to theProtocol & "://" & theServer & thePath as string
mount volume theURL as user name theUser with password thePassword
return 0
end mountOps
end using terms from
--
I don't mind being called tough, since I find in this racket it's the tough
guys who lead the survivors.
- Colonel Curtis LeMay
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.