Skip to content

Commit

Permalink
Code cave size
Browse files Browse the repository at this point in the history
  • Loading branch information
helviojunior committed Apr 12, 2023
1 parent a6cd303 commit 63bb72b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shellcodetester/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ def _add_custom_args(self, custom):
type=str,
help=Color.s('List of bad chars to highlight (ex: {G}\\x00\\x0a{W}, default: {G}\\0x00{W})'))

custom.add_argument('--cave-size',
action='store',
dest='cave_size',
metavar='[size]',
type=int,
default=1024,
help=Color.s('Code cave size (default: {G}1024{W})'))

custom.add_argument('--fill-with-nop',
action='store_true',
default=False,
Expand Down
2 changes: 2 additions & 0 deletions shellcodetester/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ def load_from_arguments():
if args.out_file:
Configuration.out_file = args.out_file

Configuration.cave_size = int(args.cave_size)
Configuration.breakpoint = args.breakpoint
Configuration.fill = args.fill
Configuration.transform_format = Transform.parse_format(args.transform_format)

Logger.pl(' {C}code cave size:{O} %s{W}' % Configuration.cave_size)
Logger.pl(' {C}transform format:{O} %s{W}' % (Transform.get_name(Configuration.transform_format)))

if len(Configuration.bad_chars) > 0:
Expand Down

0 comments on commit 63bb72b

Please sign in to comment.