Giter Site home page Giter Site logo

steamkeyactivator's Introduction

Steam Key Activator

Activates your Steam keys in bulk.

Can also query and activate all Steam keys from your HumbleBundle account.

As this uses Steam's new online key registration form, it does not require a Steam client.

Works on Windows / Linux / macOS.

Usage

Synopsis:

Usage: activator [--verbose] [ACTION] [ACTION-ARGUMENTS]...

Options:
  ACTION  Action to perform (see list below)

Actions:
  humble-bundle  Activate all Steam keys from your HumbleBundle library
  hb-keys        Activate Steam keys from HumbleBundle product keys from file
  steam-keys     Activate Steam keys from file

To activate all Steam keys from your HumbleBundle account:

  1. Visit your HumbleBundle keys page and claim any unclaimed Steam keys you wish to activate (see Notes below)
  2. Follow the configuration instructions below
  3. Run ./activator humble-bundle

To activate a list of Steam keys:

  1. Create a text file, and paste your Steam keys in it (one key per line, and nothing else)
  2. Follow the configuration instructions below (you can skip the HumbleBundle configuration)
  3. Run ./activator steam-keys path/to/your/steam-key-list.txt

Building

  1. Install DMD and Dub:

    • Windows: Download and run the installer

    • macOS:

      brew install dmd dub
      
    • Arch Linux:

      pacaur -S dmd dub
      
    • Anything else:

      curl -fsS https://dlang.org/install.sh | bash -s dmd
      
  2. Run dub build.

Configuration

To allow the program to access your Steam and HumbleBundle accounts, you must export your cookies from said websites from your web browser.

Instructions:

  1. Visit https://store.steampowered.com/ in your web browser of choice.
  2. Ensure that you are logged in. If you aren't, log in now.
  3. Open the Developer Console or equivalent (usually done by pressing F12).
  4. Open the "Network" tab in the Developer Console (or equivalent).
  5. Reload the page.
  6. Click on the very first request added to the request list, which should be for the https://store.steampowered.com/ page.
  7. Find the "Request headers" pane in the Developer Console or equivalent.
  8. Find the "Cookie" header within.
  9. Copy the value of the cookie header.
  10. Create the text file cookies/store.steampowered.com.txt under this project's directory.
  11. Paste the value of the cookie header.
  12. Repeat the above steps substituting store.steampowered.com with www.humblebundle.com.

Log in sessions may expire after a few days, so you may need to repeat the above steps should the program stop working.

Cache

To prevent redoing previous work, this program will aggressively cache all requests to Steam and HumbleBundle. Delete the cache/ directory to force the program to re-check for new keys.

In addition to the cache, the program will save a report of key activations to the file results.txt, and will skip over keys listed in that file.

Notes

  • Steam's key activation is severely throttled. After 10 unsuccessful key activations, no keys can be activated for an hour. This program will keep retrying until the cooldown expires, however activating a lot of keys may take up to several days.

  • This program will not claim unclaimed Steam keys from your HumbleBundle library. If you wish to claim all Steam keys, you must first go through https://www.humblebundle.com/home/keys and click on all "Activate on Steam" buttons yourself. This must be done manually because this action is not undoable, and precludes gifting the game key using HumbleBundle's website to someone else.

Troubleshooting

  • Run the program with the --verbose switch to enable verbose mode. This will show details for all HTTP requests.

  • Cached responses may contain additional information. The program will print URLs and file names their responses are cached to in verbose mode.

steamkeyactivator's People

Contributors

cybershadow avatar remygrandin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

steamkeyactivator's Issues

Does not build on DUB 1.14

I've just cloned and followed the readme instructions to build, and got the following:

  $ dub --version
DUB version 1.14.0, built on Mar  2 2019

  $ dub build
Performing "debug" build using dmd for x86_64.
activator ~master: building configuration "application"...
Error: module `net` is in file 'net.d' which cannot be read
import path[0] = /Users/danielheath/.dub/packages/ae-0.0.1995/ae/sys
import path[1] = /Users/danielheath/.dub/packages/ae-0.0.1995/ae/utils
import path[2] = /Users/danielheath/.dub/packages/ae-0.0.1995/ae/net
import path[3] = /usr/local/opt/dmd/include/dlang/dmd
dmd failed with exit code 1.

Codes not activating

Whenever i try to bulk activate codes, it just says next result in 00:00:00.1 and nothing happens
Uten navn-2

Action list in `-h` is blank

  $ ./activator -h
Usage: activator [--verbose] [ACTION] [ACTION-ARGUMENTS]...

Options:
  ACTION  Action to perform (see list below)

The list below is missing.

Failed to load curl, tried "libcurl.dll", "curl.dll"

Hi,

when I run activator.exe I get following error message.

std.net.curl.CurlException@std\net\curl.d(4239): Failed to load curl, tried "libcurl.dll", "curl.dll".

