Fabbi / autoshift

automatic SHiFT code redemption script™
GNU General Public License v3.0
64 stars 23 forks source link

Getting redemption failures even with correct login #44

Closed MrAureliusR closed 2 years ago

MrAureliusR commented 2 years ago

I double-checked that my username and password are correct, but when I run ./auto.py it returns the HTML for the login page. Tried using both my username and my email as the user parameter -- no change. I can log into the website just fine. I had this script working in the past before -- did gearbox block it or something?

I can paste the HTML here if needed, but it's literally just the login page.

Fabbi commented 2 years ago

mh. You do need to use the email as login, but you did try that, so..

Does the HTML show that you are logged in? Or is there a error message somewhere in that HTML Code?

MrAureliusR commented 2 years ago

Here's the HTML I get:

<!DOCTYPE html>
<html>
  <head>
    <title>SHiFT</title>
    <link rel="stylesheet" media="screen" href="/assets/application-a33663a4a5f22277cc58019ba2015cff35c994956141b2d0c9703fb3ada686e7.css" />
    <script src="/assets/application-0d7fa21577b14d840e11ec9832448a4544b189103f094ccc943dc87cd641f71b.js"></script>
    <meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="lToYCGirIDCU9k92pJ341O03jRLtfWUndQ2IX1C4cEpr/DaQ7qHvlZMFPWxh0cPzGXxLptxrd350kFfLsBcQlA==" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-fe0b5e38406966e496383cdfbaf5314861496ad4b9248d67df2c3ca1e2c13d5d.ico" />
    <link rel="apple-touch-icon" type="image/png" href="/assets/shift_square-45f0f9eed06a1c5018cfb4ed94cb87ec3e4acb7271940a81c2d507b9cbf0347f.png" />
  </head>
  <body class="shift-bg-color">

    <div class="container sh_login_container min_height-container-login">
      <div class="sh_login_logo_container">
        <a class="sh_logo_white" href="/">Home</a>
      </div>
      <div class="sh_login_row sh_home">
  <div class="sh_fixed_image sh_fixed_image_03"></div>
  <div class="sh_login_row_container">
    <div class="sh_login_row_column">
      <h1>Sign in</h1>
      <div id="signin-container" class="login-container">
        <div id="signin">

          <form action="/sessions" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="B/zURZYjWIFJYML7Vt9dGHtpczxPWKDGdpdLe6DGfin5OvrdECmXJE6TsOGTk2Y/jyK1iH5Osp93CpTvQGke9w==" />
          <div class="form-group sh_signin_username">
              <input class="form-control" placeholder="email" type="email" name="user[email]" id="user_email" />
          </div>
          <div class="form-group sh_signin_password">
            <input class="form-control" placeholder="password" type="password" name="user[password]" id="user_password" />
          </div>
          <div class="row sh_signin_options">
            <div class="col-xs-12 col-md-6">
            </div>
            <div class="col-xs-12 col-md-6 text-right"><a href="/password/new">Forgot your password?</a></div>
          </div>
          <div></div>
          <div></div>
          <div><input type="hidden" name="redirect_to" id="redirect_to" value="https://shift.gearboxsoftware.com/entitlement_offer_codes" /></div>
          <div><input type="submit" name="commit" value="SIGN IN" class="sh_button_primary" data-disable-with="SIGN IN" /></div>
          <div class="sh_loading_animation_container">
            <div class="sh_loading_animation_image"><img src="/assets/LoginLoadingSpinner-435ffa844b1d702a63a3aed60a37e31c4c32330626fd72d11f28bf88bcf97078.svg"></div>
            <div class="sh_loading_animation_status">Signing In...</div>
          </div>
