Computer.py 文件源码

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

项目:HTP 作者: nklose 项目源码 文件源码
def show_login_banner(self):
        banner_file = File('banner.txt', self.get_os_dir())
        banner_file.lookup()
        if not banner_file.exists:
            banner_file.content = 'Welcome to ' + self.ip + '.'
            banner_file.save()
        banner_lines = banner_file.content.split('\n')
        lines_printed = 0
        for line in banner_lines:
            if lines_printed < 10:
                print '    ' + colored(line, 'yellow')
            lines_printed += 1

    # return a list of all files on this computer
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号