!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/share/system-config-securitylevel/   drwxr-xr-x
Free 52.23 GB of 127.8 GB (40.87%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     trustedchecklist.py (6.01 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#
# trustedchecklist.py: A class (derived from GtkTreeView) that provides a list
#               of checkbox / text string pairs with an extra dependent
#               checkbox
# "Inspired" heavily by checklist.py
#
# nix@go-nix.ca
# Brent Fox <bfox@redhat.com>
# Jeremy Katz <katzj@redhat.com>
#
# Copyright 2001-2005 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
#
# You should have received a copy of the GNU Library Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

import gtk
import gobject

##
## I18N
## 
from rhpl.translate import _, N_
import rhpl.translate as translate
translate.textdomain ("system-config-securitylevel")

class TrustedCheckList (gtk.TreeView):
    """A class (derived from gtk.TreeView) that provides a list of
    checkbox / text string pairs with an extra dependent checkbox"""

    def __init__ (self):
        self.store = gtk.ListStore(gobject.TYPE_BOOLEAN,
                                   gobject.TYPE_STRING, gobject.TYPE_BOOLEAN)
        gtk.TreeView.__init__ (self, self.store)
        
        self.ifcheckboxrenderer = gtk.CellRendererToggle()
        renderer = gtk.CellRendererText()
        column = gtk.TreeViewColumn(_("Name"), renderer, text=1)
        column.set_clickable (False)
        self.append_column(column)

        column = gtk.TreeViewColumn(_("Trusted"), self.ifcheckboxrenderer, active=0)
        #column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
        #column.set_fixed_width(20)
        column.set_clickable(True)
        self.ifcheckboxrenderer.connect ("toggled", self.toggled_item)        
        self.append_column(column)
        self.dirty=False

        self.masqcheckboxrenderer = gtk.CellRendererToggle()
    column = gtk.TreeViewColumn(_("Masquerade"), self.masqcheckboxrenderer, active=2)
        #column.add_attribute (self.masqcheckboxrenderer, "sensitive", 0)
        #column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
        #column.set_fixed_width(20)
        column.set_clickable(True)
        self.masqcheckboxrenderer.connect ("toggled", self.toggled_masq)
        self.append_column(column)

        self.set_rules_hint(False)
        self.set_headers_visible(True)
        self.columns_autosize()
        self.set_enable_search(False)

        # keep track of the number of rows we have so we can
        # iterate over them all
        self.num_rows = 0

    def append_row (self, text, init_value):
        """Add a row to the list.
        text: text to display in the row
        init_value: initial state of the indicator"""

        iter = self.store.append()
        self.store.set_value(iter, 0, init_value)

        self.store.set_value(iter, 1, text)

        self.num_rows = self.num_rows + 1


    def toggled_item(self, data, row):
        """Set a function to be called when the value of a row is toggled.
        The function will be called with two arguments, the clicked item
        in the row and a string for which row was clicked."""
        
        iter = self.store.get_iter(int(row))
        val = self.store.get_value(iter, 0)
        self.store.set_value(iter, 0, not val)
        if (val):
          self.store.set_value(iter, 2, False)
        self.dirty=True
        
    def toggled_masq(self, data, row):
        """Set a function to be called when the masq value of a row is toggled.
        The function will be called with two arguments, the clicked item
        in the row and a string for which row was clicked. This checkbox can 
        only be active if the corresponding main checkbox is active"""

        iter = self.store.get_iter(int(row))
        trusted = self.store.get_value(iter, 0)
        val = self.store.get_value(iter, 2)
        if (trusted):
          self.store.set_value(iter, 2, not val)
        else:
          self.store.set_value(iter, 2, False)
        self.dirty=True
        
    def clear (self):
        "Remove all rows"
        self.store.clear()
        self.num_rows = 0


    def get_active(self, row):
        """Return FALSE or TRUE as to whether or not the row is toggled
        similar to GtkToggleButtons"""

        iter = self.store.get_iter(row)
        return self.store.get_value(iter, 0)


    def set_active(self, row, is_active):
        "Set row to be is_active, similar to GtkToggleButton"

        iter = self.store.get_iter(row)
        self.store.set_value(iter, 0, is_active)


    def get_masq_active(self, row):
        """Return FALSE or TRUE as to whether or not the dependent checkbox is toggled
        similar to GtkToggleButtons"""

        iter = self.store.get_iter(row)
        return self.store.get_value(iter, 2)


    def set_masq_active(self, row, is_active):
        "Set the dependent checkbox to be is_active, similar to GtkToggleButton"

        iter = self.store.get_iter(row)
        if (self.store.get_value (iter, 0)):
          self.store.set_value(iter, 2, is_active)


    def get_text(self, row, column):
        "Get the text from row and column"

        iter = self.store.get_iter(row)
        return self.store.get_value(iter, column)


    def set_column_title(self, column, title):
        "Set the title of column to title"

        col = self.get_column(column)
        if col:
            col.set_title(title)


    def set_column_min_width(self, column, min):
        "Set the minimum width of column to min"

        col = self.get_column(column)
        if col:
            col.set_min_width(min)


    def set_column_clickable(self, column, clickable):
        "Set the column to be clickable"

        col = self.get_column(column)
        if col:
            col.set_clickable(clickable)
            

    def set_column_sizing(self, column, sizing):
        "Set the column to use the given sizing method"

        col = self.get_column(column)
        if col:
            col.set_sizing(sizing)

    def set_column_sort_id(self, column, id):
        "Set the sort id of column to id"

        col = self.get_column(column)
        if col:
            col.set_sort_column_id(id)

:: 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.0061 ]--