</form>      </div>
      <div class="sh_additional_login_options hide_on_submit">
        <h2>or</h2>
        <div class="login_options"><a href="/associations/steam/oauth2link"><img class="login_image" src="/assets/logos/logo_steam_login-8a1d08ed12c5c6b5e89b7d2d0ed46f8125816651d2f2d31d62d03c35678daf7a.png" /></a> <a href="/associations/xboxlive/oauth2link"><img class="login_image" src="/assets/logos/logo_xboxlive_login-4ceb0257387203dddf1eb4c13de7bee4fefad49391b3f3b9214537027caec777.png" /></a> <a href="/associations/psn/oauth2link"><img class="login_image" src="/assets/logos/logo_psn_login-4cea505ce2f6e7166ccd4885bdabf9f3fdc42e1ada77929384368c64452a8001.png" /></a> <a href="/associations/epic/oauth2link"><img class="login_image" src="/assets/logos/logo_epic_login-5ff31fe91911c386a9ebf0e92e97a4fd970882de6c03ae2289850ee056d284f9.png" /></a> <a href="/associations/twitch/oauth2link"><img class="login_image" src="/assets/logos/logo_twitch_login-cb5ebef54c3ce77b89b65d6912cd82a9ecc74e95ab05ab7be9a5fa257ada32f7.png" /></a> <a href="/associations/my2k/oauth2link"><img class="login_image" src="/assets/logos/logo_my2k_login-0fd5125b9a5df51fc466b52aa0af24f53d6e36b1c4c0e9663d530ab8d9ad0fad.png" /></a> <a href="/associations/googleplay/oauth2link"><img class="login_image" src="/assets/logos/logo_googleplay_login-e8cdbd76b6d47e45ca41fb4967c16b5434727900d1d6e618adfe4fbf9040b20b.png" /></a> <a href="/auth/facebook"><img class="login_image" src="/assets/logos/logo_facebook_login-31c71e150024f795d92dd47009bab9665965deab03b4287e9ebf16bc58d6aedf.png" /></a> <a href="/auth/twitter"><img class="login_image" src="/assets/logos/logo_twitter_login-0c5dbef55e6787d48d898f9a6e83cb103017a3409c25e9368c80b4013593a4a6.png" /></a> </div>
      </div>
      </div>
        </div>
        <div class="sh_login_row_column sh_dark_panel sh_login_promo">
          <div class="hide_on_submit">
            <h2>SHiFT Fuels Your Favorite Games</h2>
          <div class="sh_dark_panel_list_item">
            <div>
              <img src="/assets/svg_icons/community-0e050d6c63174da06595094815253ab139a7606e82e9f77d3db30a45c3a59ae3.svg">
            </div>
            <div>
              <h3>Join the Community</h3>
              <p>Share your stories, offer feedback, and connect with others on the Forums.</p>
            </div>
          </div>
          <div class="sh_dark_panel_list_item">
            <div>
              <img src="/assets/svg_icons/loot_reward-d1996331aee8a20fd00bb525167fcffe6c991343f643ff698a8cd24b3eb1189d.svg">
            </div>
            <div>
              <h3>Bonus Loot</h3>
              <p>Enable unique in-game items and perks. Redeem your SHiFT Codes.</p>
            </div>
          </div>
          <div class="sh_dark_panel_list_item">
            <div>
              <img src="/assets/svg_icons/key-75806d1a20dab0d0b914b63c44d7d36905d31101d1448f0a92c676b6aa14bf6b.svg">
            </div>
            <div>
              <h3>First in line</h3>
              <p>Be the first to know and the first to join exclusive betas..</p>
            </div>
          </div>
          <div>
              <a class="sh_create_new_account_button" rel="nofollow" data-method="post" href="/registration/pre?redirect_to=https%3A%2F%2Fshift.gearboxsoftware.com%2Fentitlement_offer_codes">Create new account</a>
          </div>
          </div>
      </div>
  </div>
