Skip to content

Instantly share code, notes, and snippets.

@Tithen-Firion
Tithen-Firion / openload.js
Last active Nov 20, 2021
Openload: extract download URL using PhantomJS
View openload.js
// Usage: phantomjs openload.js <video_url>
// if that doesn't work try: phantomjs --ssl-protocol=any openload.js <video_url>
var separator = ' | ';
var page = require('webpage').create(),
system = require('system'),
id, match;
if(system.args.length < 2) {
console.error('No URL provided');
View 1_WeTV_cKey_function.md

Here's the code (in JavaScript and Python) to make the cKey for downloading stuff from WeTV. This works for encryption version 8.1. Both versions accept the same arguments, first 5 (vid, tm, appVer, guid and platform) are the same as in the call to https://play.wetv.vip/getvinfo. url is optional for JavaScript but required for Python - that's the URL of the page you're on. userAgent, referer, navCodeName, navName and navPlatform are optional, check the code for default values.

Usage

JavaScript

makeCKey(/* arguments here */);
View 1_WeTV_hijack_callback.md

With this code you can hijack the JSON data WeTV player loads - doesn't matter the encryption version. Change the hijackedCallback function to do whatever you want with the data and then you can create a bookmarklet with this tool. After running the bookmarklet it will hijack one request - initial video load or when you change the quality. Comment out line 10 if you want it to keep hijacking.


If you use this code in your project - let me know and credit me. ;)

@Tithen-Firion
Tithen-Firion / minified version for bookmarklet
Last active Apr 21, 2021
Steam background cropper. Crops showcase and avatar images from background. Works on background image url.
View minified version for bookmarklet
javascript:(function(){function%20a(a){var%20b=document.createElement("script");b.onload=function(){++d},b.src=a,document.body.appendChild(b)}function%20b(){2==d&&(window.clearInterval(e),c())}function%20c(){var%20a,b,c=document.createElement("canvas"),d=new%20JSZip,e=new%20Image,f=c.getContext("2d"),g=function(a,b,d,g){c.width=d,c.height=g,f.drawImage(e,a,b,d,g,0,0,d,g);var%20h=c.toDataURL("image/png");return%20h.substr(h.indexOf(",")+1)},h=function(a,b,c,e,f){d.file(a,g(b,c,e,f),{base64:!0})},i=function(){d.generateAsync({type:"blob"}).then(function(a){saveAs(a,"Steam-cropped-background.zip")})},j=function(){h(l+"avatar.png",b-461,34,164,164),h(l+"artwork_big.png",b-452,271,506,a-271),h(l+"artwork_small.png",b+62,271,100,a-271),i()},k=window.location.pathname.split("/"),l=k.length>1?k[k.length-2]+"_":"";e.onload=function(){b=Math.ceil(this.naturalWidth/2),a=this.naturalHeight,j()},e.src=document.location.href}window.location.host.indexOf("akamaihd.net")>-1&&(alert("try%20again%20now"),window.location="http:
@Tithen-Firion
Tithen-Firion / LEGO Lord of the Rings.dxw
Created Jan 2, 2019
LEGO Lord of the Rings - run windowed with DxWnd
View LEGO Lord of the Rings.dxw
[target]
title0=LEGO Lord of the Rings
path0=C:\Program Files (x86)\Steam\steamapps\common\LEGO Lord of the Rings\LEGOLOTR.exe
startfolder0=
launchpath0=
icon0=0000010001002020100000000000E802000016000000280000002000000040000000010004000000000080020000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF007777000000000000000007777777777737770000000000000000077777777777333330000000000001000777777777773333300000000000333137777777777700003000133113333333777730377777000330133377333337737777013777773300037733783733BBB737773337777730000377778737738BBB377773337777000007788871137388B33777733337770000003137311377388333037377788777003311101113773377101378878887777333313101337739973001788888773777330131013778771770178888F8777777000001003787787773378FFFF877777770000000030001337778888FF887777770000000000000007788788888877777770000000013787067888888F8877777777700001337888876888888F888777777770003333778888278888FFF887777
@Tithen-Firion
Tithen-Firion / minified version for bookmarklet
Last active Aug 25, 2018
Steam long images fixer. Adds minimal height to long images uploaded with fake resolution
View minified version for bookmarklet
javascript:(function(){var%20a=document.createElement("style");a.innerHTML=".publishedfile_popup_screenshot,.publishedfile_popup_screenshot>img,.profile_media_item,.imgWallItem{min-height:100px}",document.head.appendChild(a),[].forEach.call(document.getElementsByTagName("iframe"),function(e){e.contentDocument.head.appendChild(a.cloneNode(true))})})();
@Tithen-Firion
Tithen-Firion / minified version for bookmarklet
Last active Aug 17, 2017
Steam showcase uploader. Upload long artworks/screenshots on "edit profile" page directly to showcase by choosing file or with drag and drop.
View minified version for bookmarklet
javascript:(function(){function%20a(a){if(!a.firstElementChild.hasAttribute("data-initiated")){a.firstElementChild.setAttribute("data-initiated",1);var%20b=a.getAttribute("data-eshowcasetype");[].forEach.call(a.querySelectorAll(".screenshot_showcase_primary,%20.screenshot_showcase_smallscreenshot.showcase_slot"),function(a){a.setAttribute("data-eshowcasetype",b),0==a.clientHeight&&(a.style.minHeight="300px"),a.addEventListener("click",c,!0),a.addEventListener("dragover",d,!0),a.addEventListener("dragleave",e,!1),a.addEventListener("drop",e,!0),a.classList.contains("openslot")||a.classList.add("not-open")})}}function%20b(b,c){var%20d=b[0].target;a(d)}function%20c(a){a.preventDefault(),a.stopPropagation(),k.parentNode&&k.parentNode.removeChild(k),k.target=this,k.click()}function%20d(a){k.parentNode!==this&&(k.target=this,this.insertBefore(k,this.firstChild)),this.classList.add("dragover")}function%20e(a){this.classList.remove("dragover")}function%20f(){this.parentNode&&this.parentNode.removeChild(this);var%20a=
@Tithen-Firion
Tithen-Firion / minified version for bookmarklet
Last active May 15, 2017
Steam profile visibility toggler.
View minified version for bookmarklet
javascript:(function(){var%20a=document.querySelector(".profile_content.has_profile_background").style;document.querySelector(".profile_header_bg").style.visibility=a.visibility=(a.visibility=="hidden"?"visible":"hidden");})();
View Deobfuscated Openload JavaScript .js
$(document).ready(function() {
var _0x531f91 = $('#' + g).text();
var _0x5d72cd = _0x531f91.charCodeAt(0);
_0x5d72cd = _0x531f91;
var _0x1bf6e5 = '';
var _0x41e0ff = 7 * 8;
var _0xccbe62 = _0x5d72cd.length;
var _0x439a49 = _0x5d72cd.substring(0, _0x41e0ff);
var _0x3d7b02 = [];
var _0x31f4aa = {