MessageBox.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:HTP 作者: nklose 项目源码 文件源码
def add_property(self, name, value):
        # get filler space between name and value
        spaces = ''
        i = self.label_width - len(name)
        while i > 0:
            spaces += ' '
            i -= 1
        text = colored(u'\u2502 ', self.border_color)
        text += colored(name + ':', self.label_color)
        text += spaces
        text += colored(value, self.text_color)

        # add remaining spaces and end line
        spaces = ''
        i = self.width - len(value) - self.label_width - 4
        while i > 0:
            spaces += ' '
            i -= 1
        text += spaces
        text += colored(u'\u2502', self.border_color)

        self.text.append(text)

    # resizes width of labels for property entries
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号