</div>
    </div>

    <footer>
      <img class="sh_gearbox_brand" src="/assets/svg_icons/gearbox-54d00340e7f5f6439a7c62979e3d3774d14b56d5b79aad4b7ccfb87e74be809c.svg" />
      <ul class="sh_footer_menu">
        <li><a href="http://support.gearboxsoftware.com/hc/categories/200330390-shift">Support</a></li>
        <li><a href="https://shift.gearboxsoftware.com/privacy">Privacy</a></li>
        <li><a href="/tos">Terms</a></li>
        <li><a href="/cookie-policy">Cookies</a></li>
        <li><a href="/credits">Credits</a></li>
      </ul>
      <p>
        <small>&copy; 2022 Gearbox. SHiFT is a registered trademark of Gearbox Enterprises, LLC. The Playstation Network logo is a registered trademark of Sony Computer Entertainment Inc.
          <br/>The Xbox LIVE logo is a registered trademark of Microsoft Corporation. The Steam logo is a registered trademark of Valve Corporation. All rights reserved. Nintendo Switch is a trademark of Nintendo.
        </small>
      </p>
    </footer>

      <div id="cookie-banner" class="notice">
        <div class="banner-message" style="flex-basis: 70%;">
          Our websites use cookies to distinguish you from other users of our Sites. This helps us to provide you with a good experience when you browse our Sites and to improve our Sites. This Cookie Policy provides you with information about the types of cookies we use and the purposes for using those cookies, and applies to our Sites that link to or display this Cookie Policy.
        </div>
        <div class="banner-buttons">
          <form class="button_to" method="get" action="/cookie-policy"><input class="cancel-button" style="margin: 5px;" type="submit" value="Cookie Policy" /></form>
          <button name="button" type="button" onclick="closeBanner();" class="submit_button" style="margin: 5px;">Accept</button>
        </div>
      </div>

<!-- We're commenting out the Google Analytics calls because of a bug legal called out (SPARK-28525) and because this isn't being used we're leaving it disabled.
    <script type="text/javascript">
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-7740244-10', 'auto');
        ga('require', 'displayfeatures');
      ga('send', 'pageview');
    </script> -->

  </body>
</html>
alambers commented 2 years ago

I was having this same problem until, on a whim, I deleted my cookies file. After that it seems to have started working correctly again.

Fabbi commented 2 years ago

I was having this same problem until, on a whim, I deleted my cookies file. After that it seems to have started working correctly again.

well that is weird. @MrAureliusR Could you try that, too?

MrAureliusR commented 2 years ago

Cookies file... for which browser? Does autoshift pull the cookies from a particular browser? I don't quite understand how that would affect things, but I can try and find the cookies for Gearbox

alambers commented 2 years ago

There are a couple files under the data directory. One is called ".cookies.save" and the other is "keys.db". The cookies file contains your login information (and other website related stuff I believe.) The keys file is a small database containing the keys that have been attempted for your account. I just deleted both and started over and it's working fine now.

[image: width=] https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Aug 22, 2022 at 8:18 AM MrAureliusR @.***> wrote:

Cookies file... for which browser? Does autoshift pull the cookies from a particular browser? I don't quite understand how that would affect things, but I can try and find the cookies for Gearbox

— Reply to this email directly, view it on GitHub https://github.com/Fabbi/autoshift/issues/44#issuecomment-1222277707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMXQ7WA4CD3WENFAGKBHLV2NVZTANCNFSM547KO3HQ . You are receiving this because you commented.Message ID: @.***>

Fabbi commented 2 years ago

Cookies file... for which browser? Does autoshift pull the cookies from a particular browser? I don't quite understand how that would affect things, but I can try and find the cookies for Gearbox

you don't need to manually get your cookies from gearbox. When you login the tool saves the cookies it needs to the .cookies.save file so that you don't need to enter your user/pw everytime

MrAureliusR commented 2 years ago

Huh, I thought I sent an email reply to this but apparently it didn't work.

Removing those two files did the trick -- they were from a couple years ago, the first time I used autoshift!