Last active
October 11, 2023 03:36
-
-
Save retvil/d0e27abda56eba36abf1 to your computer and use it in GitHub Desktop.
[IOC] Free Steam (Add Program)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() | |
{ | |
if( location.href.match( /^https:\/\/store\.steampowered\.com\/account\/?$/ ) === null ) | |
{ | |
alert( 'Please run this on Steam\'s account page details: https://store.steampowered.com/account/' ); | |
return; | |
} | |
var freePackages = | |
[ | |
13601, // Source Filmmaker | |
21349, // Construct 2 | |
21403, // iPi Recorder 2 | |
21419, // Ohm Studio | |
28242, // Ohm Studio | |
35063, // Star Swarm Benchmark | |
35064, // Star Swarm Benchmark for Beta Testing | |
]; | |
var ownedPackages = {}; | |
jQuery( '.account_table a' ).each( function( i, el ) | |
{ | |
var match = el.href.match( /javascript:RemoveFreeLicense\( ([0-9]+), '/ ); | |
if( match !== null ) | |
{ | |
ownedPackages[ +match[ 1 ] ] = true; | |
} | |
} ); | |
var i = 0, | |
loaded = 0, | |
package = 0, | |
total = freePackages.length, | |
modal = ShowBlockingWaitDialog( 'Executing...', 'Please wait until all requests finish.' ); | |
var ExecuteRequest = function( ) | |
{ | |
while( i < total && ownedPackages[ ( package = freePackages[ i ] ) ] ) | |
{ | |
i++; | |
loaded++; | |
} | |
jQuery.ajax( | |
{ | |
type: 'POST', | |
dataType: 'text', | |
url: '//store.steampowered.com/checkout/addfreelicense', | |
data: | |
{ | |
action: 'add_to_cart', | |
sessionid: g_sessionID, | |
subid: package | |
} | |
} | |
).always( function( ) | |
{ | |
loaded++; | |
modal.Dismiss(); | |
if( loaded >= total ) | |
{ | |
ShowAlertDialog( 'GMF User All Program Done!', 'Nod33Eset for ..::GAMEINATOR::..' ); | |
} | |
else | |
{ | |
modal = ShowBlockingWaitDialog( 'Executing...', 'Loaded ' + loaded + '/' + total + '. Ignore all Errors.' ); | |
i++; | |
ExecuteRequest(); | |
} | |
} | |
); | |
}; | |
setTimeout( ExecuteRequest, 1500 ); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment