Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/support/acceptance/session/python.rb
19719 views
1
module Acceptance::Session
2
PYTHON_METERPRETER = {
3
payloads: [
4
{
5
name: "python/meterpreter_reverse_tcp",
6
extension: ".py",
7
platforms: [:osx, :linux, :windows],
8
execute_cmd: ["python", "${payload_path}"],
9
generate_options: {
10
'-f': "raw"
11
},
12
datastore: {
13
global: {},
14
module: {
15
MeterpreterTryToFork: false,
16
PythonMeterpreterDebug: true
17
}
18
}
19
}
20
],
21
module_tests: [
22
{
23
name: "post/test/services",
24
platforms: [
25
[
26
:linux,
27
{
28
skip: true,
29
reason: "Windows only test"
30
}
31
],
32
[
33
:osx,
34
{
35
skip: true,
36
reason: "Windows only test"
37
}
38
],
39
:windows
40
],
41
skipped: false,
42
lines: {
43
linux: {
44
known_failures: []
45
},
46
osx: {
47
known_failures: []
48
},
49
windows: {
50
known_failures: [
51
"[-] [should start W32Time] FAILED: should start W32Time",
52
"[-] [should start W32Time] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
53
"[-] [should stop W32Time] FAILED: should stop W32Time",
54
"[-] [should stop W32Time] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
55
"[-] [should list services] FAILED: should list services",
56
# Ruby 3.2
57
["[-] [should list services] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
58
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
59
["[-] [should list services] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
60
"[-] [should return info on a given service winmgmt] FAILED: should return info on a given service winmgmt",
61
# Ruby 3.2
62
["[-] [should return info on a given service winmgmt] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
63
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
64
["[-] [should return info on a given service winmgmt] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
65
"[-] FAILED: should create a service testes",
66
"[-] [should return info on the newly-created service testes] FAILED: should return info on the newly-created service testes",
67
# Ruby 3.2
68
["[-] [should return info on the newly-created service testes] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
69
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
70
["[-] [should return info on the newly-created service testes] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
71
"[-] [should delete the new service testes] FAILED: should delete the new service testes",
72
"[-] [should delete the new service testes] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
73
"[-] [should return status on a given service winmgmt] FAILED: should return status on a given service winmgmt",
74
"[-] [should return status on a given service winmgmt] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
75
"[-] [should modify config on a given service] FAILED: should modify config on a given service",
76
"[-] [should modify config on a given service] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
77
"[-] FAILED: should start a disabled service",
78
"[-] [should restart a started service W32Time] FAILED: should restart a started service W32Time",
79
"[-] [should restart a started service W32Time] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6."
80
]
81
}
82
}
83
},
84
{
85
name: "post/test/cmd_exec",
86
platforms: [:linux, :osx, :windows],
87
skipped: false,
88
lines: {
89
linux: {
90
known_failures: []
91
},
92
osx: {
93
known_failures: []
94
},
95
windows: {
96
known_failures: []
97
}
98
}
99
},
100
{
101
name: "post/test/extapi",
102
platforms: [:linux, :osx, :windows],
103
skipped: false,
104
lines: {
105
linux: {
106
known_failures: []
107
},
108
osx: {
109
known_failures: []
110
},
111
windows: {
112
known_failures: [
113
# Ruby 3.2
114
["[-] [should return clipboard jpg dimensions] FAILED: should return clipboard jpg dimensions", { flaky: true }],
115
["[-] [should return clipboard jpg dimensions] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass", { flaky: true }],
116
["[-] [should download clipboard jpg data] FAILED: should download clipboard jpg data", { flaky: true }],
117
["[-] [should download clipboard jpg data] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass", { flaky: true }],
118
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
119
["[-] [should return clipboard jpg dimensions] FAILED: should return clipboard jpg dimensions", { flaky: true }],
120
["[-] [should return clipboard jpg dimensions] Exception: NoMethodError: undefined method 'clipboard' for nil", { flaky: true }],
121
["[-] [should download clipboard jpg data] FAILED: should download clipboard jpg data", { flaky: true }],
122
["[-] [should download clipboard jpg data] Exception: NoMethodError: undefined method 'clipboard' for nil", { flaky: true }],
123
]
124
}
125
}
126
},
127
{
128
name: "post/test/file",
129
platforms: [:linux, :osx, :windows],
130
skipped: false,
131
lines: {
132
linux: {
133
known_failures: []
134
},
135
osx: {
136
known_failures: []
137
},
138
windows: {
139
known_failures: []
140
}
141
}
142
},
143
{
144
name: "post/test/get_env",
145
platforms: [:linux, :osx, :windows],
146
skipped: false,
147
lines: {
148
linux: {
149
known_failures: []
150
},
151
osx: {
152
known_failures: []
153
},
154
windows: {
155
known_failures: []
156
}
157
}
158
},
159
{
160
name: "post/test/meterpreter",
161
platforms: [:linux, :osx, :windows],
162
skipped: false,
163
lines: {
164
linux: {
165
known_failures: []
166
},
167
osx: {
168
known_failures: []
169
},
170
windows: {
171
known_failures: [
172
]
173
}
174
}
175
},
176
{
177
name: "post/test/railgun",
178
platforms: [:linux, :osx, :windows],
179
skipped: false,
180
lines: {
181
linux: {
182
known_failures: []
183
},
184
osx: {
185
known_failures: []
186
},
187
windows: {
188
known_failures: []
189
}
190
}
191
},
192
{
193
name: "post/test/railgun_reverse_lookups",
194
platforms: [:linux, :osx, :windows],
195
skipped: false,
196
lines: {
197
linux: {
198
known_failures: []
199
},
200
osx: {
201
known_failures: []
202
},
203
windows: {
204
known_failures: []
205
}
206
}
207
},
208
{
209
name: "post/test/registry",
210
platforms: [
211
[
212
:linux,
213
{
214
skip: true,
215
reason: "Windows only test"
216
}
217
],
218
[
219
:osx,
220
{
221
skip: true,
222
reason: "Windows only test"
223
}
224
],
225
:windows
226
],
227
skipped: false,
228
lines: {
229
linux: {
230
known_failures: []
231
},
232
osx: {
233
known_failures: []
234
},
235
windows: {
236
known_failures: []
237
}
238
}
239
},
240
{
241
name: "post/test/search",
242
platforms: [:linux, :osx, :windows],
243
skipped: false,
244
lines: {
245
linux: {
246
known_failures: []
247
},
248
osx: {
249
known_failures: []
250
},
251
windows: {
252
known_failures: []
253
}
254
}
255
},
256
{
257
name: "post/test/unix",
258
platforms: [
259
:linux,
260
:osx,
261
[
262
:windows,
263
{
264
skip: true,
265
reason: "Unix only test"
266
}
267
]
268
],
269
skipped: false,
270
lines: {
271
linux: {
272
known_failures: []
273
},
274
osx: {
275
known_failures: []
276
},
277
windows: {
278
known_failures: []
279
}
280
}
281
}
282
]
283
}
284
end
285
286