!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/pymodules/python2.6/deskbar/handlers/actions/   drwxr-xr-x
Free 129.81 GB of 142.11 GB (91.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     OpenFileAction.py (1.78 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from deskbar.core.Utils import url_show_file
from gettext import gettext as _
import deskbar.interfaces.Action
import gio
import logging

LOGGER = logging.getLogger(__name__) 

class OpenFileAction(deskbar.interfaces.Action):
    """
    Open file with its preferred application
    """
    
    def __init__(self, name, url, escape=True):
        """
        @param uri: URI pointing to the file.
        (has to start with 'file://')
        @param escape: Whether to escape the URI
        """
        deskbar.interfaces.Action.__init__(self, name)
        self._url = url
        self._escape = escape
    
    def get_icon(self):
        return "gtk-open"
    
    def _get_unescaped_url_without_protocol(self):
        return gio.File(uri=self._url).get_path()
    
    def is_valid(self):
        gfile = gio.File (uri=self._url)

        if not gfile.query_exists():
            LOGGER.debug("File %s does not exist", gfile.get_uri ())
            return False
        else:
            try: 
                fileinfo = gfile.query_info("standard::content-type")
                returnval = gio.app_info_get_default_for_type(
                                fileinfo.get_content_type(), True) != None
            except Exception, e:
                # get_mime_type throws a RuntimeException when something went wrong
                returnval = False
        if not returnval:
            LOGGER.debug("File %s has no default application", gfile.get_uri ())
        return returnval
    
    def get_hash(self):
        return self._url
        
    def get_verb(self):
        return _("Open %s") % "<b>%(name)s</b>"
    
    def activate(self, text=None):
        url_show_file(self._url, escape=self._escape)
        
    def get_tooltip(self, text=None):
        return self._get_unescaped_url_without_protocol()

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0086 ]--