示例#1
0
文件: log.py 项目: 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')
示例#2
0
文件: log.py 项目: 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')
示例#3
0
文件: log.py 项目: 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
示例#4
0
文件: log.py 项目: 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
示例#5
0
文件: log.py 项目: hellok/CTF
def info(s):
    trace(''.join([' ', text.boldblue('[*]'), ' ', s, '\n']))
示例#6
0
文件: log.py 项目: hellok/CTF
 def waitfor(s):
     global _message
     _message = s
     trace(''.join([' ', text.boldblue('[*]'), ' ', s, '...\n']))
示例#7
0
文件: log.py 项目: hellok/CTF
def info(s):
    trace(''.join([' ', text.boldblue('[*]'), ' ', s, '\n']))
示例#8
0
文件: log.py 项目: hellok/CTF
 def waitfor(s):
     global _message
     _message = s
     trace(''.join([' ', text.boldblue('[*]'), ' ', s, '...\n']))