keystroker 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/keystroker.rb +59 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b1954898b871cee865038f7b1255300039fedc5cf71a40e0c2ca141b501f0ed
|
4
|
+
data.tar.gz: e2a0283d4789cf89d206c054871259b82ca70b0fb31a0fe33b84ec69cc719d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39cec5dbfd2757d0cac19953379ca9660cd0dde2f49b7f9843b8a9cbee57420834135e3f051be9d517d0959092bdf65dd192f905d8d56f0476b98e2dabbbd245
|
7
|
+
data.tar.gz: 1776c6fda2bc7fa48f497d980e63ea7b2a597f11755116adc2d3cacd7d085915e688cbfec0610aa77fc39209dfece85c80e4919a20bd70c7a3f93eb888e7ef63
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/keystroker.rb
CHANGED
@@ -74,11 +74,70 @@ class Keystroker
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def to_hg0()
|
77
|
+
|
78
|
+
a = []
|
79
|
+
|
80
|
+
@doc.root.each_recursive do |x|
|
81
|
+
|
82
|
+
if @debug then
|
83
|
+
puts ('x:' + x.inspect).debug
|
84
|
+
puts ('x2: ' + x.next_sibling.inspect).debug
|
85
|
+
end
|
86
|
+
|
87
|
+
next unless x
|
88
|
+
|
89
|
+
if x.name == 'type' then
|
90
|
+
a << ' ' + x.text
|
91
|
+
else
|
92
|
+
instruction = x.name
|
93
|
+
instruction += '+' + x.attributes[:key] if x.attributes[:key]
|
94
|
+
a << ' {' + instruction + '}'
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
a.join.lstrip
|
100
|
+
|
77
101
|
end
|
78
102
|
|
79
103
|
def to_kbml(options={})
|
80
104
|
@doc.xml(options)
|
81
105
|
end
|
106
|
+
|
107
|
+
def to_vbs()
|
108
|
+
|
109
|
+
a = []
|
110
|
+
|
111
|
+
@doc.root.each_recursive do |x|
|
112
|
+
|
113
|
+
next unless x
|
114
|
+
|
115
|
+
if x.name == 'type' then
|
116
|
+
a << ''
|
117
|
+
a << %Q(WshShell.SendKeys "%s") % x.text
|
118
|
+
else
|
119
|
+
|
120
|
+
modifiers = {ctrl: '^', shift: '+', alt: '%'}
|
121
|
+
|
122
|
+
instruction = if modifiers[x.name.to_sym] then
|
123
|
+
modifiers[x.name.to_sym]
|
124
|
+
else
|
125
|
+
"{%s}" % x.name.upcase
|
126
|
+
end
|
127
|
+
|
128
|
+
if x.attributes[:key] then
|
129
|
+
instruction += '{' + x.attributes[:key] + '}'
|
130
|
+
end
|
131
|
+
|
132
|
+
a << %Q(WshShell.SendKeys "%s") % instruction
|
133
|
+
a << '' if x.name == 'enter'
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
a.prepend('Set WshShell = WScript.CreateObject("WScript.Shell")' + "\n")
|
139
|
+
puts a.join("\n")
|
140
|
+
end
|
82
141
|
|
83
142
|
end
|
84
143
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keystroker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
Y75jscjma5VGumEWUU9ZrhHuSQ+SNpMw9dZtARbRcf8TnE4LLF9jWLtekrmnjrXR
|
36
36
|
fbotKKSziDi68epQo5Nn6RKn
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-04-
|
38
|
+
date: 2019-04-21 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|