Skip to content

Commit

Permalink
Merge pull request #279 from GoSecure/fix-sensor-id
Browse files Browse the repository at this point in the history
Override default sensor_id value with value of command-line switch
  • Loading branch information
obilodeau committed Jan 15, 2021
2 parents 497307e + 2dd69ac commit c933cc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyrdp/mitm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def buildArgParser():
parser.add_argument("--auth", help="Specify allowed authentication mechanisms (Comma-separated, choose from: tls, ssp)", default="tls")
parser.add_argument(
"-s", "--sensor-id", help="Sensor ID (to differentiate multiple instances of the MITM"
" where logs are aggregated at one place)", default="PyRDP")
" where logs are aggregated at one place)")
parser.add_argument("--payload", help="Command to run automatically upon connection", default=None)
parser.add_argument("--payload-powershell",
help="PowerShell command to run automatically upon connection", default=None)
Expand Down Expand Up @@ -149,6 +149,8 @@ def configure(cmdline=None) -> MITMConfig:
cfg.set('logs', 'filter', args.log_filter)
if args.log_level:
cfg.set('vars', 'level', args.log_level)
if args.sensor_id:
cfg.set('vars', 'sensor_id', args.sensor_id)

outDir = Path(cfg.get('vars', 'output_dir'))
outDir.mkdir(exist_ok=True)
Expand Down

0 comments on commit c933cc6

Please sign in to comment.