0x00007FF782E4CC73 in std.exception.bailOut!(std.net.curl.CurlException).bailOut at C:\D\dmd2\windows\bin....\src\phobos\std\exception.d(516)
0x00007FF782E4CB79 in std.exception.enforce!(std.net.curl.CurlException).enforce!bool.enforce at C:\D\dmd2\windows\bin....\src\phobos\std\exception.d(437)
0x00007FF7830A1AC2 in void* std.net.curl.CurlAPI.loadAPI()
0x00007FF7830A199D in pure @nogc @safe void* std.net.curl.CurlAPI.instance().__dgliteral1()
0x00007FF7830D633B in pure @nogc @safe void* std.concurrency.initOnce!(std.net.curl.CurlAPI._handle).initOnce(lazy void*).__dgliteral2()
0x00007FF7830F9778 in ref void* std.concurrency.initOnce!(std.net.curl.CurlAPI._handle).initOnce(lazy void*, shared(core.sync.mutex.Mutex))
0x00007FF7830D6307 in ref void* std.concurrency.initOnce!(std.net.curl.CurlAPI._handle).initOnce(lazy void*)
0x00007FF7830A1974 in ref @Property std.net.curl.CurlAPI.API std.net.curl.CurlAPI.instance()
0x00007FF78307874D in ref @Property std.net.curl.CurlAPI.API std.net.curl.Curl.curl()
0x00007FF7830787BA in void std.net.curl.Curl.initialize()
0x00007FF783041EF7 in void std.net.curl.HTTP.initialize()
0x00007FF783041BA8 in std.net.curl.HTTP std.net.curl.HTTP.opCall()
0x00007FF783032358 in ae.sys.net.cachedcurl.CachedCurlNetwork.this at C:\Users\hmcsc\Downloads\steamkeyactivator-master....\AppData\Local\dub\packages\ae-0.0.2845\ae\sys\net\cachedcurl.d(58)
0x00007FF783034AFF in ae.sys.net.cachedcurl._staticCtor_L262_C1 at C:\Users\hmcsc\Downloads\steamkeyactivator-master....\AppData\Local\dub\packages\ae-0.0.2845\ae\sys\net\cachedcurl.d(264)
0x00007FF78303831D in void ae.sys.net.cachedcurl.__modctor()
0x00007FF7830FCB3F in void rt.minfo.runModuleFuncs!(rt.minfo.ModuleGroup.runTlsCtors().__lambda1).runModuleFuncs(const(immutable(object.ModuleInfo))[])
0x00007FF7830DB33D in void rt.minfo.ModuleGroup.runTlsCtors()
0x00007FF7830A5DFD in int rt.minfo.rt_moduleTlsCtor().__foreachbody1(ref rt.sections_win64.SectionGroup)
0x00007FF7830A5DC6 in rt_moduleTlsCtor
0x00007FF78309048C in rt_init
0x00007FF783084BF4 in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])
).runAll()
0x00007FF783084B5F in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate())
0x00007FF783084966 in d_run_main2
0x00007FF783046AF3 in d_run_main
0x00007FF782D01792 in activator._d_cmain!().main at C:\D\dmd2\windows\bin....\src\druntime\import\core\internal\entrypoint.d(29)
0x00007FF78316A998 in __scrt_common_main_seh at D:\agent_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
0x00007FFEC1F37C24 in BaseThreadInitThunk
0x00007FFEC322D721 in RtlUserThreadStart

Package version issue ?

Hi,

I was trying to get the software to run but I got an error while buiilding it :

❯ dub build
Performing "debug" build using /home/scipio/dlang/dmd-2.094.2/linux/bin64/dmd for x86_64.
activator ~master: building configuration "application"...
../../.dub/packages/ae-0.0.2384/ae/sys/data.d(497,19): Error: declaration expected, not delete
../../.dub/packages/ae-0.0.2384/ae/sys/data.d(501,1): Error: unrecognized declaration
/home/scipio/dlang/dmd-2.094.2/linux/bin64/dmd failed with exit code 1.

I tried updating the ae package to the lastest version avaialable in dub.sdl (and added gcc and zlib1g-dev as dud and thelinker was complaining it was missing and then it build.

Also, not sure if related to using the updated ez package, but when running it seem to fail with or without the cookie file I placed in cookies/www.humblebundle.com.txt

❯ ./activator --verbose humble-bundle
Error extracting Humble Bundle keys array. Make sure you are logged in and your cookies file is up to date.
core.exception.AssertError@/home/scipio/dlang/dmd-2.094.2/linux/bin64/../../src/phobos/std/algorithm/iteration.d(627): Attempting to fetch the front of an empty map.
----------------
??:? _d_assert_msg [0x5612463bf302]
/home/scipio/dlang/dmd-2.094.2/linux/bin64/../../src/phobos/std/algorithm/iteration.d:627 nothrow @property @safe immutable(char)[] std.algorithm.iteration.MapResult!(ae.utils.regex.extractCaptures!(immutable(char)[]).extractCaptures!(immutable(char)[], std.regex.internal.ir.Regex!(char).Regex).extractCaptures(immutable(char)[], std.regex.internal.ir.Regex!(char).Regex).__lambda3, std.regex.RegexMatch!(immutable(char)[]).RegexMatch).MapResult.front() [0x561246367596]
activator.d:34 void activator.activateHBProducts() [0x5612461c936b]
activator.d:138 void activator.Activator.humbleBundle() [0x5612461ca4a4]
../../.dub/packages/ae-0.0.2845/ae/utils/funopt.d:304 void ae.utils.funopt.funopt!(activator.Activator.humbleBundle(), ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x561246325c7a]
../../.dub/packages/ae-0.0.2845/ae/utils/funopt.d:626 void ae.utils.funopt.funoptDispatch!(activator.Activator, ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]).fun(immutable(char)[], immutable(char)[][]) [0x5612463257c5]
../../.dub/packages/ae-0.0.2845/ae/utils/funopt.d:304 void ae.utils.funopt.funopt!(ae.utils.funopt.funoptDispatch!(activator.Activator, ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]).fun(immutable(char)[], immutable(char)[][]), ae.utils.funopt.FunOptConfig([6]), ae.utils.funopt.funoptDispatch!(activator.Activator, ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun).funoptDispatch(immutable(char)[][]).myUsageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x56124632a895]
../../.dub/packages/ae-0.0.2845/ae/utils/funopt.d:640 void ae.utils.funopt.funoptDispatch!(activator.Activator, ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun(immutable(char)[])).funoptDispatch(immutable(char)[][]) [0x561246325613]
activator.d:171 void activator.dispatch(bool, ae.utils.funopt.OptionImpl!(2, immutable(char)[], "Action to perform (see list below)", \x00, null, null).OptionImpl, immutable(char[])[]) [0x5612461ca672]
../../.dub/packages/ae-0.0.2845/ae/utils/funopt.d:304 void ae.utils.funopt.funopt!(activator.dispatch(bool, ae.utils.funopt.OptionImpl!(2, immutable(char)[], "Action to perform (see list below)", \x00, null, null).OptionImpl, immutable(char[])[]), ae.utils.funopt.FunOptConfig(null), activator.usageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x56124632d4c7]
activator.d:176 void activator.run(immutable(char)[][]) [0x5612461ca697]
../../.dub/packages/ae-0.0.2845/ae/utils/main.d:37 int activator.__mixin17.run(immutable(char)[][]) [0x5612461ca6bb]
../../.dub/packages/ae-0.0.2845/ae/utils/main.d:45 int activator.__mixin17.runCatchingException!(std.getopt.GetOptException, "Usage error").runCatchingException(immutable(char)[][]) [0x56124620bb6f]
../../.dub/packages/ae-0.0.2845/ae/utils/main.d:70 _Dmain [0x5612461ca6df]

Do you have an idea of what went wrong ?

Segfault on OSX Mojave (10.14.4)

I've built it now, but it segfaults when I run it.

  $ dub
Fetching ae 0.0.2331 (getting selected version)...
Performing "debug" build using dmd for x86_64.
activator ~master: building configuration "application"...
Linking...
Running ./activator
Program exited with code -11
 2(20:55:27) /Volumes/Code/steamkeyactivator  [master]
  $ ./activator
Segmentation fault: 11
 139(20:55:36) /Volumes/Code/steamkeyactivator  [master]
  $ ./activator -?
std.getopt.GetOptException@/usr/local/opt/dmd/include/dlang/dmd/std/getopt.d(792): Unrecognized option -?
----------------
activator.d:153 @safe void std.getopt.getoptImpl!().getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]]) [0x70c19bf]
activator.d:153 @safe void std.getopt.getoptImpl!(immutable(char)[], bool*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]], immutable(char)[], bool*) [0x70c16c4]
activator.d:153 @safe void std.getopt.getoptImpl!(immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]], immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*) [0x70c039f]
activator.d:153 @safe void std.getopt.getoptImpl!(immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]], immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*) [0x70bf542]
activator.d:153 @safe void std.getopt.getoptImpl!(immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]], immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*) [0x70be86f]
activator.d:153 @safe void std.getopt.getoptImpl!(std.getopt.config, immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*).getoptImpl(ref immutable(char)[][], ref std.getopt.configuration, ref std.getopt.GetoptResult, ref std.getopt.GetOptException, void[][immutable(char)[]], void[][immutable(char)[]], std.getopt.config, immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*) [0x70be25a]
activator.d:153 @safe std.getopt.GetoptResult std.getopt.getopt!(std.getopt.config, immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*).getopt(ref immutable(char)[][], std.getopt.config, immutable(char)[], bool*, immutable(char)[], immutable(char)[]*, immutable(char)[], immutable(char[])[]*, immutable(char)[], bool*) [0x70be192]
activator.d:153 void ae.utils.funopt.funopt!(activator.activator(bool, ae.utils.funopt.OptionImpl!(2, immutable(char)[], "Action to perform (see list below)", \x00, null, null).OptionImpl, immutable(char[])[]), ae.utils.funopt.FunOptConfig(null), ae.utils.funopt.defaultUsageFun(immutable(char)[])).funopt(immutable(char)[][]) [0x70bd24a]
activator.d:177 int activator.__mixin15.run(immutable(char)[][]) [0x6f76647]

Attached the binary in case you don't have a mac handy to build it with.

activator.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.