forked from p15670423/monkey
island: Enable standard mode with bcrypted passwords
This commit is contained in:
parent
060c4b0c40
commit
502bc3b296
|
@ -1,3 +1,5 @@
|
|||
import bcrypt
|
||||
|
||||
from monkey_island.cc.environment import Environment
|
||||
from monkey_island.cc.resources.auth.auth_user import User
|
||||
|
||||
|
@ -7,11 +9,10 @@ __author__ = "itay.mizeretz"
|
|||
class StandardEnvironment(Environment):
|
||||
_credentials_required = False
|
||||
|
||||
# SHA3-512 of '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()'
|
||||
NO_AUTH_CREDS = (
|
||||
"55e97c9dcfd22b8079189ddaeea9bce8125887e3237b800c6176c9afa80d2062"
|
||||
"8d2c8d0b1538d2208c1444ac66535b764a3d902b35e751df3faec1e477ed3557"
|
||||
)
|
||||
NO_AUTH_USER = "1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()"
|
||||
NO_AUTH_SECRET = bcrypt.hashpw(
|
||||
NO_AUTH_USER.encode("utf-8"), b"$2b$12$frH7uEwV3jkDNGgReW6j2u"
|
||||
).decode()
|
||||
|
||||
def get_auth_users(self):
|
||||
return [User(1, StandardEnvironment.NO_AUTH_CREDS, StandardEnvironment.NO_AUTH_CREDS)]
|
||||
return [User(1, StandardEnvironment.NO_AUTH_USER, StandardEnvironment.NO_AUTH_SECRET)]
|
||||
|
|
Loading…
Reference in New Issue