Skip to content

Commit

Permalink
Merge pull request #18 from daylamtayari/master
Browse files Browse the repository at this point in the history
Fixed issue #17 and issue #19
  • Loading branch information
offsecginger authored Apr 12, 2022
2 parents 077323b + 02bf06d commit 4104294
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docker_challenges/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ def get_client_cert(docker):
client = docker.client_cert
ckey = docker.client_key
ca_file = tempfile.NamedTemporaryFile(delete=False)
ca_file.write(bytes(ca,'utf-8'))
ca_file.write(ca)
ca_file.seek(0)
client_file = tempfile.NamedTemporaryFile(delete=False)
client_file.write(bytes(client,'utf-8'))
client_file.write(client)
client_file.seek(0)
key_file = tempfile.NamedTemporaryFile(delete=False)
key_file.write(bytes(ckey,'utf-8'))
key_file.write(ckey)
key_file.seek(0)
CERT = (client_file.name, key_file.name)
except:
Expand Down Expand Up @@ -298,13 +298,13 @@ def create_container(docker, image, team, portbl):
client = docker.client_cert
ckey = docker.client_key
ca_file = tempfile.NamedTemporaryFile(delete=False)
ca_file.write(bytes(ca,'utf-8'))
ca_file.write(ca)
ca_file.seek(0)
client_file = tempfile.NamedTemporaryFile(delete=False)
client_file.write(bytes(client,'utf-8'))
client_file.write(client)
client_file.seek(0)
key_file = tempfile.NamedTemporaryFile(delete=False)
key_file.write(bytes(ckey,'utf-8'))
key_file.write(ckey)
key_file.seek(0)
CERT = (client_file.name, key_file.name)
except:
Expand Down
2 changes: 1 addition & 1 deletion docker_challenges/assets/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
get_docker_status(DOCKER_CONTAINER);
})();
</script>
{{ challenge.description }}
{{ challenge.html }}
<div class='mb-3 text-center' id='docker_container'>
<span>
<a onclick="start_container('{{ challenge.docker_image | safe }}');" class='btn btn-dark'>
Expand Down

0 comments on commit 4104294

Please sign in to comment.