Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
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 /
share /
system-config-network /
netconfpkg /
[ HOME SHELL ]
Name
Size
Permission
Action
conf
[ DIR ]
drwxr-xr-x
plugins
[ DIR ]
drwxr-xr-x
tui
[ DIR ]
drwxr-xr-x
Control.py
2.98
KB
-rw-r--r--
Control.pyc
2.13
KB
-rw-r--r--
Control.pyo
2.13
KB
-rw-r--r--
NCAliasList.py
387
B
-rw-r--r--
NCAliasList.pyc
1.03
KB
-rw-r--r--
NCAliasList.pyo
1.03
KB
-rw-r--r--
NCBackendHal.py
4.56
KB
-rw-r--r--
NCBackendHal.pyc
3.95
KB
-rw-r--r--
NCBackendHal.pyo
3.95
KB
-rw-r--r--
NCCallback.py
3.61
KB
-rw-r--r--
NCCallback.pyc
2.77
KB
-rw-r--r--
NCCallback.pyo
2.77
KB
-rw-r--r--
NCCompression.py
2.81
KB
-rw-r--r--
NCCompression.pyc
2.14
KB
-rw-r--r--
NCCompression.pyo
2.14
KB
-rw-r--r--
NCDevice.py
21.21
KB
-rw-r--r--
NCDevice.pyc
14.56
KB
-rw-r--r--
NCDevice.pyo
14.56
KB
-rw-r--r--
NCDeviceFactory.py
2.55
KB
-rw-r--r--
NCDeviceFactory.pyc
1.94
KB
-rw-r--r--
NCDeviceFactory.pyo
1.94
KB
-rw-r--r--
NCDeviceList.py
11.37
KB
-rw-r--r--
NCDeviceList.pyc
7.68
KB
-rw-r--r--
NCDeviceList.pyo
7.68
KB
-rw-r--r--
NCDialup.py
28.78
KB
-rw-r--r--
NCDialup.pyc
19.98
KB
-rw-r--r--
NCDialup.pyo
19.98
KB
-rw-r--r--
NCException.py
1.07
KB
-rw-r--r--
NCException.pyc
745
B
-rw-r--r--
NCException.pyo
745
B
-rw-r--r--
NCHardware.py
5.58
KB
-rw-r--r--
NCHardware.pyc
4.57
KB
-rw-r--r--
NCHardware.pyo
4.57
KB
-rw-r--r--
NCHardwareFactory.py
2.7
KB
-rw-r--r--
NCHardwareFactory.pyc
1.96
KB
-rw-r--r--
NCHardwareFactory.pyo
1.96
KB
-rw-r--r--
NCHardwareList.py
21.83
KB
-rw-r--r--
NCHardwareList.pyc
15.91
KB
-rw-r--r--
NCHardwareList.pyo
15.91
KB
-rw-r--r--
NCHost.py
1.63
KB
-rw-r--r--
NCHost.pyc
2.44
KB
-rw-r--r--
NCHost.pyo
2.44
KB
-rw-r--r--
NCHostsList.py
5.12
KB
-rw-r--r--
NCHostsList.pyc
4.2
KB
-rw-r--r--
NCHostsList.pyo
4.2
KB
-rw-r--r--
NCIPsec.py
9.6
KB
-rw-r--r--
NCIPsec.pyc
6.77
KB
-rw-r--r--
NCIPsec.pyo
6.77
KB
-rw-r--r--
NCIPsecList.py
5.14
KB
-rw-r--r--
NCIPsecList.pyc
4.32
KB
-rw-r--r--
NCIPsecList.pyo
4.32
KB
-rw-r--r--
NCProfile.py
2.17
KB
-rw-r--r--
NCProfile.pyc
3.07
KB
-rw-r--r--
NCProfile.pyo
3.07
KB
-rw-r--r--
NCProfileList.py
26.06
KB
-rw-r--r--
NCProfileList.pyc
14.86
KB
-rw-r--r--
NCProfileList.pyo
14.86
KB
-rw-r--r--
NCRoute.py
1.73
KB
-rw-r--r--
NCRoute.pyc
2.55
KB
-rw-r--r--
NCRoute.pyo
2.55
KB
-rw-r--r--
NCWireless.py
3.65
KB
-rw-r--r--
NCWireless.pyc
2.59
KB
-rw-r--r--
NCWireless.pyo
2.59
KB
-rw-r--r--
NC_functions.py
28.71
KB
-rw-r--r--
NC_functions.pyc
27.89
KB
-rw-r--r--
NC_functions.pyo
27.89
KB
-rw-r--r--
NCisdnhardware.py
12.96
KB
-rw-r--r--
NCisdnhardware.pyc
9.86
KB
-rw-r--r--
NCisdnhardware.pyo
9.86
KB
-rw-r--r--
__init__.py
1019
B
-rw-r--r--
__init__.pyc
259
B
-rw-r--r--
__init__.pyo
259
B
-rw-r--r--
exception.py
13.39
KB
-rw-r--r--
exception.pyc
12.1
KB
-rw-r--r--
exception.pyo
12.1
KB
-rw-r--r--
executil.py
1.34
KB
-rw-r--r--
executil.pyc
1.33
KB
-rw-r--r--
executil.pyo
1.33
KB
-rw-r--r--
gdt.py
11.46
KB
-rw-r--r--
gdt.pyc
10.71
KB
-rw-r--r--
gdt.pyo
10.71
KB
-rw-r--r--
ipcalc.py
2.83
KB
-rw-r--r--
ipcalc.pyc
3.13
KB
-rw-r--r--
ipcalc.pyo
3.13
KB
-rw-r--r--
log.py
3.34
KB
-rw-r--r--
log.pyc
4.11
KB
-rw-r--r--
log.pyo
4.11
KB
-rw-r--r--
transaction.py
9.63
KB
-rw-r--r--
transaction.pyc
8.24
KB
-rw-r--r--
transaction.pyo
8.24
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : gdt.py
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 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 # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser 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. """\ Basic classes with predefined properties Example usage: class Article(Gdtstruct): "A basic Article class" # fields and types are dynamically set by the initializer gdtstruct_properties([('title', Gdtstr, "The Title of the Article"), ('page', Gdtlist, "List of pages in the Article") ]) def __init__(self, *args): super(Article, self).__init__(*args) self.title = Gdtstr("") self.page = Gdtlist() class Page(Gdtstruct): # fields and types are dynamically set by the initializer gdtstruct_properties([('text', Gdtstr, "The text of the page"), ]) def __init__(self, *args): super(Page, self).__init__(*args) self.text = Gdtstr(args[0] if len(args) else "") a = Article() print Article.title.__doc__ print a.title = "My title" a.page.append(Page("page 1")) a.page.append(Page("page 2")) a.commit() print a print a.title = "My bad title" a.page[1].text = "bad page 2" a.page.append(Page("bad page 3")) print a print a.page.rollback() print a print a.rollback() print a Output of the example: The Title of the Article Article.title=My title Article.page.1.Page.text=page 1 Article.page.2.Page.text=page 2 Article.title=My bad title Article.page.1.Page.text=page 1 Article.page.2.Page.text=bad page 2 Article.page.3.Page.text=bad page 3 Article.title=My bad title Article.page.1.Page.text=page 1 Article.page.2.Page.text=page 2 Article.title=My title Article.page.1.Page.text=page 1 Article.page.2.Page.text=page 2 """ import sys # pylint: disable-msg=W0403 from .transaction import Transaction, Transactionlist # pylint: disable-msg=W0142, W0212 def _classinitializer(proc): "basic idea stolen from zope.interface.advice, P.J. Eby" def _newproc(*args, **kwargs): frame = sys._getframe(1) if '__module__' in frame.f_locals and not \ '__module__' in frame.f_code.co_varnames: # we are in a class if '__metaclass__' in frame.f_locals: raise SyntaxError("Don't use two class initializers or\n" "a class initializer together with a " "__metaclass__ hook") def _makecls(name, bases, dic): "create the class" try: cls = type(name, bases, dic) except TypeError, e: if "can't have only classic bases" in str(e): cls = type(name, bases + (object,), dic) else: # other strange errs, e.g. __slots__ conflicts raise proc(cls, *args, **kwargs) return cls frame.f_locals["__metaclass__"] = _makecls else: proc(*args, **kwargs) # pylint: disable-msg=W0621 _newproc.__name__ = proc.__name__ _newproc.__module__ = proc.__module__ _newproc.__doc__ = proc.__doc__ _newproc.__dict__ = proc.__dict__ return _newproc @_classinitializer def gdtstruct_properties(cls, schema): """ Add properties to cls, according to the schema, which is a list of pairs (fieldname, Gdtobject_subclass, docstring). A Gdtobject_subclass is a callable converting the field value into the Gdtobject_subclass. Instances of cls are expected to have private attributes with names determined by the field names. """ # from netconfpkg.gdt import Gdtstruct, Gdtobject # if not issubclass(cls, Gdtstruct) and (type(cls) != Gdtobject): # raise AttributeError('Class %s must be subclass of Gdtstruct!' # % cls.__name__ ) for name, typecast, docstring in schema: #if not issubclass(typecast, Gdtobject): # raise AttributeError('Class %s must be subclass of Gdtobject!' # % typecast.__name__ ) if hasattr(cls, name): # avoid accidental overriding raise AttributeError('You are overriding %s!' % name) # def _getter(self, name=name, typecast = typecast): def _getter(self, name=name): "get the property 'name'" if not hasattr(self, '_' + name): return None # return typecast() return getattr(self, '_' + name) def _setter(self, value, name=name, typecast=typecast): "set the property 'name'" if value == None: setattr(self, '_' + name, None) else: if hasattr(typecast, "apply"): nval = typecast() #print >> sys.stderr, typecast nval.apply(value) else: nval = typecast(value) setattr(self, '_' + name, nval) def _deler(self, name=name): setattr(self, '_' + name, None) setattr(cls, name, property(_getter, _setter, _deler, doc=docstring)) cls._fields.add(name) #cls._fields.sort() cls._types[name]=typecast @_classinitializer def gdtlist_properties(cls, typecast): """ Add properties to cls, according to the schema, which is a list of pairs (fieldname, Gdtobject_subclass, docstring). A Gdtobject_subclass is a callable converting the field value into the Gdtobject_subclass. Instances of cls are expected to have private attributes with names determined by the field names. """ cls._type=typecast class Gdtobject(Transaction): "The base of all Gdtobjects" keyid = None def tostr(self, prefix_string = None): "returns a string in gdt representation" raise NotImplementedError def __str__(self): return self.tostr() def test(self): "test on integrity, to be implemented by sub-classes" return True class Gdtcontainer(Gdtobject): "A base container class, which contains several Gdtobjects" def apply(self, other): "copy from another object" raise NotImplementedError class Gdtstruct(Gdtcontainer): "A base class, which can be used with gdtstruct_properties" _fields = set() _types = dict() def test(self): all_ok = True for field in self._fields: if hasattr(self, "test" + field): tm = getattr(self, "test" + field) if type(tm) == type(self.test): try: all_ok &= tm() except NotImplementedError: # pylint: disable-msg=W0704 # ignore not implemented test methods pass elif hasattr(self, "_" + field): val = getattr(self, "_" + field) if hasattr(val, "test"): tm = getattr(val, "test") if type(tm) == type(self.test): try: all_ok &= tm() except NotImplementedError: # pylint: disable-msg=W0704 # ignore not implemented test methods pass return all_ok def tostr(self, prefix_string = None): "returns a string in gdt representation" if prefix_string == None: prefix_string = self.__class__.__name__ mstr = "" fields = list(self._fields) fields.sort() for name in fields: if hasattr(self, name): val = getattr(self, name) if val == None: continue if isinstance(val, Gdtcontainer): mstr += val.tostr("%s.%s" % (prefix_string, name)) else: mstr += "%s.%s=%s\n" % (prefix_string, name, str(val)) return mstr def fromstr(self, vals, value): name=vals[0] if name in self._fields: if len(vals) > 1: o = getattr(self, name) if o == None: o = self._types[name]() o.fromstr(vals[1:], value) setattr(self, name, o) else: if self._types[name] == bool: setattr(self, name, value == "True" or False) else: setattr(self, name, self._types[name](value)) else: raise KeyError def apply(self, other): "copy from another object" for field in self._fields: if hasattr(other, field): setattr(self, field, getattr(other, field)) class Gdtlist(Transactionlist, Gdtcontainer): "A list base class, which can hold Gdtobjects in a list." _type=None def tostr(self, prefix_string = None): "returns a string in gdt representation" if prefix_string == None: prefix_string = self.__class__.__name__ mstr = "" i = 0 for value in self: i += 1 if isinstance(value, Gdtobject): kid = value.keyid if kid: kid = getattr(value, kid) else: kid = str(i) # mstr += value.tostr("%s.%s.%s" # % (prefix_string, kid, # value.__class__.__name__)) mstr += value.tostr("%s.%s" % (prefix_string, kid)) else: mstr += "%s.%d=%s\n" % (prefix_string, i, value) return mstr def fromstr(self, vals, value): if vals[0] == self._type.__name__: del vals[0] index = int(vals[0]) if index > len(self): for i in range(0, index - len(self)): self.append(self._type()) child = self[index-1] if isinstance(child, Gdtobject): child.fromstr(vals[1:], value) else: self[index-1] = self._type(value) def test(self): all_ok = True for val in self: if hasattr(val, "test"): tm = getattr(val, "test") if type(tm) == type(self.test): try: all_ok &= tm() except NotImplementedError: # pylint: disable-msg=W0704 # ignore not implemented test methods pass return all_ok def apply(self, value): del self[:] self.extend(value) Gdtstr = str Gdtbool = bool Gdtint = int
Close