tis-patch-ms17-010-smb1flaw

6
patch for smb1 flaw ms17-010 for winxp, win2k3, Win7 and 2008r2
3755 downloads
Download
default icon

  Description 

  • package : tis-patch-ms17-010-smb1flaw
  • version : 6
  • architecture : all
  • categories :
  • maintainer : htouvet-adm
  • description : patch for smb1 flaw ms17-010 for winxp, win2k3, Win7 and 2008r2
  • 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 :
  • editor :
  • licence :
  • signature_date : 2020-02-27T15:10:37.293005

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
from smb_ms17_010 import check

uninstallkey = []

def is_kb_installed(hotfixid):
    installed_update = installed_windows_updates()
    if [kb for kb in installed_update if kb['HotFixID' ].upper() == hotfixid.upper()]:
        return True
    return False

def install():
    try:
        flaw = check('127.0.0.1')
        print('Check localhost : %s' % flaw)
    except Exception as e:
        print('Error checking flaw: %s' % repr(e))
        flaw = []
    if platform.win32_ver()[0]=='XP':
        product = registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\ProductOptions\ProductSuite',None)
        if product == 'EmbeddedNT':
            print('installing patch for MS17-010 for Windows XP Embedded')
            install_exe_if_needed("WindowsXP-KB4012598-x86-Embedded-Custom-ENU.exe",'/quiet',key='',min_version='1')
        else:
            print('installing patch for MS17-010 for winxp')
            install_exe_if_needed("windowsxp-kb4012598-x86-custom-fra_eb47689656c58ab374521babb9bdca07304d87f5.exe",'/quiet',key='',min_version='1')
    elif platform.win32_ver()[0]=='2003Server':
        print('installing patch for MS17-010 for win2k3')
        if iswin64():
            install_exe_if_needed('WindowsServer2003-KB4012598-x64-custom-ENU','/quiet',key='',min_version='1')
        else:
            install_exe_if_needed("windowsserver2003-kb4012598-x86-custom-fra_9cf9ac070a1b21bca6757de5d127427c090d581d.exe",'/quiet',key='',min_version='1')
    elif platform.win32_ver()[0] == '7':
        if not is_kb_installed('kb4012212'):
            if iswin64():
                run('wusa.exe "windows6.1-kb4012212-x64_2decefaa02e2058dcd965702509a992d8c4e92b3.msu" /quiet /norestart',accept_returncodes=[0,3010,2359302,-2145124329],timeout=3600)
            else:
                run('wusa.exe "windows6.1-kb4012212-x86_6bb04d3971bb58ae4bac44219e7169812914df3f.msu" /quiet /norestart',accept_returncodes=[0,3010,2359302,-2145124329],timeout=3600)
        else:
            print('KB4012212 already installed')
    else:
        print ("this package is for winxp, win2k3 and 7 only")
    if flaw:
        error('Please check... :\n %s' % '\n'.join(repr(e) for e in flaw))


										

  Changelog 



No changelog.txt.
									
  manifest.sha256