Détails du package
smp-keepass
Revenir à la liste des packages
Version officielle sur le site de l'editeur : 2.50
Fichier control :
package : smp-keepass
version : 2.46-1
architecture : all
section : base
priority : optional
name :
categories :
maintainer : Simon Fonteneau
description : Password Manager KeePass2
depends :
conflicts :
maturity :
locale : all
target_os : windows
min_os_version :
max_os_version :
min_wapt_version : 1.6
sources :
installed_size :
impacted_process : KeePass.exe
description_fr : Gestionnaire de mot de passe KeePass2
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : Dominik Reichl
keywords : password
licence : GPLv2
homepage : https://keepass.info/
package_uuid : c5b7b00e-d809-4cd3-b301-c76b0d1c9764
valid_from :
valid_until :
forced_install_on :
changelog :
signer : wapt.lesfourmisduweb.org
signer_fingerprint: 1e54425be03a2a3ea1a264b40d984c31f17a6a489a3b722acb993cbf6561e903
signature : UuwePWKybW0+gLH3o5UzBcrvyZ/moUs6CmLbsl3ofg0JKjrDgY8xyU51hIaE9Z/044NbG8SkY+D3aaKWavWW8gj0iLS8CguTiRrQgwwy07r8ZzNpwf+CmBgBcnn8wCYkanlvnCovJNUV1FbZmVVAMegNDLvMfSkI5EzlrAWrk7q4y8nNXc+RJ1DgiFjZz518D58om0M53hK1HMqyu0m/n06/CZd6w1LooIkn/gaoQjF6U72bSQDddNjYS7ElVdToGqQgiRRl11tT8Om4hJP36T2mGRia/JvxJ0naVPNbw1AzIL14u4qXfG02BP7vaU5XNi53/c2QY8J13aC48vLqhQ==
signature_date : 2020-09-10T15:28:31.263225
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes
Fichier setup.py :
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
print('installing keepass')
versionpaquet = control['version'].split('-',1)[0]
install_exe_if_needed('KeePass-%s-Setup.exe' % versionpaquet,silentflags='/VERYSILENT',key='KeePassPasswordSafe2_is1',min_version=versionpaquet,killbefore=['KeePass.exe'])
keysoftinfo=installed_softwares('KeePassPasswordSafe2_is1')
for info in keysoftinfo :
installlocation = info['install_location']
for lf in glob.glob('*.lngx'):
if isfile(makepath(installlocation,'Languages',lf)):
remove_file(makepath(installlocation,'Languages',lf))
filecopyto(lf,makepath(installlocation,'Languages'))
def session_setup():
if not isdir(makepath(application_data,'KeePass')):
mkdirs(makepath(application_data,'KeePass'))
config=makepath(application_data,'KeePass','KeePass.config.xml')
loc = get_language().lower()
if loc in list_locales:
LanguageFile = r"""
<LanguageFile>%s</LanguageFile> """ % (list_locales[loc])
else:
LanguageFile = ''
if not isfile(config):
data = r"""<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Meta>
<PreferUserConfiguration>false</PreferUserConfiguration>
<OmitItemsWithDefaultValues>true</OmitItemsWithDefaultValues>
</Meta>
<Application>%s
<LastUpdateCheck>2017-06-13T19:44:53Z</LastUpdateCheck>
<LastUsedFile>
<Path />
<CredProtMode>Obf</CredProtMode>
<CredSaveMode>NoSave</CredSaveMode>
</LastUsedFile>
<MostRecentlyUsed>
<MaxItemCount>12</MaxItemCount>
<Items />
</MostRecentlyUsed>
<WorkingDirectories />
<Start>
<CheckForUpdate>false</CheckForUpdate>
<CheckForUpdateConfigured>true</CheckForUpdateConfigured>
</Start>
<FileOpening />
<FileClosing />
<TriggerSystem>
<Triggers />
</TriggerSystem>
</Application>
<Logging />
<MainWindow>
<X>309</X>
<Y>81</Y>
<Width>662</Width>
<Height>513</Height>
<SplitterHorizontalFrac>0.8333</SplitterHorizontalFrac>
<SplitterVerticalFrac>0.25</SplitterVerticalFrac>
<Layout>Default</Layout>
<ToolBar />
<EntryView />
<TanView />
<EntryListColumnCollection>
<Column>
<Type>Title</Type>
<Width>90</Width>
</Column>
<Column>
<Type>UserName</Type>
<Width>90</Width>
</Column>
<Column>
<Type>Password</Type>
<Width>90</Width>
<HideWithAsterisks>true</HideWithAsterisks>
</Column>
<Column>
<Type>Url</Type>
<Width>90</Width>
</Column>
<Column>
<Type>Notes</Type>
<Width>90</Width>
</Column>
</EntryListColumnCollection>
<EntryListColumnDisplayOrder>0 1 2 3 4</EntryListColumnDisplayOrder>
<ListSorting>
<Order>Ascending</Order>
</ListSorting>
</MainWindow>
<UI>
<TrayIcon />
<Hiding />
<StandardFont>
<Family>Microsoft Sans Serif</Family>
<Size>8.25</Size>
<GraphicsUnit>Point</GraphicsUnit>
<Style>Regular</Style>
<OverrideUIDefault>false</OverrideUIDefault>
</StandardFont>
<PasswordFont>
<Family>Courier New</Family>
<Size>8.25</Size>
<GraphicsUnit>Point</GraphicsUnit>
<Style>Regular</Style>
<OverrideUIDefault>false</OverrideUIDefault>
</PasswordFont>
<BannerStyle>WinVistaBlack</BannerStyle>
<DataEditorFont>
<Family>Microsoft Sans Serif</Family>
<Size>8.25</Size>
<GraphicsUnit>Point</GraphicsUnit>
<Style>Regular</Style>
<OverrideUIDefault>false</OverrideUIDefault>
</DataEditorFont>
<UIFlags>0</UIFlags>
<KeyCreationFlags>0</KeyCreationFlags>
<KeyPromptFlags>0</KeyPromptFlags>
</UI>
<Security>
<WorkspaceLocking>
<LockAfterTime>0</LockAfterTime>
<LockAfterGlobalTime>0</LockAfterGlobalTime>
</WorkspaceLocking>
<Policy />
<MasterPassword>
<MinimumLength>0</MinimumLength>
<MinimumQuality>0</MinimumQuality>
</MasterPassword>
</Security>
<Native />
<PasswordGenerator>
<AutoGeneratedPasswordsProfile>
<GeneratorType>CharSet</GeneratorType>
<Length>20</Length>
<CharSetRanges>ULD_______</CharSetRanges>
</AutoGeneratedPasswordsProfile>
<LastUsedProfile>
<GeneratorType>CharSet</GeneratorType>
<Length>20</Length>
<CharSetRanges>ULD_______</CharSetRanges>
</LastUsedProfile>
<UserProfiles />
</PasswordGenerator>
<Defaults>
<OptionsTabIndex>4</OptionsTabIndex>
<SearchParameters>
<ComparisonMode>InvariantCultureIgnoreCase</ComparisonMode>
</SearchParameters>
<KeySources />
</Defaults>
<Integration>
<HotKeyGlobalAutoType>393281</HotKeyGlobalAutoType>
<HotKeySelectedAutoType>0</HotKeySelectedAutoType>
<HotKeyShowWindow>393291</HotKeyShowWindow>
<HotKeyEntryMenu>0</HotKeyEntryMenu>
<UrlSchemeOverrides>
<BuiltInOverridesEnabled>1</BuiltInOverridesEnabled>
<CustomOverrides />
</UrlSchemeOverrides>
<AutoTypeAbortOnWindows />
<ProxyType>System</ProxyType>
<ProxyAuthType>Auto</ProxyAuthType>
</Integration>
<Custom />
</Configuration>""" % LanguageFile
else:
fichier = open(config, "r")
data = fichier.read()
fichier.close()
#force french
if not '<LanguageFile>' in data:
languagefile=r"""<Application>%s""" % LanguageFile
data = data.replace('<Application>',languagefile)
# disable update
if '<CheckForUpdate>true</CheckForUpdate>' in data :
data = data.replace('<CheckForUpdate>true</CheckForUpdate>','<CheckForUpdate>false</CheckForUpdate>')
fichier = open(config, "w")
fichier.write(data)
fichier.close()
def update_package():
import time
import requests
proxies = {}
if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
if proxywapt :
proxies = {'http':proxywapt,'https':proxywapt}
url = requests.head('https://sourceforge.net/projects/keepass/files/latest/download?source=files',proxies=proxies).headers['Location']
dstzip = requests.head(url,proxies=proxies).headers['Location']
filename = dstzip.rsplit('/',1)[1]
print(filename)
vers = filename.replace('KeePass-','').replace('.zip','')
filenameexe = "KeePass-%s-Setup.exe" %vers
dstexe = dstzip.replace(filename,filenameexe)
print ("Latest Version : " + vers)
exes = glob.glob('*.exe')
for fn in exes:
if fn != filenameexe:
remove_file(fn)
if not isfile(filenameexe):
print('Downloading %s '%(filenameexe))
wget(dstexe,filenameexe)
else:
print('Already up to date, skipped')
os.chdir(os.path.dirname(__file__))
from waptpackage import PackageEntry
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
pe.version = vers + '-0'
pe.save_control_to_wapt(os.getcwd())
for lngx in glob.glob('*.lngx'):
remove_file(lngx)
for line in ensure_unicode(wgets('https://keepass.info/translations.html')).splitlines():
if 'KeePass-%s' % vers[:2] in line :
lfd = line.replace('<td><a href="','').replace('" target="_blank">','')
if not '-Help-' in lfd.rsplit('/',1)[1] :
if not 'Portuguese_BR' in lfd.rsplit('/',1)[1] :
try:
print('Try Download %s' % lfd)
wget(lfd,lfd.rsplit('/',1)[1],connect_timeout=30)
except:
# Try Again
wget(lfd,lfd.rsplit('/',1)[1],connect_timeout=30)
unzip(lfd.rsplit('/',1)[1],target='.')
remove_file(lfd.rsplit('/',1)[1])
time.sleep(2)
list_locales = {
"ar":'Arabic.lngx', # Arabic
"ca":'Catalan.lngx', # Catalan
"zh":'Chinese_Simplified.lngx',# Chinese - Simplified
"zh":'Chinese_Traditional.lngx',# Chinese - Traditional
"co":"French.lngx", # Corsican - France
"hr":'Croatian.lngx', # Croatian
"cs":'Czech.lngx', # Czech
"da":'Danish.lngx', # Danish
"nl":'Dutch.lngx', # Dutch
"et":'Estonian.lngx', # Estonian
"fi":'Finnish.lngx', # Finnish
"fr":'French.lngx', # French
"de":'German.lngx', # German - Germany
"el":'Greek.lngx', # Greek
"he":'Hebrew.lngx', # Hebrew
"hu":'Hungarian', # Hungarian
"is":'Icelandic.lngx', # Icelandic
"id":'Indonesian.lngx', # Indonesian
"it":'Italian.lngx', # Italian - Italy
"ja":'Japanese.lngx', # Japanese
"ko":'Korean.lngx', # Korean
"lv":'Latvian.lngx', # Latvian
"lt":'Lithuanian.lngx', # Lithuanian
"dsb":'German.lngx',# Lower Sorbian - Germany
"nb":'Norwegian_NB.lngx', # Norwegian - Bokmal
"nn":'Norwegian_NB.lngx', # Norwegian - Nynorsk
"ps":'Pashto.lngx', # Pashto - Afghanistan
"fa":'Persian.lngx', # Persian
"pl":'Polish.lngx', # Polish
"pt":'Portuguese_PT.lngx', # Portuguese - Brazil
"ro":'Romanian.lngx', # Romanian - Romania
"ru":'Russian.lngx', # Russian
"sr":'Serbian_Cyrillic.lngx', # Serbian
"sk":'Slovak.lngx', # Slovak
"sl":'Slovenian.lngx', # Slovenian
"es":'Spanish.lngx', # Spanish - Spain
"sv":'Swedish.lngx', # Swedish
"tr":'Turkish.lngx', # Turkish
"ug":'Arabic.lngx', # Arabic
"uk":'Ukrainian.lngx', # Ukrainian
"wen":'German.lngx',# Upper Sorbian - Germany
"vi":'Vietnamese.lngx', # Vietnamese
}
if __name__ == '__main__':
update_package()