Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
# This software may be freely redistributed under the terms of the GNU # general public license. # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import platform import sys import urllib try: import httplib except: import http.client as httplib from types import ModuleType class Lazy(object): ''' A decorator that sets a static function as an available property on a class and executes it lazily ''' def __init__(self, func): self._func = func def __get__(self, obj, _=None): if obj is None: return self value = self._func() setattr(obj, self._func.func_name, value) return value class Phacter(object): ''' The main Phacter class ''' __version__ = '0.2.0' __license__ = 'GPLv2' __author__ = 'Dan Radez ' phacts = ['kernel'] platform_name = platform.system().lower() kernel = property(lambda self: self.platform_name) phacterversion = __version__ def __init__(self): ''' load facts platform specific ''' platform_imp = __import__('phacter', None, None, [self.platform_name]) platform_obj = getattr(platform_imp, self.platform_name) for method in dir(platform_obj): if method[0] is not '_': call = getattr(platform_obj, method) if type(call) is not ModuleType: setattr(self.__class__, method, Lazy(call)) self.phacts.append(method) self.phacts.sort() def __getitem__(self, key): ''' makes me subscriptable ''' if hasattr(self, key): return getattr(self, key) else: return '' if __name__ == 'phacter': # replace the phacter module in memory with the class sys.modules[__name__] = Phacter()