Chaos Project

Game Development => Sea of Code => Topic started by: G_G on August 31, 2014, 11:24:54 am

Title: Steam Key Distributor
Post by: G_G on August 31, 2014, 11:24:54 am
Okay, so a few days ago I posted about a different method of distributing Steam keys to people without me actually being online to send out PMs to everyone. I've come up with a possible idea and would like some opinions, advice, and possible help with cookies and HTTP requests. Mostly wondering if I can login to CP with C# and store cookies allowing my software to send out PMs and modify a post. But let's get on with the software.

Instead of creating a web page or software that allows people to request Steam keys, I simply create a web scraper. It'll watch the topic and keep track of posts. Granted, I'll have to enforce people to start requesting in a certain way e.g. "REQUEST: Sanctum 2". The web scraping is the easy part and keeping track of posts would also be easy. I'd store every parsed post into a database so the software wouldn't accidentally do the same request. It'd also track dates to prevent multiple requests. It'd also be the database for all the keys I have so when someone asks for a key and we don't have it, simply have the software post "Sorry, we don't have that key." Also keeping track of multiple keys for the same game. Everytime a PM would get sent out, it'll modify the original post with the list of remaining games.

Things it'll do in order to keep the rules and fairness of Steam keys


Obviously, I'll throw in a few more checks and timers to make sure the system works properly. And I'll also do some tests with the machine in SPAM before making it go public obviously. Before I go into this, I remember Blizzad said that something shouldn't really need to be done as the system in place works now. It just takes time for me to send out keys when I'm working a lot.
Title: Re: Steam Key Distributor
Post by: ForeverZer0 on August 31, 2014, 11:37:14 am
Although writing the code would be a good experience, it seems this whole system is kind of unnecessary. It is not that complicated of a thing to simply PM out some keys here and there, even if it did take a few days in between requests. Seems like its just case of "building a better mousetrap".

Either way, it would be a neat little thing to automate the process. :)
Title: Re: Steam Key Distributor
Post by: G_G on August 31, 2014, 12:06:45 pm
I completely agree with you and Blizzard. I guess I was just trying to find a way to hand out the keys and come up with a new programming project. Overall, the effort it'd take to put in probably wouldn't be worth it other than the programming experience.
Title: Re: Steam Key Distributor
Post by: ForeverZer0 on August 31, 2014, 12:17:04 pm
Which is fine.
Everyone who programs here does it because they like to do it, and enjoy the experience. I have all sorts of things I have made that were not needed, but I just wanted a project to write code for. I don't mean to deter you from it, I completely understand.
Title: Re: Steam Key Distributor
Post by: Ryex on August 31, 2014, 12:31:17 pm
would you rather write it as a web app? that way instead of leaving your computer on 24/7 you you could host it somewhere like openshift for free.
Title: Re: Steam Key Distributor
Post by: Blizzard on August 31, 2014, 02:47:55 pm
If you're really going to do this, be very careful how you parse the HTML generated by CP. It's easy to make a mistake that allows people to exploit the system.
Title: Re: Steam Key Distributor
Post by: G_G on September 01, 2014, 07:21:25 am
Probably just going to do a Windows app. Because even if I turn it ooff then  on, it'll read all the unreadable posts since it's last update. And that's if I go through with this. Like Blizzard said, I have to be careful.

If I do program it, I'll do intensive testing in a scam topic and have everyone attempts to exploit it. I'm going to be busy for the next five days so it's just an idea for now. And I'll keeping trying to come up with ways to tackle it.
Title: Re: Steam Key Distributor
Post by: G_G on October 30, 2014, 02:17:25 am
It's pretty clear that this project was way over my head, but I just wanted to update saying that I made a key manager as an alternative. I still have to manually send keys, but it's so much easier adding new keys or removing used ones now. BBCode for the topic also gets generated depending on what keys are available. e.g. I could still have "Fez" in the game database but have no keys for it, so it won't be listed in the topic until I add new keys to the database.

All in all, I've made it a lot easier on myself and I can freely distribute keys without feeling annoyed. Overall, it's just a really simple webpage (with a user lock on it of course)
Spoiler: ShowHide
(http://puu.sh/cvYqW/20c82a54d5.gif)
Title: Re: Steam Key Distributor
Post by: Blizzard on October 30, 2014, 03:46:16 am
Nice, lol! I think that's the best option.
Title: Re: Steam Key Distributor
Post by: G_G on November 02, 2014, 08:48:47 pm
My next step, adding support for Origin and Desura keys. I have a few Origin keys and I actually don't run into them very often, but it's nice to have just in case. But through other bundle websites, I do manage to get a handful of Desura games.