• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Gallopsled / pwntools / 8912ca5a8c3a9725c3ba6d30561607150a6faebe-PR-2205

pending completion
8912ca5a8c3a9725c3ba6d30561607150a6faebe-PR-2205

Pull #2205

github-actions

web-flow
Merge 81f463e2c into 8b4cacf8b
Pull Request #2205: Fix stable Python 2 installation from a built wheel

3878 of 6371 branches covered (60.87%)

12199 of 16604 relevant lines covered (73.47%)

0.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.02
/pwnlib/util/splash.py
1
"""Silly module mostly meant as an easter-egg."""
2
from __future__ import absolute_import
1✔
3
from __future__ import division
1✔
4

5
import threading
1✔
6
import time
1✔
7

8
from pwnlib import term
1✔
9
from pwnlib.term import text
1✔
10

11

12
_banner = r'''
1✔
13
  .:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
14
  )     _____                         _    _                            )
15
  (    |  _  |___ _ _ _ ___ ___ ___ _| |  | |_ _ _                      (
16
  )    |   __| . | | | | -_|  _| -_| . |  | . | | |                     )
17
  (    |__|  |___|_____|___|_| |___|___|  |___|_  |                     (
18
  )          _____                         __ |___|     __              )
19
  (         /\  __`\                      /\ \       __/\ \             (
20
  )         \ \ \/\ \__  __  __   ____    \ \ \     /\_\ \ \___         )
21
  (          \ \ ,__/\ \/\ \/\ \ /  _ `\   \ \ \    \/\ \ \  __`\       (
22
  )           \ \ \/\ \ \_/ \_/ \ \ \/\ \   \ \ \____\ \ \ \ \/\ \      )
23
  (            \ \_\ \ \___^___/'\ \_\ \_\   \ \_____\\ \_\ \____/      (
24
  )             \/_/  \/__//__/   \/_/\/_/    \/_____/ \/_/\/___/       )
25
  (                                                                     (
26
  .:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
27
'''
28

29
def splash():
1✔
30
    """Put this at the beginning of your exploit to create the illusion that
31
    your sploit is enterprisey and top notch quality"""
32

33
    def updater():
×
34

35
        colors = [
×
36
            text.blue   , text.bold_blue   ,
37
            text.magenta, text.bold_magenta,
38
            text.red    , text.bold_red    ,
39
            text.yellow , text.bold_yellow ,
40
            text.green  , text.bold_green  ,
41
            text.cyan   , text.bold_cyan   ,
42
        ]
43
        def getcolor(n):
×
44
            return colors[(n // 4) % len(colors)]
×
45

46
        lines = ['    ' + line + '\n' for line in _banner.strip('\n').split('\n')]
×
47

48
        hs = [term.output('', frozen = False) for _ in range(len(lines))]
×
49
        ndx = 0
×
50
        import sys as _sys
×
51
        while _sys:
×
52
            for i, (l, h) in enumerate(zip(lines, hs)):
×
53
                cur = ''
×
54
                buf = ''
×
55
                col = getcolor(ndx + i)
×
56
                for j in range(len(l)):
×
57
                    buf += l[j]
×
58
                    ncol = getcolor(ndx + i + j)
×
59
                    if col != ncol:
×
60
                        cur += buf if buf.isspace() else col(buf)
×
61
                        col = ncol
×
62
                        buf = ''
×
63
                cur += col(buf)
×
64
                h.update(cur)
×
65
            ndx += 1
×
66
            time.sleep(0.15)
×
67

68
    if term.term_mode:
×
69
        t = threading.Thread(target = updater)
×
70
        t.daemon = True
×
71
        t.start()
×
72
        time.sleep(0.2)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc