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

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/usr/lib/python2.4/site-packages/pirut/   drwxr-xr-x
Free 50.78 GB of 127.8 GB (39.73%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     DetailsDialog.py (6.19 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright 2005-2007  Red Hat, Inc.
#
# Jeremy Katz <katzj@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

import os
# # Python gettext:
# import gettext

import gtk
import gtk.glade
import gobject

from constants import *

from rhpl.translate import _, N_

if os.access("data/yumhelpers.glade", os.R_OK):
    gygladefn = "data/yumhelpers.glade"
else:
    gygladefn = "/usr/share/pirut/ui/yumhelpers.glade"

# # Python gettext:
# t = gettext.translation(I18N_DOMAIN, "/usr/share/locale", fallback = True)
# _ = t.lgettext

class PirutDetailsDialog:
    def __init__(self, parent = None, type = gtk.MESSAGE_INFO,
                 buttons = None, text = None, secondary = None):
        self.xml = gtk.glade.XML(gygladefn, domain="pirut")
        self.dialog = self.xml.get_widget("graphicalYumDetailsDialog")
        if parent:
            self.parent = parent
            self.dialog.set_transient_for(parent)
            self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
        self.dialog.set_icon_name(self._get_stock_from_type(type))

        self.timeout = None
        self.countdownID = None
        self.timeoutID = None

        i = self.xml.get_widget("graphicalYumDetailsImage")
        i.set_from_stock(self._get_stock_from_type(type), 6)

        e = self.xml.get_widget("graphicalYumDetailsExpander")
        e.hide()

        if text:
            self.set_markup(text)
            self.dialog.set_title(text)
        if secondary:
            self.format_secondary_text(secondary)
        if buttons and buttons != gtk.BUTTONS_NONE:
            self.set_buttons(buttons)

    def show_all(self):
        pass

    def hide(self):
        self.dialog.hide()

    def _get_stock_from_type(self, type):
        if type == gtk.MESSAGE_ERROR:
            return 'gtk-dialog-error'
        elif type == gtk.MESSAGE_WARNING:
            return 'gtk-dialog-warning'
        elif type == gtk.MESSAGE_QUESTION:
            return 'gtk-dialog-question'
        elif type == gtk.MESSAGE_INFO:
            return 'gtk-dialog-info'
        else:
            return 'gtk-dialog-info'

    def set_markup(self, text):
        l = self.xml.get_widget("graphicalYumDetailsPrimaryLabel")
        l.set_markup("<span weight=\"bold\" size=\"large\">" + text + "</span>")
        
    def format_secondary_text(self, text):
        l = self.xml.get_widget("graphicalYumDetailsSecondaryLabel")
        l.set_markup(text)

    def format_secondary_markup(self, text):
        self.format_secondary_text(text)

    def set_buttons(self, button_list):
        if button_list == gtk.BUTTONS_OK:
            button_list = [('gtk-ok', gtk.RESPONSE_OK)]
        buttons = map(lambda x: apply(self.add_button, x), button_list)
        last = button_list[-1]
        self.dialog.set_default_response(last[1])
        return buttons

    def add_button(self, text, rid, image = None):
        b = self.dialog.add_button(text, rid)
        if image:
            b.set_image(gtk.image_new_from_stock(image, gtk.ICON_SIZE_BUTTON))
        return b

    def set_default_response(self, rid):
        self.dialog.set_default_response(rid)

    def set_details(self, text = None, buffer = None):
        if buffer:
            b = buffer
        elif text:
            b = gtk.TextBuffer()
            b.set_text(text)
        else:
            # FIXME: should we raise an error for this?
            return 
        details = self.xml.get_widget("graphicalYumDetails")
        details.set_buffer(b)
        e = self.xml.get_widget("graphicalYumDetailsExpander")
        e.show()
        e.connect("activate", self._detailsActivated)

        l = self.xml.get_widget("detailsLabel")
        l.set_text("_Details")
        l.set_property("use-underline", True)

    def expand_details(self):
        e = self.xml.get_widget("graphicalYumDetailsExpander")
        e.activate()

    def _detailsActivated(self, *args):
        if self.timeout is not None:
            gobject.source_remove(self.timeoutID)            
            gobject.source_remove(self.countdownID)
            self.timeout = None
            self.l.hide()

    def _timedOut(self, default):
        if default:
            self.dialog.response(default)
        else:
            self.dialog.response(gtk.RESPONSE_OK)

    def _countdown(self):
        self.timeout -= 1
        if self.timeout >= 0:
            # # Python gettext:
            # txt = t.ngettext("Will continue in %d second...",
            #                  "Will continue in %d seconds...",
            #                  self.timeout) %(self.timeout,)
            
            # Gah, rhpl fails:
            if self.timeout != 1:
                txt = _("Will continue in %d seconds...") % (self.timeout,)
            else:
                txt = _("Will continue in %d second...") % (self.timeout,)
            self.l.set_markup("<i>%s</i>" %(txt,))
            return True
        return False

    def run(self, timeout = None, default = None):
        if timeout:
            self.timeout = timeout + 1
            self.l = gtk.Label()
            self.l.set_property("xalign", 0.0)
            self._countdown()
            v = self.xml.get_widget("vbox2")
            v.pack_start(self.l)
            self.countdownID = gobject.timeout_add(1000, self._countdown)
            self.timeoutID = gobject.timeout_add(timeout * 1000,
                                                 self._timedOut, default)
        self.dialog.show()
        rc = self.dialog.run()
        if self.timeout is not None:
            gobject.source_remove(self.countdownID)
            gobject.source_remove(self.timeoutID)            
        return rc

    def destroy(self):
        return self.dialog.destroy()

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0136 ]--