Skip to content

Commit 0ff7e4c

Browse files
authored
Merge pull request rapid7#20056 from bcoles/rubocop-modules-exploits-irix
modules/exploits/irix: Resolve RuboCop violations
2 parents 9fcc234 + d9d8c7e commit 0ff7e4c

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

modules/exploits/irix/lpd/tagprinter_exec.rb

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,47 @@ class MetasploitModule < Msf::Exploit::Remote
99
include Msf::Exploit::Remote::Tcp
1010

1111
def initialize(info = {})
12-
super(update_info(info,
13-
'Name' => 'Irix LPD tagprinter Command Execution',
14-
'Description' => %q{
12+
super(
13+
update_info(
14+
info,
15+
'Name' => 'Irix LPD tagprinter Command Execution',
16+
'Description' => %q{
1517
This module exploits an arbitrary command execution flaw in
16-
the in.lpd service shipped with all versions of Irix.
17-
},
18-
'Author' => [ 'optyx', 'hdm' ],
19-
'License' => MSF_LICENSE,
20-
'References' =>
21-
[
18+
the in.lpd service shipped with all versions of Irix.
19+
},
20+
'Author' => [ 'optyx', 'hdm' ],
21+
'License' => MSF_LICENSE,
22+
'References' => [
2223
['CVE', '2001-0800'],
2324
['OSVDB', '8573']
2425
],
25-
'Privileged' => false,
26-
'Platform' => %w{ irix unix },
27-
'Arch' => ARCH_CMD,
28-
'Payload' =>
29-
{
30-
'Space' => 512,
26+
'Privileged' => false,
27+
'Platform' => %w[irix unix],
28+
'Arch' => ARCH_CMD,
29+
'Payload' => {
30+
'Space' => 512,
3131
'DisableNops' => true,
32-
'Compat' =>
33-
{
34-
'PayloadType' => 'cmd',
35-
'RequiredCmd' => 'generic telnet',
36-
}
32+
'Compat' => {
33+
'PayloadType' => 'cmd',
34+
'RequiredCmd' => 'generic telnet'
35+
}
3736
},
38-
'Targets' =>
39-
[
40-
[ 'Automatic Target', { }]
37+
'Targets' => [
38+
[ 'Automatic Target', {}]
4139
],
42-
'DisclosureDate' => '2001-09-01',
43-
'DefaultTarget' => 0))
40+
'DisclosureDate' => '2001-09-01',
41+
'DefaultTarget' => 0,
42+
'Notes' => {
43+
'Reliability' => [REPEATABLE_SESSION],
44+
'Stability' => [CRASH_SAFE],
45+
'SideEffects' => [IOC_IN_LOGS]
46+
}
47+
)
48+
)
4449

45-
register_options(
46-
[
47-
Opt::RPORT(515)
48-
])
50+
register_options([
51+
Opt::RPORT(515)
52+
])
4953
end
5054

5155
def check
@@ -54,11 +58,12 @@ def check
5458
resp = sock.get_once
5559
disconnect
5660

57-
if (resp =~ /IRIX/)
61+
if resp =~ /IRIX/
5862
vprint_status("Response: #{resp.strip}")
59-
return Exploit::CheckCode::Vulnerable
63+
return CheckCode::Vulnerable
6064
end
61-
return Exploit::CheckCode::Safe
65+
66+
CheckCode::Safe
6267
end
6368

6469
def exploit

0 commit comments

Comments
 (0)