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

Gallopsled / pwntools / 1

08 Jan 2022 12:22PM UTC coverage: 0.0%. Remained the same
1

push

github

web-flow
fix tube's debug output of same byte compression (#2011)

* fix tube's debug output of same byte compression

* Update CHANGELOG.md

* move code to `log.maybe_hexdump`

* update doc string

0 of 11 new or added lines in 2 files covered. (0.0%)

5745 existing lines in 83 files now uncovered.

0 of 16544 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/pwnlib/commandline/unhex.py
1
#!/usr/bin/env python2
2
from __future__ import absolute_import
×
3
from __future__ import division
×
4

5
import argparse
×
6
import sys
×
7
from string import whitespace
×
8

9
from pwnlib.commandline import common
×
10
from pwnlib.util.fiddling import unhex
×
11

12
parser = common.parser_commands.add_parser(
×
13
    'unhex',
14
    help = 'Decodes hex-encoded data provided on the command line or via stdin.',
15
    description = 'Decodes hex-encoded data provided on the command line or via stdin.'
16
)
17

18
parser.add_argument('hex', nargs='*',
×
19
    help='Hex bytes to decode')
20

21
def main(args):
×
22
    try:
×
23
        o = getattr(sys.stdout, 'buffer', sys.stdout)
×
24
        if not args.hex:
×
25
            s = getattr(sys.stdin, 'buffer', sys.stdin).read().translate(None, whitespace.encode('ascii'))
×
26
            o.write(unhex(s))
×
27
        else:
28
            o.write(unhex(''.join(args.hex)))
×
29
    except TypeError as e:
×
30
        sys.stderr.write(str(e) + '\n')
×
UNCOV
31
        raise
×
32

33
if __name__ == '__main__':
×
UNCOV
34
    common.main(__file__)
×
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

© 2026 Coveralls, Inc