Make Noobpwn machines jump around queues

This commit is contained in:
Andrew Grant committed 2021-06-28 21:18:45 -04:00
1 parent 6bfad345fc
commit 2e34ca6aaa
1 file changed
+6 -1
+6 -1
View File
@@ -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')