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

Gallopsled / pwntools / 1

09 Jul 2023 08:02PM UTC coverage: 19.327% (-54.1%) from 73.393%
1

push

github

web-flow
Don't change log level for Corefile._parse_stack() (#2222)

* Don't change log level for Corefile._parse_stack()

If we don't want to see the log, don't print it. There are no spammy
debug logs anymore.

Fixes #1666

* Fix doctest

189 of 5940 branches covered (3.18%)

0 of 1 new or added line in 1 file covered. (0.0%)

9289 existing lines in 112 files now uncovered.

3286 of 17002 relevant lines covered (19.33%)

0.19 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
UNCOV
2
from __future__ import absolute_import
×
UNCOV
3
from __future__ import division
×
4

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

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

UNCOV
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

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

UNCOV
21
def main(args):
×
UNCOV
22
    try:
×
UNCOV
23
        o = getattr(sys.stdout, 'buffer', sys.stdout)
×
UNCOV
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:
UNCOV
28
            o.write(unhex(''.join(args.hex)))
×
29
    except TypeError as e:
×
30
        sys.stderr.write(str(e) + '\n')
×
31
        raise
×
32

UNCOV
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