evil-winrm 1.9 → 2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/evil-winrm.rb +20 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32e4c0b2973c2c6f242ac87ad3744cd482583ff6b005805059cbec6ebe74ae28
|
4
|
+
data.tar.gz: f80125520a8722864ad78745d9078fc9ef3624bb281ab483735b783b12d1e85c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4511114adfd5e3be1b11d32f0ae937534173b46b35e62430c8d8158b0ae2caa1de99696da83287bd04e748d1fb108d0722feb3df08c888cc56c47d5e8bb216
|
7
|
+
data.tar.gz: 3b18bb605f2713fa30acc658cd3a15fd2026c50c58525ee43eedb0834a1297c0812ae661cb480fa22f97fb78844891cdce11b780d0dd6f8d7a9e48ba5e065664
|
data/lib/evil-winrm.rb
CHANGED
@@ -18,7 +18,7 @@ require 'time'
|
|
18
18
|
# Constants
|
19
19
|
|
20
20
|
# Version
|
21
|
-
VERSION = '
|
21
|
+
VERSION = '2.0'
|
22
22
|
|
23
23
|
# Msg types
|
24
24
|
TYPE_INFO = 0
|
@@ -178,6 +178,15 @@ class EvilWinRM
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
181
|
+
# Detect if a docker environment
|
182
|
+
def docker_detection()
|
183
|
+
if File.exist?("/.dockerenv") then
|
184
|
+
return true
|
185
|
+
else
|
186
|
+
return false
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
181
190
|
# Define colors
|
182
191
|
def colorize(text, color = "default")
|
183
192
|
colors = {"default" => "38", "blue" => "34", "red" => "31", "yellow" => "1;33", "magenta" => "35"}
|
@@ -387,6 +396,11 @@ class EvilWinRM
|
|
387
396
|
command = Readline.readline("*Evil-WinRM*".red + " PS ".yellow + pwd + "> ", true) # True for command history
|
388
397
|
|
389
398
|
if command.start_with?('upload') then
|
399
|
+
if self.docker_detection() then
|
400
|
+
puts()
|
401
|
+
self.print_message("Remember that in docker environment all local paths should be at /data and it must be mapped correctly as a volume on docker run command", TYPE_WARNING)
|
402
|
+
end
|
403
|
+
|
390
404
|
upload_command = command.tokenize
|
391
405
|
command = ""
|
392
406
|
|
@@ -408,6 +422,11 @@ class EvilWinRM
|
|
408
422
|
end
|
409
423
|
|
410
424
|
elsif command.start_with?('download') then
|
425
|
+
if self.docker_detection() then
|
426
|
+
puts()
|
427
|
+
self.print_message("Remember that in docker environment all local paths should be at /data and it must be mapped correctly as a volume on docker run command", TYPE_WARNING)
|
428
|
+
end
|
429
|
+
|
411
430
|
download_command = command.tokenize
|
412
431
|
command = ""
|
413
432
|
|
@@ -521,17 +540,6 @@ class EvilWinRM
|
|
521
540
|
rescue SignalException
|
522
541
|
self.custom_exit(130)
|
523
542
|
rescue SystemExit
|
524
|
-
rescue GSSAPI::GssApiError => e
|
525
|
-
if e.message.include? "Cannot contact any KDC for realm"
|
526
|
-
self.print_message("Check your /ect/krb5.conf and /etc/hosts files to ensure the format is correct and you can resolve #{$host}", TYPE_ERROR)
|
527
|
-
elsif e.message.include? "Clock skew too great"
|
528
|
-
self.print_message("Sync date with DC. A solution could be: rdate -n #{$host}", TYPE_ERROR)
|
529
|
-
elsif e.message.include? "No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_0)"
|
530
|
-
self.print_message("There is no ticket imported. A solution could be export KRB5CCNAME=/foo/var/ticket.ccache or cp /foo/var/ticket.ccache /tmp/krb5cc_0", TYPE_ERROR)
|
531
|
-
else
|
532
|
-
self.print_message("An error of type #{e.class} happened, message is: #{e.message}", TYPE_ERROR)
|
533
|
-
end
|
534
|
-
self.custom_exit(1)
|
535
543
|
rescue SocketError
|
536
544
|
self.print_message("Check your /etc/hosts file to ensure you can resolve #{$host}", TYPE_ERROR)
|
537
545
|
self.custom_exit(1)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evil-winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CyberVaca
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-11-
|
14
|
+
date: 2019-11-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: winrm
|