Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » A.cc ChristmasHack

This thread is locked; no one can reply to it. rss feed Print
A.cc ChristmasHack
Billybob
Member #3,136
January 2003

You can't grab the ID, cookies are not accessible outside of the set domain (though there may be an option to make a cookie public...not that anyone does that).

Your best bet for a "hack" would be to use cURL to access the A.cc login page. Have people give you their login info, then your script can attempt to login and if it works then you know it's them.
Not exactly the best way to do it though.

EDIT: Looking at AWiki it sends people to:
http://www.allegro.cc/account/login/http://awiki.tomasu.org/bin/view$logon=1
O_o

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

Your best bet for a "hack" would be to use cURL to access the A.cc login page. Have people give you their login info, then your script can attempt to login and if it works then you know it's them.
Not exactly the best way to do it though.

Not to mention that I wouldn't trust a semi-random person with my login data for A.cc. That's not really a solution, and BAF mentioned that a better one exist (AWiki uses it), so...

[EDIT] It seems that "/account/login/" passes a "token" to the URL provided. Whatever that token means... I think I will just PM Matthew and see if he is willing to help me out.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Billybob
Member #3,136
January 2003

Well
http://www.allegro.cc/account/login/http://awiki.tomasu.org/bin/view$logon=1
works for any url so like
http://www.allegro.cc/account/login/http://www.google.com
should work (I tried a different url, but google should work as well). The script returns a "token" variable in GET and REQUEST. I have no idea what that token is :P but it's a step closer to cracking this algorithm!

EDIT: Beaten!

BAF
Member #2,981
December 2002
avatar

Token looks like a session ID of some sort to me... not sure, but it looks fairly easy to handle to me, run the login then store your data.

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

Token looks like a session ID of some sort to me... not sure, but it looks fairly easy to handle to me, run the login then store your data.

OK, the fact of returning a token means that the user is in fact a member of A.cc. But, I'd like to be able to discern which of the members is it. AWiki does that, it has e.g. the %avatar% tag which can display my avatar - so it knows who I am. Somehow, it must get that info from the token.

Maybe I just didn't understand what you said, I'm getting a little sleepy :P.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Billybob
Member #3,136
January 2003

My guess is that AWiki takes the token and gives it to another a.cc script which returns user info. The process may seem redundent but it isn't. By having the server contact a.cc personally with an arbitrary hash it can be sure the data it gets is from A.cc, and not the user.
You are mistaken in assuming that when you get a token it means the person is an a.cc member. I could just as easily enter in www.yoursite.com/yourscript.php?token=blah in my browser. That is why the assumed second step of having the server take the token back to a.cc is important.

Jakub Wasilewski
Member #3,653
June 2003
avatar

I hope to hear from either Matthew or Thomas Fjellstrom (he is the one managing AWiki, right?) soon. Meanwhile, I'll proceed with making other parts of the site. Once I get the required information I'll plug in the A.cc authentication.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

BAF
Member #2,981
December 2002
avatar

William: the returning of a token doesnt automatically mean you're logged in correctly, but the point was you won't recieve a real token unless you logged in correctly.

Jakub Wasilewski
Member #3,653
June 2003
avatar

I already got a reply from Matthew and I'm currently plugging it into the code. Once I'm done, I will put it up on the net.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Billybob
Member #3,136
January 2003

I'm curious as to what he said...

BAF
Member #2,981
December 2002
avatar

Remote a.cc authentication is great for stuff like this. Perhaps amarillion and I could set this up for TINS/TINS uploading too.

Jakub Wasilewski
Member #3,653
June 2003
avatar

WH: Matthew asked me not to spread the information, but basically you had the right idea.

Everything is already set up and working. I'll queue a news item for the front page, and give you all the details here.

Right now you can:

  • register

  • set your game descriptions and preferences

  • vote on others' descriptions

If you are logged in on A.cc, registration should be really simple. There is no e-mail verification, so be sure you get it right the first time :).

The link: http://xmashack.bafsoft.com

Enjoy! It's 3:17 here, and I'm going to have nice three hours of sleep :). Please excuse any bugs that slipped in because of weariness.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Billybob
Member #3,136
January 2003

It isn't working. I am logged in but it says my member # is 0. Also it failed the first time I tried (url was broken).
Site looks nice though.

