Home > Uncategorized > Adobe Flash Update Alert

Adobe Flash Update Alert

Create shell script and run it daily from cron.

#!/bin/bash

#Find and delete old Adobe files from  /tmp folder
rm -rf /tmp/Adobe*.*

#Get the Latest update .cab from Adobe
wget  -q –directory-prefix=/tmp -k http://fpdownload.adobe.com/get/flashplayer/current/licensing/win/AdobeFlashPlayerCatalog_SCUP.cab

#go to in /tmp directory
cd /tmp

#extract the .cab file for .xml
cabextract -q -f AdobeFlashPlayerCatalog_SCUP.cab

#Move the .xml file to /var/www/websvn/new for compare
mv /tmp/AdobeFlashPlayerCatalog_SCUP.xml /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_new.xml

#Extrace the new xml file elements and overwrite to txt
xmlstarlet fo  /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_new.xml > /var/www/websvn/new/AdobeFlash_new.txt
#!/bin/bash

#Find and delete old Adobe files from  /tmp folder
rm -rf /tmp/Adobe*.*

#Get the Latest update .cab from Adobe
wget  -q –directory-prefix=/tmp -k http://fpdownload.adobe.com/get/flashplayer/current/licensing/win/AdobeFlashPlayerCatalog_SCUP.cab

#go to in /tmp directory
cd /tmp

#extract the .cab file for .xml
cabextract -q -f AdobeFlashPlayerCatalog_SCUP.cab

#Move the .xml file to /var/www/websvn/new for compare
mv /tmp/AdobeFlashPlayerCatalog_SCUP.xml /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_new.xml

#Extrace the new xml file elements and overwrite to txt
xmlstarlet fo  /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_new.xml > /var/www/websvn/new/AdobeFlash_new.txt

#Extrace the oldw xml file elements and overwrite to txt
xmlstarlet fo  /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_old.xml > /var/www/websvn/new/AdobeFlash_old.txt

#Find the word Activex in old .xml file and store into $old variable
old=`grep -w  “Adobe Flash Player 64-bit ActiveX” /var/www/websvn/new/AdobeFlash_old.txt`
#echo “$old”

#Find the word Activex in new .xml file and store into @new variable
new=`grep -w  “Adobe Flash Player 64-bit ActiveX” /var/www/websvn/new/AdobeFlash_new.txt`
#echo “$new”

# Compare the old and new and send email
if [ “$old” != “$new” ]
then
/usr/local/bin/sendEmail -f svn-amd1@dmydoamn.in -t systemadmin@qddomaint.in -u “New Adobe Flash Update Available Version on $(date) ” -m “New Version = ($new) \n \n Old Version = ($old) ” -s 192.168.150.2:25

#Rename the new to old for next update comparision
mv -f /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_new.xml /var/www/websvn/new/AdobeFlashPlayerCatalog_SCUP_old.xml

fi


Advertisements
Categories: Uncategorized
  1. John
    July 23, 2012 at 5:14 pm

    Good script

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: