tis-dropbox

135.3.4169-9
Dropbox is a file hosting service operated by the American company Dropbox, Inc.
27374 downloads
Download See VirusTotal scan
tis-dropbox icon
  • package : tis-dropbox
  • name : Dropbox
  • version : 135.3.4169-9
  • categories : Utilities
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • installed_size : 475889664
  • editor : Dropbox
  • licence : Proprietary
  • signature_date : 2021-11-05T15:59:50.918662
  • size : 140.95 Mo
  • locale : all
  • target_os : windows
  • impacted_process : Dropbox,DropboxUpdate
  • architecture : all
  • Homepage : https://www.dropbox.com
package           : tis-dropbox
version           : 135.3.4169-9
architecture      : all
section           : base
priority          : optional
name              : Dropbox
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Dropbox is a file hosting service operated by the American company Dropbox, Inc.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 1.7
sources           : https://www.dropbox.com/install
installed_size    : 475889664
impacted_process  : Dropbox,DropboxUpdate
description_fr    : Dropbox est un service de stockage et de partage de copies de fichiers locaux en ligne proposé par Dropbox, Inc.
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : Dropbox
keywords          : Cloud
licence           : Proprietary
homepage          : https://www.dropbox.com
package_uuid      : b64824ee-ec0e-4d8b-a3eb-6baa3e7a796f
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.dropboxforum.com/t5/Desktop-client-builds/bd-p/101003016
min_os_version    : 5.1
max_os_version    : 
icon_sha256sum    : d7cf7b7a7280b72d585dd2b1a90a231b482b0a92be35d73080809414648565d9
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : BbUYoofC1lNoNI9xjI0NDsN2dGoFfhRIGbidHrGYYiuw+SxC7Yy2PVYeZoUAi7HI9GlIfjDtSNq8AL6fwuZ9U39qMHn2zD2dEIEFMUrf0Oj7QPfPWMPdZ7l0Oh0t5kHJJgEM8krIKUajOa8eziwXtypkxv7yCyqSmiYawK1uL1178duf0JwNYfA2zrIeG6wjVU3Z3HPUAgRnE7bAiZr5TVTiGsuY18qPvz/OMkw8L3KYyQuOgQ1oKVZycqnVSUyXDja3zSjYn+U40uwA7VhNNpUwGFuySe2ToCVIyuXqdx+Zz0MxwOSysQ4qot838Vn5oGsziUStT0/yuLR1AOdI8w==
signature_date    : 2021-11-05T15:59:50.918662
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *
import requests
import platform
import time

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'Dropbox_%s_Offline_Installer.exe'
silent_args = '/S'
app_uninstallkey = 'Dropbox'
app_updater_dir = makepath(programfiles32,'Dropbox','Update')
schtasks_to_disable = ('DropboxUpdateTaskMachineCore','DropboxUpdateTaskMachineUA')
services_to_disable = ('dbupdate','dbupdatem') # 'DbxSvc'


def install():
    # Initializing variables
    package_version = control.version.split('-',1)[0]
    bin_name = bin_name_string % package_version
    processes_to_kill = control.impacted_process.split(',')

    # Installing the package
    print('Installing: %s' % bin_name)
    install_exe_if_needed(bin_name,
        silentflags=silent_args,
        key=app_uninstallkey,
        min_version=package_version)

    # Disabling Automatic Updates
    killalltasks(processes_to_kill)
    if isdir(app_updater_dir):
        remove_tree(app_updater_dir)

    # Disabling Scheduled Tasks
    for task in schtasks_to_disable:
        if task_exists(task):
            try:
                disable_task(task)
            except:
                print('Unable to disable the task: %s' % task)

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

    cmd = uninstall_cmd('{099218A5-A723-43DC-8DB5-6173656A1E94}')
    run(cmd)
    """ # Disabling system startup
    if reg_value_exists(HKEY_LOCAL_MACHINE,'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run','Dropbox'):
        registry_delete(HKEY_LOCAL_MACHINE,'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run','Dropbox') """



def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name

    # Getting latest version from official website
    url_dl = requests.head('https://www.dropbox.com/download?plat=win&type=full',proxies=proxies).headers['Location']
    latest_bin = url_dl.rsplit('/',1)[1].replace('%20', '_')
    version = latest_bin.split('_')[1]

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

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl, latest_bin, 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 version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




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 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)



adb97806502a201ab1978dbcfe7dcd50d7276702630cfffd56f1a72727688d09 : Dropbox_135.3.4169_Offline_Installer.exe
7bef3a4b35b6adbf48a28fc25c57daf9c7003df47e1b17472e7b03ad953fe424 : setup.py
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
d7cf7b7a7280b72d585dd2b1a90a231b482b0a92be35d73080809414648565d9 : WAPT/icon.png
4ba71628b0183a7eb18ba4b95d7fe425f10ccd126ce697a4dc81aec78a59fd77 : WAPT/control