Skip to content

Instantly share code, notes, and snippets.

View KirillMysnik's full-sized avatar

Kirill Mysnik KirillMysnik

View GitHub Profile
@KirillMysnik
KirillMysnik / round_saver.py
Created August 20, 2017 23:31
CS:GO, Source.Python: Prevent round from ending
from core import PLATFORM
from memory import Convention, DataType, find_binary
from memory.hooks import PreHook
if PLATFORM == "windows":
TERMINATE_ROUND_SIGNATURE = b"\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x2A\x53\x8B\xD9\xF3\x0F\x2A\x2A\x2A\x2A\x56\x57\x89\x2A\x2A\x2A\x83\xBB"
else:
TERMINATE_ROUND_SIGNATURE = b"\x55\x89\xE5\x57\x56\x53\x81\xEC\xDC\x00\x00\x00\x8B\x75\x08\x8B\x86"
@KirillMysnik
KirillMysnik / local_string.py
Last active August 19, 2017 00:00
Multilingual Strings
try:
from translations.manager import _LanguageManager
except ImportError:
# No Source.Python!
DEFAULT_LANG = 'en'
else:
DEFAULT_LANG = _LanguageManager.fallback
class LocalStringMeta(type(str)):
@KirillMysnik
KirillMysnik / gimme.py
Created August 17, 2017 13:10
Force GiveNamedItem to give the item we want no matter what item a player has in their loadout
from commands.typed import TypedSayCommand
from entities.entity import Entity
from memory import make_object
from messages import SayText2
from players.entity import Player
from weapons.entity import Weapon
def weapon_name(short_name):
return {
@KirillMysnik
KirillMysnik / greenawait.py
Last active August 9, 2017 14:16
greenawait.py - await coroutines from greenlet-started functions
def await(coro, *, loop=None):
if loop is None:
loop = asyncio.get_event_loop()
async def new_coro():
return await coro
g, f = greenlet.getcurrent(), loop.create_task(new_coro())
f.add_done_callback(lambda f: g.switch())
@KirillMysnik
KirillMysnik / gist:a2735376753569bf3088e41ecf67afd4
Created July 23, 2017 22:36
Steam -> Help -> System Information report 7/24/2017
Computer Information:
Manufacturer: System manufacturer
Model: System Product Name
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Phenom(tm) II X6 1055T Processor
CPU Family: 0x10