From 2e34ca6aaa5fb904cd4a95ca6c339374885b2510 Mon Sep 17 00:00:00 2001 From: Andrew Grant Date: Mon, 28 Jun 2021 21:18:45 -0400 Subject: [PATCH] Make Noobpwn machines jump around queues --- OpenBench/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenBench/views.py b/OpenBench/views.py index c5ba16c..b1757c1 100644 --- a/OpenBench/views.py +++ b/OpenBench/views.py @@ -18,7 +18,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -import os, hashlib, mimetypes, datetime, json +import os, hashlib, mimetypes, datetime, json, random import django.http import django.shortcuts @@ -601,6 +601,11 @@ def clientGetWorkload(request): # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # HACK: Make Noobpwnftw's workers jump around + if request.POST['username'] == 'WorkerPool': + if random.randrange(2) == 1: + return 'None' + # Verify the User's credentials try: user = authenticate(request, True) except UnableToAuthenticate: return HttpResponse('Bad Credentials')