Shawarma Spin
-
-
Something even more pointless than slashdot articles. Well done.
Also fuck you I'm deaf now.
-
Check the leaderboard.
-
How are their scores increasing so fast? I don't see any controls... hacked the game, or hidden options, or...?
edit: nevermind, those are teams.
-
if you open enough tabs at once I think it increases a little faster too...
Actually we're awful people is there something that we can do to muck with it?
-
There's server-side checking, apparently. I can hack the
Date
function to make it go really really fast, but it periodically resets my score to something lower and more reasonable.
-
All we have to do is convince the server there are million different users who watch the site. Then we can get Team WTF overflow the counter. Or better - make every other team overflow, keeping them close to zero all the time.
-
I guess I'll just keep this going in another window.
-
Come on, guys... you can run it in multiple tabs... I've got AAA through AAZ going.
I can't figure out how to get multiple instances running in 1 tab, but someone else can always try...
-
i haven't got time right now.
maybe this helps someone with websockets knowdeledgevar sock = io.connect('http://ws.shawarmaspin.com/'); //the two events that matter AFAIK sock.emit('set_team','WTF'); sock.emit('set_initials','SOC');
-
i haven't got time right now.
maybe this helps someone with websockets knowdeledgevar sock = io.connect('http://ws.shawarmaspin.com/'); //the two events that matter AFAIK sock.emit('set_team','WTF'); sock.emit('set_initials','SOC'); ```</blockquote> hmm..... i could write a js bot to do AAA-ZZZ pretty easily if that's all it is....
-
You all are going to knock DB9 off the board? D:
I don't advocating doing this and not listening to the music.
-
code here:
http://shawarmaspin.com/js/shawarmaspin.jsi tried to create a new socket from chromium console, but it just changed my name , maybe there's something i'm missing
-
not looking at the code yet, but......
this might get you a start
const io = require('socket.io'); const l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; for (let i = 0; i < l.length; i += 1) { for (let j = 0; j < l.length; j += 1) { for (let k = 0; k < l.length; k += 1) { let sock = io.connect('http://ws.shawarmaspin.com/'); sock.emit('set_team','WTF'); sock.emit('set_initials', l[i]+l[j]+l[k]); } } } function wait(){ setTimeout(wait, 60 * 60 * 1000); } wait();
-
What is the purpose of
wait
?
-
What is the purpose of wait?
to make sure the script doesn't terminate.
i couldn't remember of the top of my head if an open websocket would prevent nodejs from terminating the script or not and err'd on the side of caution.
-
Someone get me a Döner Kebab with EXTRA MEAT.
-
Anyway, it doesn't seem to be opening another socket. It seems to be one per tab.
-
Anyway, it doesn't seem to be opening another socket. It seems to be one per tab.
nodejs != chrome.
i did this @sockbot style
-
Yes master Sultanatrix of Swypos; @RaceProUK's queen, I shall appear as summoned.
-
changed for node 0.10
const io = require('socket.io-client'); const l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; for (var i = 0; i < l.length; i += 1) { for (var j = 0; j < l.length; j += 1) { for (var k = 0; k < l.length; k += 1) { var sock = io('http://ws.shawarmaspin.com/'); sock.emit('set_team','WTF'); sock.emit('set_initials', l[i]+l[j]+l[k]); } } } function wait(){ setTimeout(wait, 60 * 60 * 1000); } wait();
but it created one player, and it's changing its name...
maybe we need more processes
-
worth a try!
maybe we need more processes
@Jarry said:maybe we need m@Jarry said:
maybe we need more processes
ore processesDISCOURSE! STOP THAT!
-
Really there's no reason why the names have to be different. Names don't have to be unique, so if you can create multiple players, they can all be named UNK for all it cares.
-
```
const l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';http://i.pinger.pl/pgr320/69d0be6c00249da04eceb449/Ja-pierdole.jpg
-
GOT IT
for VARIABLE in 1 2 3 4 5 do node shawarma2.js & done
const io = require('socket.io-client'); var sock = io('http://ws.shawarmaspin.com/'); sock.emit('set_team','WTF'); sock.emit('set_initials', 'JAR'); function wait(){ setTimeout(wait, 60 * 60 * 1000); } wait();
if someone knows how to fork with node, please tell me
-
if someone knows how to fork with node, please tell me
well you could fork with node, but it's a bit of a clusterfuck.
:-P
-
@accalia said:
```
const l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';http://i.pinger.pl/pgr320/69d0be6c00249da04eceb449/Ja-pierdole.jpg</blockquote> /me smiles innocently yes?
-
Each time I read
Shawarma
I go like - it's spelledShoarma
in .nl and the other spelling just looks weird.
-
Okay... so Chrome handles it running in multiple tabs much better than Firefox does...
Right click the tab -> Duplicate tab -> Right click the new tab -> Mute tab -> click this bookmarklet, which should be on your bookmarks bar:
(change
initials
to your initials)javascript:var initials="UNK";document.getElementById("display_team").value="WTF";document.getElementById("display_team").dispatchEvent(new Event("change"));document.getElementById("display_initials").value=initials;document.getElementById("display_initials").dispatchEvent(new Event("change"));setTimeout(function(){if(document.getElementById("update_id")){document.getElementById("update_id").click()}else{setTimeout(arguments.callee,500)}},500);void(document.body.removeChild(document.getElementById("bgvid")));
I have it running in over 150 tabs currently.
edit: if anybody can figure out how to kill the sound from JS, let me know... muting the tab is kind of a pain, especially once the tab bar is completely full of 0-width tabs...
-
I got too greedy, and Chrome crashed. Oops.
-
So I come back to check this and apparently everyone else bailed out? I'm the only one still going...
-
I got bored at 8 tabs.
-
for node.js 4.0+
'use strict'; const io = require('socket.io-client'); const cluster = require('cluster'); const mooks = 3; if (cluster.isMaster){ for (let i = 0; i < mooks; i += 1){ const worker = cluster.fork(); worker.send(process.pid); } cluster.on('exit', (worker) => { console.log(`worker ${worker.process.pid} exited`); }); }else{ process.on('message', (pid) => { console.log(`worker ${cluster.worker.id} started`); let sock = io.connect('http://ws.shawarmaspin.com/'); sock.emit('set_team','WTF'); sock.emit('set_initials', `BOT`); sock.on('score', (data) => { console.log(`Worker ${cluster.worker.id} score: ${data.score_seconds / 60}`); }); sock.emit('message.team', `BOT ${pid}:${cluster.worker.id} Connected`); }); }
.... i'm goofing something up i'm sure because the connect message doesn't seem to fire correctly.
i'll let these three run overnight and see if they appear on the leaderboards
-
i'll let these three run overnight and see if they appear on the leaderboards
how many bots do you want?5k seem like enough?
-
Disclaimer: I know next-to-nothing about node.js.
But ... wasn't node.js supposed to be all about event-based IO? Why exactly do you need to fork into multiple processes ... can't you just fire up a bunch of connections and deal with whatever needs to happen whenever it happens?
-
But ... wasn't node.js supposed to be all about event-based IO? Why exactly do you need to fork into multiple processes ... can't you just fire up a bunch of connections and deal with whatever needs to happen whenever it happens?
mainly because it seems to do something wierd (okay, actually it makes sense for it to do this, but still) and coalesce the connections, but with a little googling i discovered a magic option that lets me force new connections!
new version with 100% less process forking ()
'use strict'; const io = require('socket.io-client'); const mooks = 30; const worker = (i) => { console.log(`worker ${i} started`); let sock = io.connect('http://ws.shawarmaspin.com/', {'force new connection': true}); sock.emit('set_team','WTF'); sock.emit('set_initials', `BOT`); sock.on('score', (data) => { console.log(`Worker ${i} score: ${data.score_seconds / 60}`); }); sock.emit('message.team', `BOT ${process.pid}:${i} Connected`); }; for (let i = 0; i < mooks; i += 1){ worker(i); }
-
hmm..... did we crash the thing? the bot's still getting messages (100 bots in the WTF group with ca. 600 points) but the website doesn't connect.....
-
I just entered this thread... you are all a bunch of cheating bastards!
Carry on!
-
Yeah, opening up the page, I'm not seeing anything.
-
Yeah, opening up the page, I'm not seeing anything.
i'm not sure if we broke it, but.... someone did.
-
Console has lots of errors. Also, I should have said...not seeing any players. The meat and the music show up.
-
The remote end seems to close new connections immediately (at least if I'm reading the
nc
output correctly):Warning: inverse host lookup failed for 45.55.12.6: ws.shawarmaspin.com [45.55.12.6] 80 (http) open sent 0, rcvd 0```
-
You DDoSed it?
-
-
You DDoSed it?
if it was me.... no. i'm only running 200 bots on a single box.
that would be just a plain DoS.... and an accidental one at that.
-
Well, it was 200 bots sharing the work. That's what I meant by distributed in this case. True, the whole thing was running on a single machine, but if that's what crashed it it would still be impossible to do with a single bot. We hope.
But yeah, semantics.
-
@JazzyJosh: can you please come back and edit the link in your topic starter to be /#/WTF instead of /#/DB9...
-
You could just flag.
-
I took care of it
-
No.
For the children
We spin the meat
Leading the board
Is such a feat
Burma-Shave