Author Topic: Steam Key Distributor  (Read 7231 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Steam Key Distributor
« on: August 31, 2014, 05:24:54 PM »
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
  • Read topic every X minutes to check for new posts
  • Parse all unread posts according to the software, store them as read so we don't parse them again. Check post body for request.
  • Check last three REQUEST posts, to make sure the post hasn't requested recently, also check to see if 48 hours have passed since last post
  • If request is legitimate, get username and send out a PM.
  • Remove key from database, generate new topic, modify the original post with list
  • Software will ignore any posts that don't have REQUEST: Game Name so normal discussions and questions can still go on.
  • Machine will ignore all posts made by my account for obvious reasons.

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.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: Steam Key Distributor
« Reply #1 on: August 31, 2014, 05:37:14 PM »
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. :)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: Steam Key Distributor
« Reply #2 on: August 31, 2014, 06: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.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: Steam Key Distributor
« Reply #3 on: August 31, 2014, 06: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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5137
  • LV: 198
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: Steam Key Distributor
« Reply #4 on: August 31, 2014, 06: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.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19954
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Steam Key Distributor
« Reply #5 on: August 31, 2014, 08: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.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: Steam Key Distributor
« Reply #6 on: September 01, 2014, 01:21:25 PM »
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.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: Steam Key Distributor
« Reply #7 on: October 30, 2014, 09: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)
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19954
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Steam Key Distributor
« Reply #8 on: October 30, 2014, 10:46:16 AM »
Nice, lol! I think that's the best option.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: Steam Key Distributor
« Reply #9 on: November 03, 2014, 03:48:47 AM »
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.