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


Viewing file:     NCDevQeth.py (5.24 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""Implementation of the qeth device
"""
## Copyright (C) 2001-2005 Red Hat, Inc.
## Copyright (C) 2001-2005 Harald Hoyer <harald@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.

from netconfpkg.NCDevice import Device, ConfDevice
from netconfpkg.NCDeviceFactory import getDeviceFactory
from netconfpkg.NC_functions import QETH, getDebugLevel
from netconfpkg.plugins.NCDevEthernet import DevEthernet
from netconfpkg.NCHardwareList import getHardwareList, HW_CONF
import os

_devQethDialog = None
_devQethWizard = None

class DevQeth(DevEthernet):  
   def __init__(self, list = None, parent = None):
      DevEthernet.__init__(self, list, parent)
      self.Type = QETH
       
   def isType(self, device):
      """returns true of the device is of the same type as this class"""
      if device.Type == QETH:
         return true
      if getDeviceType(device.Device) == QETH:
         return true
      return false

   def load(self, name):
      Device.load(self, name)
      conf = ConfDevice(name)
      self.Type = QETH
      if conf.has_key("SUBCHANNELS"):         
         hardwarelist = getHardwareList()
         hw = None
         for hw in hardwarelist:
            if hw.Name == self.Device and hw.Type == QETH:
               break
         else:
            i = hardwarelist.addHardware(QETH)
            hw = hardwarelist[i]
            hw.Status = HW_CONF
            hw.Name = self.Device
            hw.Type = QETH

         hw.Description = "qeth %s" % conf["SUBCHANNELS"]
         hw.createCard()
         hw.Card.ModuleName = "qeth"
         try:
            hw.MacAddress = conf["MACADDR"]
         except:
            pass

         try:
            ports = conf["SUBCHANNELS"].split(",")
            hw.Card.IoPort = ports[0]
            hw.Card.IoPort1 = ports[1]
            hw.Card.IoPort2 = ports[2]            
            hw.Card.Options = conf["OPTIONS"]
         except:
            pass

         hw.commit(changed=False)
         hardwarelist.commit(changed=False)
         
   def save(self):
      Device.save(self)
      conf = ConfDevice( self.DeviceId )
      conf["TYPE"]="Ethernet"
      if not self.Alias:
         conf["NETTYPE"]="qeth"
         ports = ""
         hardwarelist = getHardwareList()
         for hw in hardwarelist:
            if hw.Name == self.Device:
               if hw.MacAddress:
                  conf["MACADDR"] = hw.MacAddress
               else:
                  del conf["MACADDR"]

               if (hw.Card.IoPort and hw.Card.IoPort1 and hw.Card.IoPort2):
                  ports = "%s,%s,%s" % (hw.Card.IoPort, hw.Card.IoPort1, hw.Card.IoPort2)
               break
         if ports:
            conf["SUBCHANNELS"] = ports
         if hw.Card.Options:
            conf["OPTIONS"] = hw.Card.Options
         else:
            if conf.has_key("OPTIONS"):
               del conf["OPTIONS"]
         
      conf.write()

   def getDialog(self):
      """get the qeth configuration dialog"""
      if not _devQethDialog:
         return None
      dialog =  _devQethDialog(self)
      if hasattr(dialog, "xml"):
         return dialog.xml.get_widget("Dialog")

      return dialog
    
   def getWizard(self):
      """get the wizard of the qeth wizard"""
      return _devQethWizard

   def deactivate( self, dialog = None ):
      ret = DevEthernet.deactivate(self, dialog)
      if not self.Alias:
         hardwarelist = getHardwareList()
         for hw in hardwarelist:
            if hw.Name == self.Device and (hw.Card.IoPort and hw.Card.IoPort1 and hw.Card.IoPort2):      
               os.system("echo 0 > /sys/bus/ccwgroup/drivers/qeth/%s/online; echo 1 > /sys/bus/ccwgroup/drivers/qeth/%s/ungroup" % (hw.Card.IoPort, hw.Card.IoPort))
               break
            
      return ret

   def activate( self, dialog = None ):
      """activate the qeth device"""
      if not self.Alias:
         hardwarelist = getHardwareList()
         for hw in hardwarelist:
            if hw.Name == self.Device and (hw.Card.IoPort and hw.Card.IoPort1 and hw.Card.IoPort2):               
               os.system('SUBSYSTEM="ccw" DEVPATH="bus/ccwgroup/drivers/qeth/%s" /lib/udev/ccw_init' % hw.Card.IoPort)
               break
         
      return DevEthernet.activate(self, dialog)

def setDevQethDialog(dialog):
   """Set the qeth dialog class"""
   global _devQethDialog
   _devQethDialog = dialog

def setDevQethWizard(wizard):
   """Set the qeth wizard class"""
   global _devQethWizard
   _devQethWizard = wizard


import os
machine = os.uname()[4]
if machine == 's390' or machine == 's390x':
   _df = getDeviceFactory()
   _df.register(DevQeth, QETH)
   del _df


__author__ = "Harald Hoyer <harald@redhat.com>"

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