From 271b6b68710dd30f36d81b657151ae23ffe9719a Mon Sep 17 00:00:00 2001 From: OscarAkaElvis Date: Mon, 1 Jul 2024 14:16:58 +0200 Subject: [PATCH] Small adjustments after the received user-agent feature PR --- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 3 ++- evil-winrm.rb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b5b164..c59fa8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - Improvements of paths parsing - Fixed bug downloading files without extension - Replaced deprecated File.exists by File.exist function to avoid errors on newer Ruby versions - - Added useragent option + - Added user-agent option (Thanks gmkbenjamin) ### 3.5 - Improvements on powershell functions loading diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73cddf8..b431b01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Please note we have a [Code of Conduct], please follow it in all your interactio 1. Direct push to [Master] is not allowed. 2. Pull Requests to [Master] are not allowed. -3. Usually, commits and pull requests should be done on [Dev] branch. If you have any doubt, don't hesitate to ask first. +3. Usually, commits and pull requests should be done on [Dev] branch using the content of our [Dev] branch to avoid missing features not released yet. If you have any doubt, don't hesitate to ask first. 4. Temporary branches may be existing for specific features, be pretty sure that the branch you are going to commit on is the right one. Ask first if you have any doubt. 5. Any branch will be finally merged to [Dev], there it will be reviewed and tested deeply before being merged to [Master]. 6. All merges from [Dev] to [Master] are a new `evil-winrm` release. This merges to [Master] will be performed and reviewed exclusively by the staff. diff --git a/README.md b/README.md index 4ed74fb..fc7ebba 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ protocol, it is using PSRP (Powershell Remoting Protocol) for initializing runsp - Optional logging feature - Docker support (prebuilt images available at [Dockerhub]) - Trap capturing to avoid accidental shell exit on Ctrl+C + - Customizable user-agent using legitimate Windows default one ## Help ``` @@ -55,7 +56,7 @@ Usage: evil-winrm -i IP -u USER [-s SCRIPTS_PATH] [-e EXES_PATH] [-P PORT] [-p P -p, --password PASS Password -H, --hash HASH NTHash -P, --port PORT Remote host port (default 5985) - -a, --user-agent Specify connection useragent (default Microsoft WinRM Client) + -a, --user-agent Specify connection user-agent (default Microsoft WinRM Client) -V, --version Show version -n, --no-colors Disable colors -N, --no-rpath-completion Disable remote path completion diff --git a/evil-winrm.rb b/evil-winrm.rb index 3eedca0..d3450b9 100755 --- a/evil-winrm.rb +++ b/evil-winrm.rb @@ -164,7 +164,7 @@ def arguments $ssl = true options[:port] = '5986' end - opts.on('-a', '--user-agent USERAGENT', 'Specify connection useragent (default Microsoft WinRM Client)') do |val| + opts.on('-a', '--user-agent USERAGENT', 'Specify connection user-agent (default Microsoft WinRM Client)') do |val| options[:user_agent] = val end opts.on('-c', '--pub-key PUBLIC_KEY_PATH', 'Local path to public key certificate') do |val|