• 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: Sparkle updater check vulnerability script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sparkle updater check vulnerability script


  • Subject: Re: Sparkle updater check vulnerability script
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 10 Feb 2016 17:24:25 +0100


Le 2016/02/10 à 17:12, 2551phil <email@hidden> a écrit :


On 10 Feb 2016, at 22:46, Bill Cheeseman <email@hidden> wrote:

I put a 'try' block around the inner 'if exists' block, and it solved the problem. I got a list of 6 offending applications in my Applications folder. Thanks.

Thanks, Bill.

I’ve given up on the attempt to implement a ‘choose folder’ option. I realised I’d messed it up anyway by mixing path formats ups, but even once I fixed that, the find shell script doesn’t return what I expect when used on other folders. So, the latest “stable” (:p) version I’m offering is:



#script version 1.4
set x to (path to startup disk) as text
set pathToAppFolder to x & "Applications:" as alias
set defaultAppsFolder to "/Applications"


set plistContents to ""
set x to (path to startup disk) as text
set pathToAppFolder to x & "Applications:" as alias
set infoFilePath to "Contents:info.plist"
set theApp to ""
set sparkleAppsList to {}
set theAppList to do shell script "find " & defaultAppsFolder & " -name Sparkle.framework | awk -F'/' '{print $3}'"
set theAppList to paragraphs of theAppList
repeat with i from 1 to number of items in theAppList
set theApp to text of item i of theAppList
set this_item to item i of theAppList
set f to pathToAppFolder & this_item & ":" & infoFilePath as string
tell application "System Events"
if exists property list file f then
set thePlist to contents of property list file f
set theValue to value of thePlist
try
if exists SUFeedURL of theValue then

set thisSUFeedURL to SUFeedURL of theValue as text
if thisSUFeedURL contains "http:" then
set theResultString to "Application : " & my theApp & " : " & thisSUFeedURL as text
set end of my sparkleAppsList to theResultString & "

"
end if

end if
end try
end if
end tell
end repeat
display dialog "The following apps do not use secure https connections for the Sparkle updater:

" & sparkleAppsList as string buttons "OK" default button "OK" with title "Sparkle Framework Vulnerability Check"

#EOF



If anyone can improve it or solve the ‘choose folder’ problem, please post and mark it up as version 1.5 for clarities sake.

Thanks!

My two cents :

I highlighted three instructions.
The first two seems to duplicate with no need.
I don't understand why you coerce pathToAppFolder as alias because it's used only in the third instruction which need a string.

Yvan KOENIG (VALLAURIS, France) mercredi 10 février 2016 17:24:03



 _______________________________________________
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: Sparkle updater check vulnerability script
      • From: 2551phil <email@hidden>
References: 
 >Re: Sparkle updater check vulnerability script (From: sqwarqDev <email@hidden>)
 >Re: Sparkle updater check vulnerability script (From: 2551phil <email@hidden>)
 >Re: Sparkle updater check vulnerability script (From: Bill Cheeseman <email@hidden>)
 >Re: Sparkle updater check vulnerability script (From: 2551phil <email@hidden>)
 >Re: Sparkle updater check vulnerability script (From: Bill Cheeseman <email@hidden>)
 >Re: Sparkle updater check vulnerability script (From: 2551phil <email@hidden>)

  • Prev by Date: Re: Sparkle updater check vulnerability script
  • Next by Date: Re: Sparkle updater check vulnerability script
  • Previous by thread: Re: Sparkle updater check vulnerability script
  • Next by thread: Re: Sparkle updater check vulnerability script
  • Index(es):
    • Date
    • Thread