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


Viewing file:     groupWindow.py (5.92 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
## groupWindow.py - event handling code for userconf's group window
## Copyright (C) 2001-2003 Red Hat, Inc.
## Copyright (C) 2001-2003 Brent Fox <bfox@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; either version 2 of the License, or
## (at your option) any later version.

## 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 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., 675 Mass Ave, Cambridge, MA 02139, USA.

## Author: Brent Fox

import signal
import gtk
import string
import libuser
import mainWindow
import messageDialog
import userGroupCheck
import userGroupFind

##
## I18N
##
from rhpl.translate import _, N_
import rhpl.translate as translate
domain = "system-config-users"
translate.textdomain (domain)
gtk.glade.bindtextdomain(domain)

busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)

class groupWindow:

    def __init__(self, parent, user_clist, group_clist, xml):
        self.parent = parent
        self.group_clist = group_clist
        
        self.groupWin = xml.get_widget('newGroupWindow')
        self.groupWin.connect("delete-event", self.on_groupWin_cancel_button_clicked)
        self.groupWin.set_icon(mainWindow.iconPixbuf)
        self.groupWin.set_position(gtk.WIN_POS_CENTER)
        self.groupWinGroupName = xml.get_widget('newGroupNameEntry')
        self.gidBox = xml.get_widget('gidBox')
        self.gidCheckButton = xml.get_widget('gidCheckButton')
        self.gidSpinButton = xml.get_widget('gidSpinButton')
        self.gidSpinButton.set_range(0, pow(2, 32))
        self.gidSpinButton.set_value(500)

        xml.signal_connect("on_groupWin_cancel_button_clicked", self.on_groupWin_cancel_button_clicked)
        xml.signal_connect("on_groupWin_ok_button_clicked", self.on_groupWin_ok_button_clicked)
        xml.signal_connect("on_gidCheckButton_toggled", self.on_gidCheckButton_toggled)

    def busy(self):
        self.groupWin.set_sensitive(False)
        self.groupWin.window.set_cursor(busy_cursor)

    def ready(self):
        self.groupWin.window.set_cursor(ready_cursor)
        self.groupWin.set_sensitive(True)

    def groupWinReset(self):
        self.groupWinGroupName.grab_focus()
        self.groupWinGroupName.set_text("")
        self.gidCheckButton.set_active(False)
        self.gidSpinButton.set_value(500)

    def newGroupWin(self):
        self.groupWinReset()
        self.groupWin.show_all()

    #--------Event handlers for group window-----#
    def on_groupWin_cancel_button_clicked(self, *args):
        self.groupWinReset()
        self.groupWin.hide()
        return True

    def on_gidCheckButton_toggled(self, *args):
        self.gidBox.set_sensitive(self.gidCheckButton.get_active())

    def on_groupWin_ok_button_clicked(self, *args):
        self.busy()
        groupName = self.groupWinGroupName.get_text()

        #Check for ascii-only strings
        if not userGroupCheck.isGroupnameOk(groupName, self.groupWinGroupName):
            self.ready()
            self.groupWinGroupName.grab_focus()
            return

        if groupName == "":
            messageDialog.show_message_dialog(_("Please enter a group name."))
            self.ready()
            self.groupWinGroupName.set_text("")
            self.groupWinGroupName.grab_focus()
            return

        group = self.parent.ADMIN.lookupGroupByName(groupName)
        if group != None:
            messageDialog.show_message_dialog(_("A group with name '%s' already exists." %groupName))
            self.ready()
            self.groupWinGroupName.set_text("")
            self.groupWinGroupName.grab_focus()
            return

        groupEnt = self.parent.ADMIN.initGroup(groupName)
        # workaround bug with purely numerical names in ADMIN.initGroup ()
        groupEnt.set (libuser.GROUPNAME, groupName)
        cn = groupEnt.get(libuser.GROUPNAME)[0]

        if self.gidCheckButton.get_active() == True:
            gidNumber = int(self.gidSpinButton.get_value())

            gid = self.parent.ADMIN.lookupGroupById(gidNumber)
            if gid != None:
                #This uid already exists, so complain
                messageDialog.show_message_dialog(_("The gid %s is already in use.") %gidNumber)
                self.ready()
                self.gidSpinButton.grab_focus()
                return

            if gidNumber < 500:
                dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO,
                                        (_("Creating a group with a GID less than 500 is not recommended.  "
                                           "Are you sure you want to do this?")))
                dlg.set_position(gtk.WIN_POS_CENTER)
                dlg.set_icon(mainWindow.iconPixbuf)
                dlg.set_modal(True)
                dlg.show_all()
                result = dlg.run()
                self.ready()
                self.groupWinGroupName.set_text("")
                self.groupWinGroupName.grab_focus()
                dlg.destroy()

                if result == gtk.RESPONSE_YES:
                    pass
                else:
                    return
        else:
            gidNumber = userGroupFind.find_gid (self.parent.ADMIN, self.parent.preferences)

        groupEnt.set(libuser.GIDNUMBER, [gidNumber])

        members = groupEnt.get(libuser.MEMBERNAME)
        if not members:
            members = []
        memberlist = string.join(members, ", ")

        self.parent.ADMIN.addGroup(groupEnt)
        
        self.groupWinReset()
        self.ready()
        self.groupWin.hide()

        self.parent.refresh_users_and_groups([cn])

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