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 :  /lib/linuxmint/mintMenu/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/linuxmint/mintMenu/plugins/get_apt_cache.py
#!/usr/bin/python3

import sys

import apt_pkg

if len(sys.argv) != 2:
    sys.exit(1)
try:
    apt_pkg.init()
    cache = apt_pkg.Cache()
    package_records = apt_pkg.PackageRecords(cache)
    known_packages = set()
    with open(sys.argv[1], "w") as f:
        for pkg in cache.packages:
            if pkg.selected_state or not pkg.version_list or pkg.name in known_packages:
                continue
            name = pkg.name
            package_records.lookup(pkg.version_list.pop(0).translated_description.file_list.pop(0))
            summary = package_records.short_desc
            description = package_records.long_desc.replace(summary + "\n ", "").replace("\n .\n ", "~~~").replace("\n", "")
            f.write("CACHE###%s###%s###%s\n" % (name, summary, description))
            known_packages.add(name)
except Exception as e:
    print("ERROR###ERROR###ERROR###ERROR")
    print(e)
    sys.exit(1)

Youez - 2016 - github.com/yon3zu
LinuXploit