!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-date/   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:     zonetab.py (3.56 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#
# zonetab.py: timezone classes
#
# Copyright 2001, 2002, 2003 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.
#
#Originally written by Matt Wilson <msw@redhat.com>
#Additions by Brent Fox <bfox@redhat.com>

import string
import re
import math

class ZoneTabEntry:
    def __init__ (self, code=None, lat=None, long=None, tz=None, comments=None):
        self.code = code
        self.lat = lat
        self.long = long
        self.tz = tz
        self.comments = comments

class ZoneTab:
    def __init__ (self, fn='/usr/share/zoneinfo/zone.tab'):
        self.entries = []
        self.readZoneTab (fn)
        self.addNoGeoZones ()

    def getEntries (self):
        return self.entries

    def findEntryByTZ (self, tz):
        for entry in self.entries:
            if entry.tz == tz:
                return entry
        return None

    def findNearest (self, long, lat, longmin, latmin, longmax, latmax):
        #print "findNearest:", long, lat, longmin, longmax, longmax, latmax
        nearestEntry = None
        if longmin <= long <= longmax and latmin <= lat <= latmax:
            min = -1
            for entry in self.entries:
                if not (entry.lat and entry.long and latmin <= entry.lat <= latmax and longmin <= entry.long <= longmax):
                    continue
                dx = entry.long - long
                dy = entry.lat - lat
                dist = (dy * dy) + (dx * dx)
                if dist < min or min == -1:
                    min = dist
                    nearestEntry = entry
        return nearestEntry

    def convertCoord (self, coord, type="lat"):
        if type != "lat" and type != "long":
            raise TypeError, "invalid coord type"
        if type == "lat":
            deg = 3
        else:
            deg = 4
        degrees = string.atoi (coord[0:deg])
        order = len (coord[deg:])
        minutes = string.atoi (coord[deg:])
        if degrees > 0:
            return degrees + minutes/math.pow (10, order)
        return degrees - minutes/math.pow (10, order)
        
    def readZoneTab (self, fn):
        f = open (fn, 'r')
        comment = re.compile ("^#")
        coordre = re.compile ("[\+-]")
        while 1:
            line = f.readline ()
            if not line:
                break
            if comment.search (line):
                continue
            fields = string.split (line, '\t')
            if len (fields) < 3:
                continue
            code = fields[0]
            split = coordre.search (fields[1], 1)
            lat = self.convertCoord (fields[1][:split.end () - 1], "lat")
            long = self.convertCoord (fields[1][split.end () - 1:], "long")
            tz = string.strip (fields[2])
            if len (fields) > 3:
                comments = string.strip (fields[3])
            else:
                comments = None
            entry = ZoneTabEntry (code, lat, long, tz, comments)
            self.entries.append (entry)

    def addNoGeoZones (self):
        nogeotzs = ['UTC']
        for offset in xrange (-14, 13):
            if offset < 0:
                tz = 'GMT%d' % offset
            elif offset > 0:
                tz = 'GMT+%d' % offset
            else:
                tz = 'GMT'
            nogeotzs.append (tz)
        for tz in nogeotzs:
            self.entries.append (ZoneTabEntry (None, None, None, "Etc/" + tz, None))


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