AnonSec Shell
Server IP : 104.21.37.246  /  Your IP : 104.23.243.33   [ Reverse IP ]
Web Server : Apache
System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64
User : cp648411 ( 1354)
PHP Version : 7.2.34
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python27/lib/python2.7/site-packages/paste/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/alt/python27/lib/python2.7/site-packages/paste/util/filemixin.py
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php

class FileMixin(object):

    """
    Used to provide auxiliary methods to objects simulating files.
    Objects must implement write, and read if they are input files.
    Also they should implement close.

    Other methods you may wish to override:
    * flush()
    * seek(offset[, whence])
    * tell()
    * truncate([size])

    Attributes you may wish to provide:
    * closed
    * encoding (you should also respect that in write())
    * mode
    * newlines (hard to support)
    * softspace
    """

    def flush(self):
        pass

    def next(self):
        return self.readline()

    def readline(self, size=None):
        # @@: This is a lame implementation; but a buffer would probably
        # be necessary for a better implementation
        output = []
        while 1:
            next = self.read(1)
            if not next:
                return ''.join(output)
            output.append(next)
            if size and size > 0 and len(output) >= size:
                return ''.join(output)
            if next == '\n':
                # @@: also \r?
                return ''.join(output)

    def xreadlines(self):
        return self

    def writelines(self, lines):
        for line in lines:
            self.write(line)

    

Anon7 - 2022
AnonSec Team