!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/python2.4/site-packages/repomd/   drwxr-xr-x
Free 3.73 GB of 27.03 GB (13.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test.py (3.68 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/python -tt
# 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2003 Duke University

# classes for parsing the metadata files for the new metadata format


# used with python -i :)
import sys
import os
import time
import rpm
import packageSack
import packageObject
import repoMDObject
import mdUtils
import mdErrors


def process(current, total):
    sys.stdout.write('\r' + ' ' * 80)
    sys.stdout.write('\rNode %d of %d' % (current, total))
    sys.stdout.flush()

if len(sys.argv) < 4:
    print 'test.py: /path/to/repo /other/repo somepackagename'
    sys.exit(1)
   
print time.time()
repos = sys.argv[1:3]
pkgSack = packageSack.XMLPackageSack(packageObject.RpmXMLPackageObject)
numid = 0
for repo in repos:
    numid+=1
    basepath = repo
    repomdxmlfile = os.path.join(basepath, 'repodata/repomd.xml')
    repoid = repo

    try:
        repodata = repoMDObject.RepoMD(repoid, repomdxmlfile)
    except mdErrors.RepoMDError, e:
        print >> sys.stderr, e
        sys.exit(1)
    
    (pbase, phref) = repodata.primaryLocation()
    (fbase, fhref) = repodata.filelistsLocation()
    (obase, ohref) = repodata.otherLocation()
    
    
    processlist = [phref]
    for file in processlist:
        print time.time()
        print 'importing %s from %s' % (file, repoid)
        complete = basepath + '/' + file
        try:
            pkgSack.addFile(repoid, complete, process)
        except mdErrors.PackageSackError, e:
            print >> sys.stderr, e
            sys.exit(1)
            
    print ' '
    print time.time()

for pkg in pkgSack.searchNevra(sys.argv[3]):
    print pkg
    for reqtup in pkg.returnPrco('requires'):
        (reqn, reqf, (reqe,reqv,reqr)) = reqtup
        # rpmlib deps should be handled on their own
        if reqn[:6] == 'rpmlib':
            continue
        # kill self providers, too
        if pkg.checkPrco('provides', reqtup):
            continue
            
        # get a list of all pkgs that match the reqn
        providers = pkgSack.searchProvides(reqn)
        if len(providers) == 0:
            print 'unresolved: %s  %s %s:%s-%s' % (reqn, reqf, reqe, reqv, reqr)
            continue

        if len(providers) == 1:
            if reqf is None:
                print '%s: %s from %s' % (reqn, providers[0], providers[0].returnSimple('relativepath'))
                continue

            # only one entry but we need to match out it out
            if providers[0].checkPrco('provides', reqtup):
                print '%s: %s from %s' % (reqn, providers[0], providers[0].returnSimple('relativepath'))
                continue

        
        output = '%s:' % reqn
        for prov in providers:
            if reqf is not None:
                if prov.checkPrco('provides', reqtup):
                    output = output + '||' + prov.__str__()
                else:
                    print '%s does not provide %s %s %s %s %s' % (prov, reqn, reqf, reqe, reqv, reqr)                
            else:
                output = output + '||' + prov.__str__()
                
        print output
print time.time()


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0037 ]--