Linux biogene 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
Apache
: 46.101.124.208 | : 3.17.73.81
Cant Read [ /etc/named.conf ]
5.6.40-0+deb8u12
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
dist-packages /
Cheetah /
[ HOME SHELL ]
Name
Size
Permission
Action
Macros
[ DIR ]
drwxr-xr-x
Templates
[ DIR ]
drwxr-xr-x
Tests
[ DIR ]
drwxr-xr-x
Tools
[ DIR ]
drwxr-xr-x
Utils
[ DIR ]
drwxr-xr-x
CacheRegion.py
4.32
KB
-rw-r--r--
CacheRegion.pyc
6.43
KB
-rw-r--r--
CacheStore.py
2.96
KB
-rw-r--r--
CacheStore.pyc
5.66
KB
-rw-r--r--
CheetahWrapper.py
23.41
KB
-rw-r--r--
CheetahWrapper.pyc
22.21
KB
-rw-r--r--
Compiler.py
78.7
KB
-rw-r--r--
Compiler.pyc
74.27
KB
-rw-r--r--
DirectiveAnalyzer.py
2.41
KB
-rw-r--r--
DirectiveAnalyzer.pyc
3.9
KB
-rw-r--r--
Django.py
592
B
-rw-r--r--
Django.pyc
941
B
-rw-r--r--
DummyTransaction.py
3.2
KB
-rw-r--r--
DummyTransaction.pyc
5.46
KB
-rw-r--r--
ErrorCatchers.py
1.71
KB
-rw-r--r--
ErrorCatchers.pyc
3.5
KB
-rw-r--r--
FileUtils.py
10.41
KB
-rw-r--r--
FileUtils.pyc
12.99
KB
-rw-r--r--
Filters.py
7.46
KB
-rw-r--r--
Filters.pyc
8.41
KB
-rw-r--r--
ImportHooks.py
3.89
KB
-rw-r--r--
ImportHooks.pyc
3.75
KB
-rw-r--r--
ImportManager.py
17.14
KB
-rw-r--r--
ImportManager.pyc
16.6
KB
-rw-r--r--
NameMapper.py
12.09
KB
-rw-r--r--
NameMapper.pyc
12.98
KB
-rw-r--r--
Parser.py
101.1
KB
-rw-r--r--
Parser.pyc
78.23
KB
-rw-r--r--
Servlet.py
1.23
KB
-rw-r--r--
Servlet.pyc
1.85
KB
-rw-r--r--
SettingsManager.py
9.94
KB
-rw-r--r--
SettingsManager.pyc
11.23
KB
-rw-r--r--
SourceReader.py
7.79
KB
-rw-r--r--
SourceReader.pyc
11.58
KB
-rw-r--r--
Template.py
83.09
KB
-rw-r--r--
Template.pyc
66.52
KB
-rw-r--r--
TemplateCmdLineIface.py
3.23
KB
-rw-r--r--
TemplateCmdLineIface.pyc
3.87
KB
-rw-r--r--
Unspecified.py
258
B
-rw-r--r--
Unspecified.pyc
799
B
-rw-r--r--
Version.py
1.49
KB
-rw-r--r--
Version.pyc
1.78
KB
-rw-r--r--
__init__.py
582
B
-rw-r--r--
__init__.pyc
754
B
-rw-r--r--
_namemapper.so
14.47
KB
-rw-r--r--
convertTmplPathToModuleName.py
528
B
-rw-r--r--
convertTmplPathToModuleName.py...
785
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CacheRegion.py
# $Id: CacheRegion.py,v 1.3 2006/01/28 04:19:30 tavis_rudd Exp $ ''' Cache holder classes for Cheetah: Cache regions are defined using the #cache Cheetah directive. Each cache region can be viewed as a dictionary (keyed by cacheRegionID) handling at least one cache item (the default one). It's possible to add cacheItems in a region by using the `varyBy` #cache directive parameter as in the following example:: #def getArticle this is the article content. #end def #cache varyBy=$getArticleID() $getArticle($getArticleID()) #end cache The code above will generate a CacheRegion and add new cacheItem for each value of $getArticleID(). ''' try: from hashlib import md5 except ImportError: from md5 import md5 import time import Cheetah.CacheStore class CacheItem(object): ''' A CacheItem is a container storing: - cacheID (string) - refreshTime (timestamp or None) : last time the cache was refreshed - data (string) : the content of the cache ''' def __init__(self, cacheItemID, cacheStore): self._cacheItemID = cacheItemID self._cacheStore = cacheStore self._refreshTime = None self._expiryTime = 0 def hasExpired(self): return (self._expiryTime and time.time() > self._expiryTime) def setExpiryTime(self, time): self._expiryTime = time def getExpiryTime(self): return self._expiryTime def setData(self, data): self._refreshTime = time.time() self._cacheStore.set(self._cacheItemID, data, self._expiryTime) def getRefreshTime(self): return self._refreshTime def getData(self): assert self._refreshTime return self._cacheStore.get(self._cacheItemID) def renderOutput(self): """Can be overridden to implement edge-caching""" return self.getData() or "" def clear(self): self._cacheStore.delete(self._cacheItemID) self._refreshTime = None class _CacheDataStoreWrapper(object): def __init__(self, dataStore, keyPrefix): self._dataStore = dataStore self._keyPrefix = keyPrefix def get(self, key): return self._dataStore.get(self._keyPrefix+key) def delete(self, key): self._dataStore.delete(self._keyPrefix+key) def set(self, key, val, time=0): self._dataStore.set(self._keyPrefix+key, val, time=time) class CacheRegion(object): ''' A `CacheRegion` stores some `CacheItem` instances. This implementation stores the data in the memory of the current process. If you need a more advanced data store, create a cacheStore class that works with Cheetah's CacheStore protocol and provide it as the cacheStore argument to __init__. For example you could use Cheetah.CacheStore.MemcachedCacheStore, a wrapper around the Python memcached API (http://www.danga.com/memcached). ''' _cacheItemClass = CacheItem def __init__(self, regionID, templateCacheIdPrefix='', cacheStore=None): self._isNew = True self._regionID = regionID self._templateCacheIdPrefix = templateCacheIdPrefix if not cacheStore: cacheStore = Cheetah.CacheStore.MemoryCacheStore() self._cacheStore = cacheStore self._wrappedCacheDataStore = _CacheDataStoreWrapper( cacheStore, keyPrefix=templateCacheIdPrefix+':'+regionID+':') self._cacheItems = {} def isNew(self): return self._isNew def clear(self): " drop all the caches stored in this cache region " for cacheItemId in self._cacheItems.keys(): cacheItem = self._cacheItems[cacheItemId] cacheItem.clear() del self._cacheItems[cacheItemId] def getCacheItem(self, cacheItemID): """ Lazy access to a cacheItem Try to find a cache in the stored caches. If it doesn't exist, it's created. Returns a `CacheItem` instance. """ cacheItemID = md5(str(cacheItemID)).hexdigest() if cacheItemID not in self._cacheItems: cacheItem = self._cacheItemClass( cacheItemID=cacheItemID, cacheStore=self._wrappedCacheDataStore) self._cacheItems[cacheItemID] = cacheItem self._isNew = False return self._cacheItems[cacheItemID]
Close