BAF
Member #2,981
December 2002
avatar

You have to hit 'register' first. It worked fine for me, pretty cool! Great job!

Jakub Wasilewski
Member #3,653
June 2003
avatar

Try now. Everything should be up by now. If it's not, it'll have to wait until tomorrow, I can't think straight anymore.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

nonnus29
Member #2,606
August 2002
avatar

I think the contest should require everyone to use a language they haven't previously used to code their entry. Like ruby or scheme using kazzmirs bindings. That would really show us who is king of christmas hackery mountain.

edit; nice site, I registered! (maybe I'll feel like coding around christmas time...)

BAF
Member #2,981
December 2002
avatar

Thanks! Good night!

Billybob
Member #3,136
January 2003

It works now, yay! I'm all registered and I've voted.

Thanks for all the hard work Jakub! This is going to be fun ;D

Onewing
Member #6,152
August 2005
avatar

Quote:

Like ruby or scheme using kazzmirs bindings

Scheme? I hate you. ;)

[EDIT] - Just signed up! Now let's get this thing more popular! I say, continually send-to-top until the event starts. ;D

BTW, if you vote on something with "so-so", is it possible that you might get that as the game your expected to do?

------------
Solo-Games.org | My Tech Blog: The Digital Helm

Matthew Leverton
Supreme Loser
January 1999
avatar

The Rules said:

the [1MB] ZIP must contain (apart from game data):

  • If your pair is a Windows user: a Windows binary, all needed DLLs if any

  • If your pair is a Linux user: the source code, links to any external libs you used, binary if possible

  • If your pair is a Mac OS X user: a Mac OS X binary, and whatever one needs on Mac OS X to run a game ;).

The binary requirement is unnecessary and impractical. Just change it so that only the (cross platform) source & datafiles are required.

ImLeftFooted
Member #3,935
October 2003
avatar

One megabyte o_O!? Are you sure about that rule... ?

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

The binary requirement is unnecessary and impractical. Just change it so that only the (cross platform) source & datafiles are required.

I liked to make an alternative for users of external libraries. For example, getting 3 libs installed just to compile a game is boring/tiring, while the binary version can ship with DLLs/whatever shared libs the system uses.

On the other hand, preparing a cross-platform makefile (or even just a makefile) takes some work, and even then MSVC only users won't be satisfied. And I wouldn't like to split the "develop for" tick-boxes to cover compilers :-/.

I'm going to reword the rules a little, possibly making binary for the two systems an "encouraged option", and the source - required. I will also add information about the screening process (I overlooked it the first time).

Anyway, I have a small upgrade for you - looking at your participation page, you will be able to see how your descriptions are rated. Red is below the screening threshold, green is good. [Corrected this: now gives the right figures :)]. Also, you can now click the "registered user(s)" text to get a list of participants.

[edit]

[RULESET UPDATED!] Source is now a requirement, binary is an encouraged option.

Quote:

One megabyte o_O!? Are you sure about that rule... ?

We won't have as many participants as SpeedHack/TINS, so that shouldn't be a problem. And even if it would be a problem, it would be BAF's call to make the limit smaller (he provides the bandwidth).

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

NyanKoneko
Member #5,617
March 2005
avatar

If we host elsewhere, can we upload more than a 1 megabyte project? The Allegro DLL is like 800kb alone. I really want to focus on giving as much as possible (MP3s, art, etc...), as opposed to worrying about space constraints.

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

The Allegro DLL is like 800kb alone. I really want to focus on giving as much as possible (MP3s, art, etc...), as opposed to worrying about space constraints.

The Allegro DLL when properly prepared is only like 250kb, and you don't have to distribute it with your game (take note of the fact that the rules were updated). We can probably safely assume that everyone has or knows where to get 4.2.0 shared libs.

The 1mb requirement is already extremely lenient in comparison to other hacks. I don't think we should push it further.

I could allow adding an "extended version" link to a ZIP hosted externally, in addition to the "hack version" hosted on BAFSoft. I'll think about it and let you know, OK?

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

miran
Member #2,407
June 2002

Quote:

If we host elsewhere, can we upload more than a 1 megabyte project?

Make your game download the data when it is started for the first time. :)

--
sig used to be here



Go to: