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

Gallopsled / pwntools / 11532588290

26 Oct 2024 02:29PM CUT coverage: 73.585% (+2.1%) from 71.491%
11532588290

push

github

peace-maker
Merge branch 'dev' into interactive

3767 of 6364 branches covered (59.19%)

1463 of 2234 new or added lines in 69 files covered. (65.49%)

85 existing lines in 22 files now uncovered.

13246 of 18001 relevant lines covered (73.58%)

0.74 hits per line

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

80.95
/pwnlib/commandline/checksec.py
1
from __future__ import absolute_import
1✔
2
from __future__ import division
1✔
3

4
import argparse
1✔
5
import sys
1✔
6

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

10
parser = common.parser_commands.add_parser(
1✔
11
    'checksec',
12
    help = 'Check binary security settings',
13
    description = 'Check binary security settings',
14
)
15
parser.add_argument(
1✔
16
    'elf',
17
    nargs='*',
18
    type=argparse.FileType('rb'),
19
    help='Files to check'
20
)
21
parser.add_argument(
1✔
22
    '--file',
23
    nargs='*',
24
    dest='elf2',
25
    metavar='elf',
26
    type=argparse.FileType('rb'),
27
    help='File to check (for compatibility with checksec.sh)'
28
)
29

30
def main(args):
1✔
31
    files  = args.elf or args.elf2 or []
1✔
32

33
    if not files:
1!
34
        parser.print_usage()
×
35
        return
×
36

37
    for f in files:
1✔
38
        try:
1✔
39
            e = ELF(f.name)
1✔
NEW
40
        except Exception as e:
×
NEW
41
            print("{name}: {error}".format(name=f.name, error=e))
×
42

43
if __name__ == '__main__':
1✔
44
    common.main(__file__, main)
1✔
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