shaddox 0.0.12 → 0.0.13
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/shaddox/target.rb +7 -12
- data/lib/shaddox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5453ebbc5938bd3524a2717fbd412b3c6cbae940
|
|
4
|
+
data.tar.gz: e29e70aef8c4ea1a13630d9d2876753175eda65f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c4948e0476e99926f220e62382ca39507b866140d4a0f4e52aa57efafc12967880dcfbe00a69222a7dfa8accaea43ff2d4bfe4a92c9c6c49c0a2b4e335db479
|
|
7
|
+
data.tar.gz: 20af0a2218f08ed384007ed82e7a488cd60453c4802827f8d9312798bdadf87a62a696d162fad214c682b559d1834edcb1e8fd7c28962d265d2ade70202814bb
|
data/lib/shaddox/target.rb
CHANGED
|
@@ -120,22 +120,17 @@ module Shaddox
|
|
|
120
120
|
def exec(command)
|
|
121
121
|
exit_code = nil
|
|
122
122
|
@ssh.open_channel do |channel|
|
|
123
|
-
channel.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
channel.request_pty do |c, success|
|
|
124
|
+
raise "SSH could not obtain a pty." unless success
|
|
125
|
+
channel.exec(command)
|
|
126
|
+
channel.on_data do |c_, data|
|
|
127
127
|
$stdout.print data
|
|
128
128
|
if data =~ /^\[sudo\]|Password/i
|
|
129
|
-
|
|
129
|
+
warning "Target is asking for password: ", 1
|
|
130
|
+
channel.send_data(gets.strip + "\n")
|
|
130
131
|
end
|
|
131
132
|
end
|
|
132
|
-
|
|
133
|
-
#$stderr.print data
|
|
134
|
-
#if data =~ /^\[sudo\] password for user:/
|
|
135
|
-
#channel.send_data(gets.strip)
|
|
136
|
-
#end
|
|
137
|
-
#end
|
|
138
|
-
ch.on_request('exit-status') do |ch, data|
|
|
133
|
+
channel.on_request('exit-status') do |ch, data|
|
|
139
134
|
exit_code = data.read_long
|
|
140
135
|
end
|
|
141
136
|
end
|
data/lib/shaddox/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shaddox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- joshglendenning
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sourcify
|