Skip to content

Instantly share code, notes, and snippets.

@Talv
Talv / NOTES.md
Last active April 1, 2024 09:30
StarCraft 2 Custom Games list freeze - technical explanation [2024/03]

UPDATE 29-03-2024: Bug described below was addressed in 5.0.13.92028 released on 26th March. However not long since this event, a new exploit is now being used in similar manner - publishing malformed map, then hosting such map publicly, will trigger a game client crash.

This new variant is harmless - cannot be exploited to distribute malware or anything of this sort. More info about it on the SC2 Forum.

The sad part is that it requires an engine-level fix, or a server-side validation of published maps. Not something we - as a community without access to the code - can help in anyway, it's up to Blizzard now.


StarCraft 2 Custom Games list freeze - technical explanation [2024/03]

@Talv
Talv / s2dood.py
Created December 13, 2018 03:06
StarCraft II Editor 10k doodads limit patch
import sys
import os
import bitstring
dlimit = bitstring.Bits(intle=10000, length=16)
nlimit = bitstring.Bits(intle=30000, length=16)
def pause():
print("Press Enter to continue ...")
input()
@Talv
Talv / sc2-repdump.py
Last active December 13, 2018 06:04
Moved to standalone repository https://github.com/Talv/sc2-repdump/ ; script below is now obsolete
#!/usr/bin/env python2
import sys
import os
import json
import argparse
import mpyq
from s2protocol import versions
import xml.etree.ElementTree as ET
from xml.dom import minidom
@Talv
Talv / sc2-cheats-list.md
Last active April 12, 2018 08:36
StarCraft 2 Debug Cheats - version 4.1.4
@Talv
Talv / legacy-loops.SC2Lib
Created November 18, 2017 02:52
StarCraft II pre v4 loop elements definitions (Pick Each) for Trigger editor.
<?xml version="1.0" encoding="utf-8"?>
<TriggerData>
<Name>Loops Legacy</Name>
<Root>
<Item Type="Category" Id="C7DA882A"/>
<Item Type="Category" Id="1A13E77C"/>
<Item Type="Category" Id="C99865E1"/>
</Root>
<Element Type="Category" Id="C7DA882A">
<Name>Loops (Numbers)</Name>
@Talv
Talv / hash.c
Last active November 19, 2017 02:43
//-------------------------------------------------------------------------------------------------------------
// MD5/SHA256 Hash Library
// by magnificence7 of SC2Mapster.com.
// Project page: <http://www.sc2mapster.com/assets/md5-hash/>
//-------------------------------------------------------------------------------------------------------------
// '>>' operator is currently broken, so we workaround that by using its custom implementation
// @Talv
int shift_right(int v, int s)
{
@Talv
Talv / list.py
Last active April 30, 2023 23:12
sc2 maps cache list
#!/usr/bin/python
import re
import glob
from mpyq import MPQArchive
# CACHE_DIR = '/home/kk/.wine/drive_c/users/Public/Application Data/Blizzard Entertainment/Battle.net/Cache'
CACHE_DIR = 'C:\ProgramData\Blizzard Entertainment\Battle.net\Cache'
class SC2Map(object):