Skip to content

Commit ef826b3

Browse files
committed
OCD - print_good & print_error
1 parent 0f453c6 commit ef826b3

File tree

187 files changed

+288
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+288
-289
lines changed

modules/auxiliary/admin/2wire/xslt_password_reset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def run
130130
cookies = res.get_cookies
131131
if cookies && cookies.match(/(.*); path=\//)
132132
cookie= $1
133-
print_status("Got cookie #{cookie}. Password reset was successful!\n")
133+
print_good("Got cookie #{cookie}. Password reset was successful!\n")
134134
end
135135
end
136136
end

modules/auxiliary/admin/http/axigen_file_access.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def initialize(info = {})
5050
def run
5151
print_status("Trying to login")
5252
if login
53-
print_good("Login successful")
53+
print_good("Login Successful")
5454
else
5555
print_error("Login failed, review USERNAME and PASSWORD options")
5656
return

modules/auxiliary/admin/http/contentkeeper_fileaccess.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_host(ip)
4343

4444
if (res and res.code == 500)
4545

46-
print_status("Request appears successful on #{rhost}:#{rport}! Response: #{res.code}")
46+
print_good("Request appears successful on #{rhost}:#{rport}! Response: #{res.code}")
4747

4848
file = send_request_raw(
4949
{

modules/auxiliary/admin/http/jboss_seam_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ def run
8787

8888

8989
if (res and res.headers['Location'] =~ %r(pwned=java.lang.UNIXProcess))
90-
print_status("Exploited successfully")
90+
print_good("Exploited successfully")
9191
else
92-
print_status("Exploit failed.")
92+
print_error("Exploit failed")
9393
end
9494
else
9595
print_error("Target appears not vulnerable!")

modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def initialize(info = {})
5050
def run
5151
print_status("Trying to login")
5252
if login
53-
print_good("Login successful")
53+
print_good("Login Successful")
5454
else
5555
print_error("Login failed, review USERNAME and PASSWORD options")
5656
return

modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def run
208208
end
209209

210210
# no result? let's just go on and bruteforce the timestamp
211-
print_bad("#{peer} - Well that didn't work... let's do it the hard way.")
211+
print_error("#{peer} - Well that didn't work... let's do it the hard way.")
212212

213213
# get the current date from the router and parse it
214214
end_time = get_current_time

modules/auxiliary/admin/http/wp_custom_contact_forms.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def run
9797

9898
# login successful
9999
if cookie
100-
print_status("User #{username} with password #{password} successfully created")
100+
print_good("User #{username} with password #{password} successfully created")
101101
store_valid_credential(user: username, private: password, proof: cookie)
102102
else
103103
print_error("User creation failed")

modules/auxiliary/admin/mssql/mssql_findandsampledata.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ def sql_statement()
345345
begin
346346
result = mssql_query(sql, false) if mssql_login_datastore
347347
column_data = result[:rows]
348-
print_status("Successfully connected to #{rhost}:#{rport}")
348+
print_good("Successfully connected to #{rhost}:#{rport}")
349349
rescue
350-
print_status ("Failed to connect to #{rhost}:#{rport}.")
350+
print_error("Failed to connect to #{rhost}:#{rport}.")
351351
return
352352
end
353353

modules/auxiliary/admin/scada/modicon_password_recovery.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def setup_ftp_connection
130130
)
131131
return true
132132
else
133-
print_status("#{ip}:#{rport} - FTP - Login failed")
133+
print_error("#{ip}:#{rport} - FTP - Login failed")
134134
return false
135135
end
136136
end

modules/auxiliary/admin/scada/moxa_credentials_recovery.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,34 +133,34 @@ def get_string(data)
133133
# helper function for extracting password from 0x29 FC response
134134
def get_pass(response)
135135
if response.length() < 200
136-
print_status("get_pass failed: response not long enough")
136+
print_error("get_pass failed: response not long enough")
137137
return
138138
end
139139
pass = get_string(response[200..-1])
140-
print_status("password retrieved: #{pass}")
140+
print_good("password retrieved: #{pass}")
141141
store_loot("moxa.get_pass.admin_pass", "text/plain", rhost, pass)
142142
return pass
143143
end
144144

145145
# helper function for extracting snmp community from 0x28 FC response
146146
def get_snmp_read(response)
147147
if response.length() < 24
148-
print_status("get_snmp_read failed: response not long enough")
148+
print_error("get_snmp_read failed: response not long enough")
149149
return
150150
end
151151
snmp_string = get_string(response[24..-1])
152-
print_status("snmp community retrieved: #{snmp_string}")
152+
print_good("snmp community retrieved: #{snmp_string}")
153153
store_loot("moxa.get_pass.snmp_read", "text/plain", rhost, snmp_string)
154154
end
155155

156156
# helper function for extracting snmp community from 0x2C FC response
157157
def get_snmp_write(response)
158158
if response.length() < 64
159-
print_status("get_snmp_write failed: response not long enough")
159+
print_error("get_snmp_write failed: response not long enough")
160160
return
161161
end
162162
snmp_string = get_string(response[64..-1])
163-
print_status("snmp read/write community retrieved: #{snmp_string}")
163+
print_good("snmp read/write community retrieved: #{snmp_string}")
164164
store_loot("moxa.get_pass.snmp_write", "text/plain", rhost, snmp_string)
165165
end
166166

@@ -169,7 +169,7 @@ def get_snmp_write(response)
169169
def get_creds(response)
170170
if response.length() < 200
171171
# attempt failed. device may not be unlocked
172-
print_status("get_creds failed: response not long enough. Will fall back to other functions")
172+
print_error("get_creds failed: response not long enough. Will fall back to other functions")
173173
return -1
174174
end
175175
get_snmp_read(response)

0 commit comments

Comments
 (0)