![]() ![]() ![]() UOljOÏ"e*ÌÓ/Ô,FO«_%jOljO_jU± bonkersascr˙fifi≠Īnd as you’ll note, I bolded the password there in plain text.Īpplescript saves the contents of top-level variables into the script… and if it’s a string, it saves it as plain text, which is easily accessible even on a run-only script. Ttxtˇ0 apassword Planet‘ÍDLH+¨’Terminal.appÌΩ‘+√ˇˇˇˇ Utilities‘Íäú‘+=¨’D3Faster Planet:Applications:Utilities:įaster Planet#Applications/Utilities/Terminal.app/ˇˇ±"sudo ls ~/Desktopįaster Planet‘ÍDLH+%System Events.app˝ì”¬Íˡˇˇˇ CoreServices‘Íäú”√#(%$#>Faster Planet:System:Library:CoreServices:System Events.app$System Events.appįaster Planet-System/Library/CoreServices/System Events.app/ˇˇ Then inside the Application bundle, I opened /Pwd Test Run-Only.app/Contents/Resources/Scripts/main.scpt in TextEdit, which yields: I ran it once, and entered the (incorrect) password “bonkers” Only change was I changed the shell command to “sudo ls ~/Desktop” because I didn’t need a sysdiagnose. I exported KniazidisR’s script as a run-only Applescript application, as suggested. It’s not hard to extract a plain text password from a run-only AppleScript. ![]() set aPassword to text returned of (display dialog "Please, enter your password" default answer "" with hidden answer)ĭo shell script "echo " & aPassword & " | sudo -S sysdiagnose -v -f ~/Desktop"īut I wouldn’t call that a “more security” option than adding sysdiagnose to sudoers. If you’re going to ask for a password each time it’s run, you might as well skip the terminal scripting. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |