Press ctrl+shift+i
in Discord
Navigate to Application
Local Storage
https://discordapp.com
//META{"name":"bgImage"}*// | |
var bgImage = function () {}; | |
bgImage.prototype.start = function () { | |
if($("#bgimage").length <= 0) { | |
$(".app").append($("<div/>", {id: "bgimage"})); | |
} | |
}; |
Since so many idiots keep referencing the websocket code as something that steals your data and sends it to me; let me explain these "programmers" who keep posting it what it actually does.
What was the websocket for? keyword: was
The BetterDiscord websocket was used as a secondary websocket connection to Discord servers in order to catch messages etc.
BdWSocket.prototype.start = function () {
var self = this;
/* $.ajax({
public static Bitmap Multiply(this Bitmap bitmap, byte r, byte g, byte b, PixelFormat format = PixelFormat.Format32bppArgb) { | |
var size = new Rectangle(0,0, bitmap.Width, bitmap.Height); | |
var bitmapData = bitmap.LockBits(size, ImageLockMode.ReadOnly, format); | |
var buffer = new byte[bitmapData.Stride * bitmapData.Height]; | |
Marshal.Copy(bitmapData.Scan0, buffer, 0, buffer.Length); | |
bitmap.UnlockBits(bitmapData); | |
byte Calc(byte c1, byte c2) { | |
var cr = c1 / 255d * c2 / 255d * 255d; |
/* | |
* C# Browser Title Grabber by Jiiks | |
* Grabs titles of all tabs. | |
* Tested with Chrome and Firefox. | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; |
namespace PoE2WindowManip; | |
partial class Form1 { | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
/// <summary> | |
/// Clean up any resources being used. |
async function generateSapisidHash(datasyncId, full = true, origin = 'https://www.youtube.com') { | |
const sapisid = document.cookie.split('; ').find(cookie => cookie.startsWith('SAPISID')).split('=')[1]; | |
const dsid = datasyncId.split('||')[1]; | |
const ts = Math.floor(new Date().getTime() / 1E3); | |
const input = [dsid, ts, sapisid, origin].join(' '); | |
const digest = await window.crypto.subtle.digest('SHA-1', new TextEncoder('utf-8').encode(input)).then(buf => { | |
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join(''); | |
}); | |
const hash = `${ts}_${digest}_u`; | |
if(full) return `SAPISIDHASH ${hash} SAPISID1PHASH ${hash} SAPISID3PHASH ${hash}`; |