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


Viewing file:     providerdb.py (7.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
## Copyright (C) 2001-2005 Red Hat, Inc.
## Copyright (C) 2001, 2002 Than Ngo <than@redhat.com>
## Copyright (C) 2001-2005 Harald Hoyer <harald@redhat.com>
## Copyright (C) 2001, 2002 Philipp Knirsch <pknirsch@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.

import sys
import signal
import os
import string
import re
from netconfpkg.gui import GUI_functions


## FIXME
provider_db = "providerdb"
if not os.path.exists(provider_db):
    provider_db = "netconfpkg/" + "providerdb"
if not os.path.exists(provider_db):
    provider_db = GUI_functions.NETCONFDIR + "providerdb"
if not os.path.exists(provider_db):
    provider_db = GUI_functions.NETCONFDIR + "netconfpkg/" + "providerdb"

class provider:
    def __init__(self):
        self.provider_data = []
        self.clear()
        pass
    
    def clear(self):
        self.country = ""
        self.city = ""
        self.flag = ""
        self.name = ""
        self.connection_type = ""
        self.user_name = ""
        self.password = ""
        self.areacode = ""
        self.phone = ""
        self.domain = ""
        self.dns = ""
        self.netmask = ""
        self.encap = ""
        self.layer = ""
        self.auth_type = ""
        self.ip_mode = ""
    
    def get_country(self):
        return self.country

    def set_country(self, country):
        self.country = country
    
    def get_city(self):
        return self.city

    def set_city(self, city):
        self.city = city

    def get_flag(self):
        return self.flag

    def set_flag(self, flag):
        self.flag = flag

    def get_name(self):
        return self.name

    def set_name(self, name):
        self.name = name

    def get_connection_type(self):
        return self.connection_type

    def set_connection_type(self, connection_type):
        self.connection_type= connection_type

    def get_user_name(self):
        return self.user_name

    def set_user_name(self, user_name):
        self.user_name = user_name

    def get_password(self):
        return self.password

    def set_password(self,password):
        self.password = password
        
    def get_areacode(self):
        return self.areacode

    def set_areacode(self, areacode):
        self.areacode = areacode
    
    def get_phone(self):
        return self.phone
    
    def set_phone(self, phone):
        self.phone = phone
    
    def get_domain(self):
        return self.domain

    def set_domain(self, domain):
        self.domain = domain
    
    def get_dns(self):
        return self.dns

    def set_dns(self, dns):
        self.dns = dns
    
    def get_netmask(self):
        return self.netmask

    def set_netmask(self, netmask):
        self.netmask = netmask

    def get_encap(self):
        return self.encap

    def set_encap(self, encap):
        self.encap = encap
    
    def get_layer(self):
        return self.layer

    def set_layer(self, layer):
        self.layer = layer
    
    def get_auth_type(self):
        return self.auth_type
    
    def set_auth_type(self, auth_type):
        self.auth_type = auth_type
    
    def get_ip_mode(self):
        return self.ip_mode

    def set_ip_mode(self, ip_mode):
        self.ip_mode = ip_mode
    
    def get_provider_data(self):
        self.provider_data = {'Country' : self.country,
                              'City' : self.city,
                              'Flag' : self.flag,
                              'ProviderName' : self.name,
                              'ConnectionType' : self.connection_type,
                              'Login': self.user_name,
                              'Password' : self.password,
                              'Areacode' : self.areacode,
                              'PhoneNumber' : self.phone,
                              'Domain' : self.domain,
                              'DNS' : self.dns,
                              'Netmask' : self.netmask,
                              'EncapMode': self.encap,
                              'Layer2' : self.layer,
                              'Authentication': self.auth_type,
                              'IpMode' : self.ip_mode }
        
        return self.provider_data

def get_value(s):
    s = string.split(s, " ", 1)
    return string.strip(s[1])

def get_provider_list(Type="isdn"):
    db_list = []
    if not os.path.exists(provider_db):
        return db_list

    db = open(provider_db, "r")
    line = db.readline()
    Type = string.lower(Type)
    
    while line:
        line = string.strip(line)
        if len(line) == 0 or line[0] == "#":
            line = db.readline()
            continue

        if line[:7] != "[Begin]":
            print "error: expect [Begin]"
            return db_list

        isp = provider()
        
        while line[:5] != "[End]":
            line = string.strip(line)
            if line[:9] == "[Country]":
                isp.set_country(get_value(line))
            elif line[:6] == "[Flag]":
                isp.set_flag(get_value(line))
            elif line[:6] == "[City]":
                isp.set_city(get_value(line))
            elif line[:6] == "[Name]":
                isp.set_name(get_value(line))
            elif line[:6] == "[Type]":
                isp.set_connection_type(get_value(line))
            elif line[:6] == "[User]":
                isp.set_user_name(get_value(line))
            elif line[:6] == "[Pass]":
                isp.set_password(get_value(line))
            elif line[:8] == "[Prefix]":
                isp.set_areacode(get_value(line))
            elif line[:7] == "[Phone]":
                isp.set_phone(get_value(line))
            elif line[:8] == "[Domain]":
                isp.set_domain(get_value(line))
            elif line[:5] == "[DNS]":
                isp.set_dns(get_value(line))
            elif line[:9] == "[Netmask]":
                isp.set_netmask(get_value(line))
            elif line[:8] == "[Encaps]":
                isp.set_encap(get_value(line))
            elif line[:8] == "[Layer2]":
                isp.set_layer(get_value(line))
            elif line[:6] == "[Auth]":
                isp.set_auth_type(get_value(line))
            elif line[:9] == "[Ipsetup]":
                isp.set_ip_mode(get_value(line))
            line = db.readline()

        if re.search(Type, isp.get_connection_type()):
            isp.set_connection_type(Type)
            db_list.append(isp.get_provider_data())
        line = db.readline()

    db.close()

    return db_list

if __name__ == "__main__":
    a = get_provider_list("modem")
    for db in a:
        print db

__author__ = "Harald Hoyer <harald@redhat.com>"
__date__ = "$Date: 2005/03/30 13:59:01 $"
__version__ = "$Revision: 1.10 $"

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