tis-flashplayer

32.0.0.465-18
Adobe Flash Player for supported browsers
58211 downloads
Download

  Description 

  • package : tis-flashplayer
  • version : 32.0.0.465-18
  • architecture : all
  • categories : Internet,Media
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Adobe Flash Player for supported browsers
  • locale : all
  • target_os : windows
  • min_os_version : 5.1
  • max_os_version :
  • min_wapt_version : 1.7
  • sources : https://get.adobe.com/flashplayer/otherversions/
  • installed_size :
  • impacted_process :
  • description_fr : Adobe Flash Player pour les navigateurs compatibles
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Adobe
  • licence :
  • signature_date : 2020-12-22T17:49:14.856018
  • Homepage : https://get.adobe.com/flashplayer
  • Conflicts :

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import bs4 as BeautifulSoup
import requests

uninstallkey = []

# Defining variables
bin_name_ie_string = 'install_flash_player_%s_active_x.msi'
bin_name_firefox_string = 'install_flash_player_%s_plugin.msi'
bin_name_chromium_string = 'install_flash_player_%s_ppapi.msi'
bin_name_uninstaller = 'uninstall_flash_player.exe'
silent_args = {'REMOVE_PREVIOUS':'Yes'}
silent_uninst_args = '-uninstall'

schtasks_to_delete = ['Adobe Flash Player Updater','Adobe Flash Player PPAPI Notifier']
services_to_disable = ['AdobeFlashPlayerUpdateSvc']


def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    bin_name_ie = 'install_flash_player_%s_active_x.msi' % package_version
    bin_name_firefox = 'install_flash_player_%s_plugin.msi' % package_version
    bin_name_chromium = 'install_flash_player_%s_ppapi.msi' % package_version
    if iswin64():
        app_dir = makepath(os.environ['SYSTEMROOT'],'SysWOW64','Macromed','Flash')
    else:
        app_dir = makepath(os.environ['SYSTEMROOT'],'System32','Macromed','Flash')

    # Installing the package
    if installed_softwares('Firefox'):
        print('Installing: %s' % bin_name_firefox)
        install_msi_if_needed(bin_name_firefox,
            properties=silent_args,
            min_version=package_version,
            killbefore=['firefox.exe'])

    if installed_softwares('Opera') or installed_softwares('Chromium'):
        print('Installing: %s' % bin_name_chromium)
        install_msi_if_needed(bin_name_chromium,
            properties=silent_args,
            min_version=package_version,
            killbefore=['opera.exe','chrome.exe'])

    if windows_version() < WindowsVersions.Windows10:
        print('Installing: %s' % bin_name_ie)
        install_msi_if_needed(bin_name_ie,
            properties=silent_args,
            min_version=package_version,
            killbefore=['iexplore.exe'])

    # Copying the uninstaller
    if not isdir(app_dir):
        mkdirs(app_dir)
    filecopyto(bin_name_uninstaller, app_dir)

    # Disabling Update
    if iswin64():
        filecopyto('mms.cfg', app_dir)
    else:
        filecopyto('mms.cfg', app_dir)

    # Disabling Scheduled Tasks
    for task in schtasks_to_delete:
        if task_exists(task):
            try:
                delete_task(task)
            except:
                print("Unable to delete the task: %s" % task)

    # Disabling Services
    for service in services_to_disable:
        if service_installed(service):
            try:
                service_disable(service)
            except:
                print("Unable to disable the service: %s" % service)


def uninstall():
    # Initializing variables
    if iswin64():
        app_dir = makepath(os.environ['SYSTEMROOT'],'SysWOW64','Macromed','Flash')
    else:
        app_dir = makepath(os.environ['SYSTEMROOT'],'System32','Macromed','Flash')

    # Uninstalling the package
    run('"%s" %s' % (makepath(app_dir, bin_name_uninstaller), silent_uninst_args))


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = 'https://get.adobe.com/flashplayer/'

    # Getting latest version from official sources
    print('URL used is: %s' % url)
    version = bs_find(url, 'p', 'id', 'AUTO_ID_columnleft_p_version', user_agent='Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0', proxies=proxies).text.split(' ')[-1]
    major_version = version.split('.',1)[0]
    part_dl_url = 'https://download.macromedia.com/get/flashplayer/pdc/%s/' % version

    print("Latest %s version is: %s" % (app_name, version))

    # Downloading latest binaries
    if not isfile(bin_name_ie_string % version):
        wget(part_dl_url + bin_name_ie_string % major_version, bin_name_ie_string % version, proxies=proxies)
    if not isfile(bin_name_firefox_string % version):
        wget(part_dl_url + bin_name_firefox_string % major_version, bin_name_firefox_string % version, proxies=proxies)
    if not isfile(bin_name_chromium_string % version):
        wget(part_dl_url + bin_name_chromium_string % major_version, bin_name_chromium_string % version, proxies=proxies)
    wget('https://fpdownload.macromedia.com/get/flashplayer/current/support/uninstall_flash_player.exe', bin_name_uninstaller, proxies=proxies)

    # Changing version of the package
    control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()
    print('Changing package version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version, list_extensions='msi')




def get_proxies():
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)


def bs_find(url, element, attribute=None, value=None, user_agent=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a user agent for some websites.
    Example: user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0')
    """
    if user_agent:
        page = requests.get(url, proxies=proxies, headers={'User-Agent':'%s' % user_agent}, **kwargs).text
    else:
        page = requests.get(url, proxies=proxies, **kwargs).text
    soup = BeautifulSoup.BeautifulSoup(page, features=features)
    if value:
        return soup.find(element, {attribute: value})
    else:
        return soup.find(element)


def service_disable(service_name):
    """Disabling a service by its service name and stopping it
    """
    import wmi
    c = wmi.WMI()
    for service in c.Win32_Service(Name=service_name):
        service.ChangeStartMode(StartMode="Disabled")
        service.StopService()


def service_change_start_mode(service_name, StartMode):
    """Changing start mode of a service
    Usable values: "Boot" "System" "Automatic" "Manual" "Disabled"
    Informations: https://msdn.microsoft.com/en-us/library/aa384896(v=vs.85).aspx
    """
    import wmi
    c = wmi.WMI()
    for service in c.Win32_Service(Name=service_name):
        service.ChangeStartMode(StartMode=StartMode)


										

  Changelog 


Changelog software url : https://helpx.adobe.com/flash-player/flash-player-releasenotes.html

No changelog
  manifest.sha256 
[["install_flash_player_32.0.0.465_active_x.msi","43deb7d2d92fce81f9c309905367682ca098ac6f602767f8034ad7040bba6383"],["install_flash_player_32.0.0.465_plugin.msi","38116c92264e6c477a8048d0e1d37be988c893bec84923ee364cf78a650f646b"],["install_flash_player_32.0.0.465_ppapi.msi","ae97be0f15b1ea0ffce8348a74152a264a3d81b7f2004377730dbf3e733cf402"],["mms.cfg","e6851f11ae49e338ef98b108dc9fb1e37d9cfc84bb9457bf11aff7ed6da74033"],["setup.py","1d7f89d03eb792a07324413cf1c94a4ee281aa5b8d170eceb96b5b1e5cef5a25"],["uninstall_flash_player.exe","3590bab42e7fc1cde971831c3f0c126c6e4f5de1a403b0136a345a553bd90149"],["WAPT/icon.png","ba6f54cce6e11a6ee93444b9d28db9aa28eeeb841540e46a110058a6d863f98e"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","43d595068fd366cfc0b96843bb3d7191775dc7e4763223ef2dac1101c8d99fdf"]]