Example #1
0
File: log.py Project: hellok/CTF
 def update(self):
     s = '\x1b[s ' + text.boldblue('[' + self.spinner[self.i] + ']') + ' ' + _message
     if _status and _message:
         s += ': ' + _status
     elif status:
         s += _status
     _trace(s + '\x1b[u')
Example #2
0
File: log.py Project: hellok/CTF
 def update(self):
     s = '\x1b[s ' + text.boldblue('[' + self.spinner[self.i] +
                                   ']') + ' ' + _message
     if _status and _message:
         s += ': ' + _status
     elif status:
         s += _status
     _trace(s + '\x1b[u')
Example #3
0
File: log.py Project: hellok/CTF
    def _stop_spinner(marker = text.boldblue('[*]'), status = ''):
        global _spinner, _status

        if _spinner is not None:
            _lock.acquire()

            _spinner.running = False
            s = '\x1b[0K ' + marker + ' ' + _message
            if status == None:
                status = _status
            _status = ''
            if status and _message:
                s += ': ' + status
            elif status:
                s += status
            _trace(s + '\n\x1b[?25h') # show cursor

            _lock.release()
        _spinner = None
Example #4
0
File: log.py Project: hellok/CTF
    def _stop_spinner(marker=text.boldblue('[*]'), status=''):
        global _spinner, _status

        if _spinner is not None:
            _lock.acquire()

            _spinner.running = False
            s = '\x1b[0K ' + marker + ' ' + _message
            if status == None:
                status = _status
            _status = ''
            if status and _message:
                s += ': ' + status
            elif status:
                s += status
            _trace(s + '\n\x1b[?25h')  # show cursor

            _lock.release()
        _spinner = None
Example #5
0
File: log.py Project: hellok/CTF
def info(s):
    trace(''.join([' ', text.boldblue('[*]'), ' ', s, '\n']))
Example #6
0
File: log.py Project: hellok/CTF
 def waitfor(s):
     global _message
     _message = s
     trace(''.join([' ', text.boldblue('[*]'), ' ', s, '...\n']))
Example #7
0
File: log.py Project: hellok/CTF
def info(s):
    trace(''.join([' ', text.boldblue('[*]'), ' ', s, '\n']))
Example #8
0
File: log.py Project: hellok/CTF
 def waitfor(s):
     global _message
     _message = s
     trace(''.join([' ', text.boldblue('[*]'), ' ', s, '...\n']))