first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
17
airflow/CVE-2020-17526/init-user.py
Normal file
17
airflow/CVE-2020-17526/init-user.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
from airflow import models, settings
|
||||
from airflow.contrib.auth.backends.password_auth import PasswordUser
|
||||
|
||||
os.system('/entrypoint initdb')
|
||||
|
||||
user = PasswordUser(models.User())
|
||||
user.username = 'vulhub'
|
||||
user.email = 'vulhub@example.com'
|
||||
user.password = 'vulhub'
|
||||
user.superuser = True
|
||||
session = settings.Session()
|
||||
session.add(user)
|
||||
session.commit()
|
||||
session.close()
|
||||
print('initial user finished')
|
Reference in New Issue
Block a user