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

Gallopsled / pwntools / 22222945663

20 Feb 2026 11:49AM UTC coverage: 73.592% (-0.3%) from 73.914%
22222945663

push

github

web-flow
Fix typo causing doctests not getting skipped (#2681)

Downloading all those libcs slowed down the CI a lot.

3861 of 6510 branches covered (59.31%)

13318 of 18097 relevant lines covered (73.59%)

0.74 hits per line

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

55.0
/pwnlib/commandline/elfpatch.py
1
import sys
1✔
2

3
import pwnlib.args
1✔
4
pwnlib.args.free_form = False
1✔
5

6
from pwn import *
1✔
7
from pwnlib.commandline import common
1✔
8

9
p = common.parser_commands.add_parser(
1✔
10
    'elfpatch',
11
    help = 'Patch an ELF file',
12
    description = 'Patch an ELF file'
13
)
14

15
p.add_argument('elf',help="File to patch")
1✔
16
p.add_argument('offset',help="Offset to patch in virtual address (hex encoded)")
1✔
17
p.add_argument('bytes',help='Bytes to patch (hex encoded)')
1✔
18

19

20
def main(a):
1✔
21
    if not a.offset.startswith('0x'):
×
22
        a.offset = '0x' + a.offset
×
23

24
    offset = int(a.offset, 16)
×
25
    bytes  = unhex(a.bytes)
×
26

27
    with context.silent:
×
28
        elf    = ELF(a.elf)
×
29

30
    elf.write(offset, bytes)
×
31
    getattr(sys.stdout, 'buffer', sys.stdout).write(elf.get_data())
×
32

33
if __name__ == '__main__':
1!
34
    pwnlib.commandline.common.main(__file__, main)
×
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