Skip to content

Instantly share code, notes, and snippets.

View Konctantin's full-sized avatar
🎯
Focusing

Konctantin Konctantin

🎯
Focusing
View GitHub Profile
@Konctantin
Konctantin / page_text_loc8.py
Created September 15, 2015 07:47
locales_page_text parser
import sys
from urllib.request import urlopen
from time import sleep
"""
select concat('(',it.entry,', ', pt.entry, ', \'http://ru.wowhead.com/object=', it.entry,'\'),\\') as arr
from gameobject_template it
LEFT JOIN page_text pt ON it.data0 = pt.entry
left join locales_page_text lt ON pt.entry = lt.entry
where type=9 and ifnull(data0,0) <> 0 and lt.entry is null and pt.entry is not null
@Konctantin
Konctantin / LDAsm.cs
Last active March 26, 2024 10:11
Instruction length disassembler in C#
using System;
namespace IlDasm_CSharp
{
public class ILDasm
{
#region defines
[Flags]
enum RFlag : byte
m_row:=0;
//FDataSet.DisableControls();
FGrid.DataSource.DataSet.First();
cellParam := TColCellParamsEh.Create();
while not FGrid.DataSource.DataSet.Eof do begin
for m_col := 1 to FGrid.Columns.Count-1 do begin
with cellParam do begin
Row := m_row;
Col := m_col;
@Konctantin
Konctantin / injection_poin.c
Created January 24, 2016 14:58
wow-64 injection point
signed __int64 __usercall Script_UnitName@<rax>(signed __int64 a1@<rbx>, __int64 a2@<rdi>)
{
...
LODWORD(v5) = sub_140A29990();
lua_pushstring(v1, v5);
lua_pushnil(v1);
return 2i64;
}
__int64 __fastcall lua_pushstring(__int64 a1, __int64 a2)
GOSSIP_EVENTS = { }
m_frame = CreateFrame("Frame");
m_frame.list = { }
local list = {
["test_guid"] = {
[1] = { count = 0, complite = 0, menu = {} },
[2] = { count = 0, complite = 0, menu = {} },
[3] = { count = 0, complite = 0, menu = {
[1] = { count = 0, complite = 0, menu = {} },
[2] = { count = 0, complite = 0, menu = {} },
public class RelayCommand<T> : ICommand
{
Action<T> exec;
Predicate<T> canexec;
public RelayCommand(Action<T> exec, Predicate<T> canexec = null)
{
Debug.Assert(exec != null);
this.exec = exec;
this.canexec = canexec;
AddonFrame.StateButtons = {
frame = CreateFrame("Frame", "Y_Buttons", AddonFrame),
buttonFrame = CreateFrame("Frame", "Y_Buttons_Container", AddonFrame),
buttons = { },
size = 36,
padding = 6,
SavePosition = function(self)
local point, _, rpoint, x, y = self.frame:GetPoint();
enum ObjectType
{
Object = 0,
Item = 1,
Container = 2,
Unit = 3,
Player = 4,
GameObject = 5,
Dynamicobject = 6,
Corpse = 7,
FrameScript_RegisterFunction = FindBinary(0, SEARCH_DOWN, "55 8B EC 56 8B 35 ? ? ? ? 6A 00 FF")
FrameScript_RegisterFunctionNamespaceWithCount = FindBinary(0, SEARCH_DOWN, "55 8B EC 56 8B 35 ? ? ? ? 57 FF 75 10")
if FrameScript_RegisterFunction == BADADDR:
quit("Could not find FrameScript_RegisterFunction.")
if FrameScript_RegisterFunctionNamespaceWithCount == BADADDR:
quit("Could not find FrameScript_RegisterFunctionNamespaceWithCount.")
def WriteNamespaceFuncs(logFile):
luaFuncs = []
regFuncs = []
def DumpFunctionArray(ref, arrPtr, size, nameSpace):
if size > 0 and arrPtr > 1000:
for i in xrange(0, size):
ptr = arrPtr+(i*16)
name = GetString(Qword(ptr), -1, ASCSTR_C)
addr = Qword(ptr+8)
if name != None: