winrm-cli 0.0.3 → 0.0.4
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 +7 -0
- data/bin/winrm-cli +6 -5
- data/lib/winrm-cli/version.rb +1 -1
- metadata +9 -15
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: bb34896b35f088f64b8bc09d8cc4e90175c01b29
|
|
4
|
+
data.tar.gz: 02685dac3f28d32c4f57cccbbe7c6bdd89dc89a9
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 03931be600f57feacb52ac4a3b42f3dfffaf33ca95df82cd4d574984114873751d84458a29b73ab5a526745368656536f1d4006afa769559e390dbb9ae975e1e
|
|
7
|
+
data.tar.gz: 380237b5b3e33df0e90c67c547925bd9524bdf77d3329089edea1abddabef772e5b3ca3156fdaa688b797640edbac6ea92d296d14f27d0227f1dd51ab3995d52
|
data/bin/winrm-cli
CHANGED
|
@@ -45,30 +45,31 @@ def encode_script(script)
|
|
|
45
45
|
end
|
|
46
46
|
script
|
|
47
47
|
end
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
command :cmd do |c|
|
|
49
50
|
c.syntax = 'execute <command>'
|
|
50
|
-
c.description = 'Executes a remote command'
|
|
51
|
+
c.description = 'Executes a remote command via CMD'
|
|
51
52
|
|
|
52
53
|
c.option '--computer STRING', String, 'Computer to execute against'
|
|
53
54
|
c.option '--username STRING', String, 'Username to login with'
|
|
54
55
|
c.option '--password STRING', String, 'The user\'s password'
|
|
55
56
|
|
|
56
57
|
c.action do |args, options|
|
|
57
|
-
|
|
58
|
+
script = ARGV.join(" ").split(' -- ',2)[1]
|
|
58
59
|
# create a session
|
|
59
60
|
session = EventMachine::WinRM::Session.new(:log_level => :info)
|
|
60
61
|
opts = {:user => options.username, :password => options.password, :basic_auth_only => basic_auth?(options.username), :operation_timeout => 1800, :disable_sspi => true }
|
|
61
62
|
session.use(options.computer,opts)
|
|
62
63
|
output_callbacks(session)
|
|
63
64
|
# run a command
|
|
64
|
-
session.relay_command(
|
|
65
|
+
session.relay_command("#{script}")
|
|
65
66
|
|
|
66
67
|
end
|
|
67
68
|
end
|
|
68
69
|
|
|
69
70
|
command :script do |c|
|
|
70
71
|
c.syntax = 'execute <command>'
|
|
71
|
-
c.description = 'Executes a remote command'
|
|
72
|
+
c.description = 'Executes a remote command via powershell'
|
|
72
73
|
|
|
73
74
|
c.option '--computer STRING', String, 'Computer to execute against'
|
|
74
75
|
c.option '--username STRING', String, 'Username to login with'
|
data/lib/winrm-cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: winrm-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.0.4
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Paul Morton
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: em-winrm
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
17
|
- - ~>
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
@@ -22,7 +20,6 @@ dependencies:
|
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
24
|
- - ~>
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
@@ -30,17 +27,15 @@ dependencies:
|
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: commander
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
|
-
- -
|
|
31
|
+
- - '>='
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
37
33
|
version: '0'
|
|
38
34
|
type: :runtime
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
|
-
- -
|
|
38
|
+
- - '>='
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
45
40
|
version: '0'
|
|
46
41
|
description: A WinRM Command Line Application
|
|
@@ -62,26 +57,25 @@ files:
|
|
|
62
57
|
- winrm-cli.gemspec
|
|
63
58
|
homepage: ''
|
|
64
59
|
licenses: []
|
|
60
|
+
metadata: {}
|
|
65
61
|
post_install_message:
|
|
66
62
|
rdoc_options: []
|
|
67
63
|
require_paths:
|
|
68
64
|
- lib
|
|
69
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
|
-
none: false
|
|
71
66
|
requirements:
|
|
72
|
-
- -
|
|
67
|
+
- - '>='
|
|
73
68
|
- !ruby/object:Gem::Version
|
|
74
69
|
version: '0'
|
|
75
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
|
-
none: false
|
|
77
71
|
requirements:
|
|
78
|
-
- -
|
|
72
|
+
- - '>='
|
|
79
73
|
- !ruby/object:Gem::Version
|
|
80
74
|
version: '0'
|
|
81
75
|
requirements: []
|
|
82
76
|
rubyforge_project:
|
|
83
|
-
rubygems_version:
|
|
77
|
+
rubygems_version: 2.0.3
|
|
84
78
|
signing_key:
|
|
85
|
-
specification_version:
|
|
79
|
+
specification_version: 4
|
|
86
80
|
summary: A WinRM Command Line Application
|
|
87
81
|
test_files: []
|