!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/share/rhn/up2date_client/   drwxr-xr-x
Free 3.84 GB of 27.03 GB (14.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     messageWindow.py (3.86 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/python

import string

import gtk
from rhpl.translate import _, N_

# wrap a long line...
def wrap_line(line, max_line_size = 100):
    if len(line) < max_line_size:
        return line
    ret = []
    l = ""
    for w in string.split(line):
        if not len(l):
            l = w
            continue
        if len(l) > max_line_size:
            ret.append(l)
            l = w
        else:
            l = "%s %s" % (l, w)
    if len(l):
        ret.append(l)
    return string.join(ret, '\n')

# wrap an entire piece of text
def wrap_text(txt):
    return string.join(map(wrap_line, string.split(txt, '\n')), '\n')

def addFrame(dialog):
    contents = dialog.get_children()[0]
    dialog.remove(contents)
    frame = gtk.Frame()
    frame.set_shadow_type(gtk.SHADOW_OUT)
    frame.add(contents)
    dialog.add(frame)

class MessageWindow:
    def getrc (self):
        return self.rc

    def hide(self):
        self.dialog.hide()
        self.dialog.destroy()
        gtk.main_iteration()

    def __init__ (self, title, text, type="ok", default=None, parent=None):
        self.rc = None
        if type == 'ok':
            buttons = gtk.BUTTONS_OK
            style = gtk.MESSAGE_INFO
        elif type == 'warning':
            buttons = gtk.BUTTONS_OK
            style = gtk.MESSAGE_WARNING
        elif type == 'okcancel':
            buttons = gtk.BUTTONS_OK_CANCEL
            style = gtk.MESSAGE_WARNING
        elif type == 'yesno':
            buttons = gtk.BUTTONS_YES_NO
            style = gtk.MESSAGE_QUESTION
        elif type == "error":
            buttons = gtk.BUTTONS_OK
            style = gtk.MESSAGE_ERROR
        elif type == "question":
            buttons = gtk.BUTTONS_YES_NO
            style = gtk.MESSAGE_QUESTION

        # this seems to be wordwrapping text passed to
        # it, which is making for ugly error messages
        self.dialog = gtk.MessageDialog(parent, 0, style, buttons, text)
        self.dialog.label.set_line_wrap(gtk.FALSE)
        if default == "no":
            self.dialog.set_default_response(0)
        elif default == "yes" or default == "ok":
            self.dialog.set_default_response(1)
        else:
            self.dialog.set_default_response(0)

        addFrame(self.dialog)
        self.dialog.set_position (gtk.WIN_POS_CENTER)
        self.dialog.show_all ()
        rc = self.dialog.run()
        if rc == gtk.RESPONSE_OK or rc == gtk.RESPONSE_YES:
            self.rc = 1
        elif (rc == gtk.RESPONSE_CANCEL or rc == gtk.RESPONSE_NO
            or rc == gtk.RESPONSE_CLOSE):
            self.rc = 0
        self.dialog.destroy()

class ErrorDialog(MessageWindow):
    def __init__ (self, text, parent=None):
        MessageWindow.__init__(self,_("Error:"),
                               text,
                               type="error",
                               parent=parent)

class WarningDialog(MessageWindow):
    def __init__ (self, text, parent=None):
        MessageWindow.__init__(self, _("Warning:"),
                               text,
                               type="warning",
                               parent=parent)

class OkDialog(MessageWindow):
    def __init__ (self, text, parent=None):
        MessageWindow.__init__(self, _("OK dialog:"),
                               text,
                               type="ok",
                               parent=parent)

    
class YesNoDialog(MessageWindow):
    def __init__ (self, text, parent=None):
        MessageWindow.__init__(self,_("Yes/No dialog:"),
                               text,
                               type="yesno",
                               parent=parent)

class QuestionDialog(MessageWindow):
    def __init__ (self, text, parent=None):
        MessageWindow.__init__(self,_("Question dialog:"),
                               text,
                               type="question",
                               parent=parent)


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0031 ]--