- Дней с нами
- 3.865
- Розыгрыши
- 0
- Сообщения
- 186
- Репутация
- 38
- Реакции
- 157
Скрипт для получения карточек за голосование и просмотр списка рекомендаций Зимней Распродажи Steam 2021-22
для расширения: https://chrome.google.com/webstore/detail/steam-user-manager/iodilljgbjnjooeololeoomijekomamf
Тема на форуме с описанием: https://mipped.com/f/threads/steam-user-manager-rasshirenie-dlja-brauzera.182148/
Запустить со страницы (скопировать и вставить в адресную строку):
chrome-extension://iodilljgbjnjooeololeoomijekomamf/popup/popup.html
вставить в консоль (F12)
В расширение не обязательно добавлять maFile (maFile нужен для возможности получать 2FA-код, подтверждения обмена и выставления лотов на торговую площадку)
Скрипт для получения стикеров Зимней Распродажи:
для расширения: https://chrome.google.com/webstore/detail/steam-user-manager/iodilljgbjnjooeololeoomijekomamf
Тема на форуме с описанием: https://mipped.com/f/threads/steam-user-manager-rasshirenie-dlja-brauzera.182148/
Запустить со страницы (скопировать и вставить в адресную строку):
chrome-extension://iodilljgbjnjooeololeoomijekomamf/popup/popup.html
вставить в консоль (F12)
JavaScript:
let vote = true,//true - включить голосование; false - оставить только просмотр списка рекомендаций
sha1 = (login, cb) => window.crypto.subtle.digest({name: "SHA-1"}, new Uint8Array(login.match(/.{1}/g).map(s => s.charCodeAt()))).then(result => cb([...new Uint8Array(result)].map(n => n.toString(16)).join(''))),
voteAppids = {"61":["892970","1063730","1091500","1196590","1551360"],"62":["752480","1358140","1402320","1499120","1576350"],"63":["570","105600","252490","275850","1172470"],"64":["892970","924970","1240440","1426210","1782210"],"65":["607080","848450","860510","1178830","1551360"],"66":["1092790","1097200","1195290","1252330","1282730"],"67":["699130","1203220","1325200","1466860","1517290"],"68":["1088850","1113560","1382330","1384160","1490890"],"69":["936790","1091500","1196590","1259420","1328670"],"70":["1135690","1210320","1248130","1291340","1455840"]},
chrome_id = `${chrome.runtime.id}_id`;
chrome.runtime.sendMessage('getAccs', accs => {
let explore = (ids, cb) => {
if(ids.length){
let id = ids.shift(),
acc = accs.find(acc => acc.id == id);
console.log(acc.login);
console.log(`${accs.length - ids.length} of ${accs.length}`);
req('get', 'https://store.steampowered.com/explore/', null, {[chrome_id]: id}).done(data => {
let rgApps = {n: -1},
sessionid = data.match(/var g_sessionID = "([a-f0-9]{24})";/);
sessionid = sessionid && sessionid[1];
if(sessionid){
let salevote = voteids => {
if(voteids.length){
let voteid = voteids.shift(),
appid = voteAppids[voteid][Math.floor(Math.random() * 5)];
req('post', 'https://store.steampowered.com/salevote', {sessionid, voteid, appid, developerid: 0}, {[chrome_id]: id}).done(() => {
setTimeout(() => salevote(voteids), Math.floor(Math.random() * 1500));
}).fail(() => {
if(acc.err++ < 5){
setTimeout(() => salevote(voteids.concat(voteid), Math.floor(Math.random() * 5000)));
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 5000));
}
});
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 3000));
}
};
let clear_queue = queue => {
if(queue){
rgApps.queue.push(queue);
}else{
rgApps.n++;
}
while(rgApps.queue.length){
let queue = rgApps.queue.shift();
req('post', 'https://store.steampowered.com/app/10', {
sessionid, appid_to_clear_from_queue: queue
}, {[chrome_id]: id}).done(() => {
clear_queue();
}).fail(() => {
setTimeout(() => clear_queue(queue), Math.floor(Math.random() * 5000));
});
}
if(rgApps.n == rgApps.m){
if(vote){
setTimeout(() => salevote(Object.keys(voteAppids)), Math.floor(Math.random() * 3000));
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 3000));
}
}
};
req('post', 'https://store.steampowered.com/explore/generatenewdiscoveryqueue', {sessionid}, {[chrome_id]: id}).done(data => {
if(data && Array.isArray(data.queue)){
rgApps.queue = data.queue;
rgApps.m = rgApps.queue.length;
clear_queue();
}else{
if(acc.err++ < 5){
setTimeout(() => explore(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 5000));
}
}
}).fail(() => {
if(acc.err++ < 5){
setTimeout(() => explore(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 5000));
}
});
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 3000));
}
}).fail(() => {
if(acc.err++ < 5){
setTimeout(() => explore(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => explore(ids, cb), Math.floor(Math.random() * 5000));
}
});
}else{
cb();
}
};
let ids = [];
for(let acc of accs){
sha1(acc.login, id => {
ids.push(id);
acc.id = id;
acc.err = 0;
if(accs.length == ids.length){
explore(ids, () => console.log(true));
}
})
}
});
Скрипт для получения стикеров Зимней Распродажи:
JavaScript:
chrome.runtime.sendMessage('getAccs', accs => {
let sha1 = (login, cb) => window.crypto.subtle.digest({name: "SHA-1"}, new Uint8Array(login.match(/.{1}/g).map(s => s.charCodeAt()))).then(result => cb([...new Uint8Array(result)].map(n => n.toString(16)).join(''))),
chrome_id = `${chrome.runtime.id}_id`,
ClaimItem = (ids, cb) => {
if(ids.length){
let id = ids.shift(),
acc = accs.find(acc => acc.id == id);
console.log(acc.login);
console.log(`${accs.length - ids.length} of ${accs.length}`);
req('get', 'https://store.steampowered.com/points/shop', null, {[chrome_id]: id}).done(data => {
let access_token = data.match(/webapi_token":"([\da-z]{32})"/);
access_token = access_token && access_token[1];
if(access_token){
req('post', `https://api.steampowered.com/ISaleItemRewardsService/ClaimItem/v1?access_token=${access_token}`, {input_protobuf_encoded: ''}, {[chrome_id]: id}).done(() => {
setTimeout(() => ClaimItem(ids, cb), Math.floor(Math.random() * 3000));
}).fail(() => {
if(acc.err++ < 5){
setTimeout(() => ClaimItem(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => ClaimItem(ids, cb), Math.floor(Math.random() * 5000));
}
});
}else{
if(acc.err++ < 5){
setTimeout(() => ClaimItem(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => ClaimItem(ids, cb), Math.floor(Math.random() * 5000));
}
}
}).fail(() => {
if(acc.err++ < 5){
setTimeout(() => ClaimItem(ids.concat(id), cb), Math.floor(Math.random() * 5000));
}else{
setTimeout(() => ClaimItem(ids, cb), Math.floor(Math.random() * 5000));
}
});
}else{
cb();
}
};
let ids = [];
for(let acc of accs){
sha1(acc.login, id => {
ids.push(id);
acc.id = id;
acc.err = 0;
if(accs.length == ids.length){
ClaimItem(ids, () => console.log(true));
}
})
}
});
Последнее редактирование: