Fixed media issue in nginx proxy

This commit is contained in:
Yogesh Ojha
2021-08-15 09:41:06 +05:30
parent 8f5177c40b
commit bbfaa2cfe8
4 changed files with 24 additions and 14 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ CITY=Atlanta
# Database configurations
#
POSTGRES_DB=rengine
POSTGRES_USER=postgres
POSTGRES_USER=rengine
POSTGRES_PASSWORD=hE2a5@K&9nEY1fzgA6X
POSTGRES_PORT=5432
POSTGRES_HOST=db
+17 -6
View File
@@ -5,22 +5,23 @@ services:
restart: always
image: "postgres:12.3-alpine"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_PORT=5432
ports:
- "5432:5432"
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- rengine_network
ports:
- "5432:5432"
redis:
image: "redis:alpine"
hostname: redis
networks:
- rengine_network
celery:
build:
context: ./web
@@ -38,6 +39,11 @@ services:
- DEBUG=1
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_HOST=${POSTGRES_HOST}
depends_on:
- db
- redis
@@ -73,6 +79,11 @@ services:
- DEBUG=1
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_HOST=${POSTGRES_HOST}
volumes:
- ./web:/usr/src/app
- github_repos:/usr/src/github
+1
View File
@@ -137,6 +137,7 @@ services:
volumes:
- ./config/nginx/rengine.conf:/etc/nginx/conf.d/rengine.conf:ro
- static_volume:/usr/src/app/staticfiles/
- scan_results:/usr/src/scan_results
networks:
- rengine_network
+5 -7
View File
@@ -915,10 +915,10 @@ def directory_brute(task, domain, yaml_configuration, results_dir, activity_id):
if os.path.isfile(dirs_results):
with open(dirs_results, "r") as json_file:
json_string = json_file.read()
scanned_host = Subdomain.objects.get(
subdomain = Subdomain.objects.get(
scan_history__id=task.id, http_url=subdomain.http_url)
scanned_host.directory_json = json_string
scanned_host.save()
subdomain.directory_json = json_string
subdomain.save()
except Exception as exception:
logging.error(exception)
update_last_activity(activity_id, 0)
@@ -1933,11 +1933,8 @@ def get_and_save_leaked_credentials(scan_history, results_dir):
leak_target_file
)
pwndb_output = subprocess.getoutput(pwndb_command)
print(pwndb_output)
try:
pwndb_output = subprocess.getoutput(pwndb_command)
creds = json.loads(pwndb_output)
for cred in creds:
@@ -1952,6 +1949,7 @@ def get_and_save_leaked_credentials(scan_history, results_dir):
scan_history.emails.add(email_obj)
except Exception as e:
logger.error(e)
pass
def get_and_save_meta_info(meta_dict):