Аккаунты поместить в файл 'accs.txt'
Python:
import steam
import requests
import random
import time
#Nicknames
nicname = ['PupkaZalupka','KolykaTraher','Wats0n','TrupoedVegan', 'BatyaLubitPivo', 'LolzPrivet']
#Real names
realname = ['Vasya','Edya','Kolya','Danilka','Rubinshtayn','Pipka']
accs = list()
f = open('accs.txt')
for i in f:
acc = i.replace(':',';').strip('\n').strip(' ').strip('\r').split(';')
acc = acc[0] + ';' + acc[1]
accs.append(acc)
f.close()
for i in enumerate(accs):
acc = i[1].replace(':',';').strip('\n').strip(' ').strip('\r').split(';')
username = acc[0]
password = acc[1]
user = steam.webauth.WebAuth(username,password)
try:
session = user.login()
except steam.webauth.CaptchaRequired as err:
print('{}: {};{} - ошибка Captcah'.format(i[0]+1,username,password))
continue
except steam.webauth.EmailCodeRequired as err:
print('{}: {};{} - ошибка Guard'.format(i[0]+1,username,password))
continue
except steam.webauth.TwoFactorCodeRequired as err:
print('{}: {};{} - ошибка 2fa код'.format(i[0]+1,username,password))
continue
except steam.webauth.LoginIncorrect as err:
if str(err) == 'The account name or password that you have entered is incorrect.':
print(str(i[0]+1) + ': ' + username + ';' + password + ' - ' + str(err))
continue
if err == 'There have been too many login failures from your network in a short time period. Please wait and try again later.':
while True:
print(str(i[0]+1) + ': ' + username + ';' + password + ' - ' + str(err))
print('Sleep 10 min')
time.sleep(600)
try:
session = user.login()
break
except steam.webauth.LoginIncorrect:
pass
except steam.webauth.HTTPError as err:
while True:
print(str(i[0]+1) + ': ' + username + ';' + password + ' - ' + str(err))
print('Sleep 10 sec')
time.sleep(10)
try:
session = user.login()
break
except steam.webauth.HTTPError:
pass
while True:
status_code = session.post('https://steamcommunity.com/groups/tfcCompany',
data={
'action':'join',
'sessionID':user.session_id
}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (Вступление в группу)')
time.sleep(10)
while True:
status_code = session.get('https://steamcommunity.com/profiles/{}/edit'.format(user.steam_id)).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (переход в настройки)')
time.sleep(10)
while True:
status_code = session.post('https://steamcommunity.com/profiles/{}/edit'.format(user.steam_id),
data={
'sessionID': user.session_id,
'type': 'profileSave',
'weblink_1_title': '',
'weblink_1_url': '',
'weblink_2_title': '',
'weblink_2_url': '',
'weblink_3_title': '',
'weblink_3_url': '',
'personaName': random.choice(nicname) + str(random.randint(0,99999)),
'real_name': random.choice(realname),
'country': 'CL',
'state': '06',
'city': '9714',
'customURL': '',
'summary': 'Lublu LOLZ i Wats0n',
'primary_group_steamid': '103582791466138756'}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (устанавить ник)')
time.sleep(10)
while True:
status_code = session.post('https://steamcommunity.com/profiles/{}/ajaxsetprivacy/'.format(user.steam_id),
data={
'sessionid': user.session_id,
'Privacy': '{"PrivacyProfile":3,"PrivacyInventory":3,"PrivacyInventoryGifts":1,"PrivacyOwnedGames":3,"PrivacyPlaytime":3,"PrivacyFriendsList":3}',
'eCommentPermission': '1'
}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (открыть профиль)')
time.sleep(10)
while True:
status_code = session.post('https://steamcommunity.com/games/970610/selectAvatar',
data={
'selectedAvatar': random.randint(0,25),
'sessionid': user.session_id
}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (Аватар)')
time.sleep(10)
while True:
status_code = session.post('https://store.steampowered.com/checkout/addfreelicense',
data={
'action': 'add_to_cart',
'sessionid': user.session_id,
'subid': '303386'
}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (добавить игру)')
time.sleep(10)
while True:
status_code = session.post('https://store.steampowered.com/checkout/addfreelicense',
data={
'action': 'add_to_cart',
'sessionid': user.session_id,
'subid': '252108'
}).status_code
if status_code == 200: break
print(str(status_code) + ' ошибка sleep 10 sec (добавить игру)')
time.sleep(10)
print('{}: {};{} - готов'.format(i[0]+1,username,password))
Последнее редактирование: